We have several options to install RavenDB, the following is a brief recap.

As a IIS application

this is the easiest way to setup RavenDB, just create a new web application and point to the “web” folder of the RavenDB install directory. The only important tweak is to tell to IIS the the application pool should be a “always running” application pool: http://ravendb.net/docs/server/deployment/as-iis-application

Advantages of this approach are clearly that the deployment is really easy, we can leverage the support of IIS and whenever RavenDB should crash IIS will take care of restart everything for US without any human intervention.

As a Windows Service

We can install RavenDB as windows service using its internal web server to expose the http endpoint on a preconfigured port, the advantages of this approach are basically that we have time to startup and especially to shutdown, the latter is the most important: when RavenDB gets shutdown needs to cleanly shutdowns all the indexes and that operation takes some time. If the cleanup/shutdown is not done correctly at startup RavenDB needs to check the healthy state of all the indexes and that takes a relative important amount of time, during which the database is not yet accessible.

Embedded directly in our application

Obviously this type of deployment is an option even if has nothing to do with the above options. We can build an application where everything is self contained in the application itself without the need of a separate RavenDB installation, this is the favorite solution for a typical single-user app.

What do I suggest?

Go with a Windows Service, especially if you have several huge indexes, because the health of RavenDB indexes if one of the core key point of the power of RavenDB.

Important note

Starting with RavenDB 2.0, that at the time of this writing is still under preview/unstable release, the whole startup/shutdown story has been addressed and drastically simplified, so if you have huge indexes with 2.0 is not such a big deal anymore.

.m