CLOUDFLOW configuration
The recommended way to provide fail-over in MongoDB is setting up replication sets.
Replication sets are supported by CLOUDFLOW. During the installation of the CLOUDFLOW server, you can set it to connect to a replication set instead of only to the primary database. In this case CLOUDFLOW will automatically connect to the secondary MongoDB when the primary MongoDB becomes unavailable.
To properly set up CLOUDFLOW to run with replica sets, CLOUDFLOW has to know the IP-addresses of all the nodes in the set (or at least the non-arbiter nodes) and the names of the nodes. You can do this by passing all these values to the -d flag when installing the work server.
- Separate each IP should by a semicolon (;).
- Do not use spaces.
- When you do not specify a port, 27017 is used.
- For Windows:In clustered CLOUDFLOW setups that share access to remote file shares via SMB, you need to configure Windows SMB options on all Windows based cluster members. Set the following keys in the registry in
HKLM\System\CurrentControlSet?\Services\LanmanWorkstation?\Parameters\:
- "FileNotFoundCacheLifetime"=dword:00000000
- "DirectoryCacheLifetime"=dword:00000000
- "CacheFileTimeout"=dword:00000000
- "FileInfoCacheLifetime"=dword:00000000
The replication set name is passed by adding the entry replSet:$name$
to the
list of IP's.
Example
The replication set is named cf. There are three database involved, one running at 10.0.2.1, one running at 10.0.2.2 and one running on 10.0.2.4:27033. This would lead to the following install command:
nucleusd.exe —install -d 10.0.2.1;10.0.2.2;10.0.2.4:27033;replSet:cf
See also the MongoDB documentation for more information on how to set up these replication sets: https://docs.mongodb.com/v3.2/tutorial/deploy-replica-set/.