Windows Clustering
Note that this feature is only available in the Enterprise Edition of RavenDB.
In order to ensure RavenDB high availability you can run it on a failover cluster.
Requirements
- Windows Server 2008
- Failover Cluster Manager snap-in installed
- Storage Area Network (SAN) configured
Configuring RavenDB service
Execute the following steps on every cluster node:
- If RavenDB isn't installed as a service follow this link in order to do it
- Stop RavenDB service by executing the following command on the command line: Raven.Server.exe /stop
- In the Raven.Server.exe.config file set up Raven/DataDir to the SAN
Note: A failover cluster will take care of working RavenDB. If the failure take place on one of the cluster nodes then a failover cluster will start RavenDB service immediately. So it's important that RavenDB instance on every node should use the same data directory placed on the SAN.
Creating failover cluster
- Go to Start -> Administrative Tool -> Failover Cluster Manager
- Select Create a cluster option from context menu
- Go through the wizard
- Add cluster nodes
- Validate a cluster configuration
- Validation Wizard will be shown
- Run all test to make sure that nodes are configured properly
- Click Next
- Wait for validation finish
- Name a cluster and assign IP address for it
- Confirm and finish next steps
Adding RavenDB as a Generic Service resource
- Right click on Services and applications of newly created cluster and choose Configure a Service or Application... option from context menu
- Go through the High Availability Wizard
- Choose Generic Service
- Select RavenDB service
- Type the cluster service name and assign the IP address under which RavenDB will be available
- RavenDB has been already configured on every node to keep data in SAN, so no storage is needed here. Click Next
- Click Next
- Summary screen. Click Finish
Summary
- After click on a service name in a cluster tree you will see RavenDB service information
- Service properties
- * General options
- * Failover options
-
Failure simulation
- Right click on RavenDB resource and choose Simulate failure of this resource
- During failover the resource has been moved to a different node and is in pending mode
- Failover succeed
- Right click on RavenDB resource and choose Simulate failure of this resource