Menu

HA MongoDB

HA MongoDB services on Stratum use Replica Sets to provide automated failover in the event of a MongoDB node failure. Stratum handles the replica set configuration within your environment, and expose a single connection URI in an environment variable, DATABASE_URL.

Note: The variable may not always be named DATABASE_URL if the environment also contains more than one database service. There will always also be another variable named after the service, such as MONGO01_URL or DB01_URL.

The environment variable’s value follows the format defined by MongoDB. An example connection string:

mongodb://127.0.1.1:27017,127.0.1.2:27017/myDB?replicaSet=myReplSet

In the above example, the primary MongoDb node is at 127.0.1.1:27017 and the secondary node is at 127.0.1.2:27017. myDB will be the default database to connect to. The replica set to connect to is named myReplSet.

You will need to write your application using a client that supports replica sets - official driver list here.

To test your application locally using a replica set, we recommend that you follow the instructions in this blog post. This will give you a local testing environment that is configured very similarly to your HA MongoDB on Stratum.

See also

Cloud computing for healthcare

If you store, process, or transmit Protected Health Information, rely on Catalyze to keep you HIPAA compliant with our platform as a service, mobile backend, or managed HL7 integrations.

Contact Us Learn More

Catalyze learning resources

Learn the important and intracate details of HIPAA compliance, make use of HL7, and understand the security aspects of handling protected health information with our learning resources.

Visit Catalyze Learning Resources