How many times have you felt less-than-confident about the stability of your most critical applications in case of a disaster? We have all experienced the frustration of losing control of our systems, processes, applications and infrastructure resources while not being able to easily recover from downtime (planned or unplanned).

With the latest release of ElasticBox, those times have come to an end. Read More

As a developer at ElasticBox, I wear the IT Ops hat just as often as I spend time writing code. So I understand all too well the pain IT Ops endure to keep things running smoothly after a production update. In the continuous delivery world where small, incremental code changes are deployed every day, chances are that IT Ops have to constantly put out fires. Luckily, in my own job, I’ve been able to leverage a combo of tools and workflows to catch the problems right where they originate — in the development environment. Read More

With ElasticBox, you can easily deploy a self replicating MongoDB cluster in just a few minutes. In order to accommodate ElasticBox’s data needs, we rely on MongoDB clusters that run on two public clouds and one private data center.

This way we can provide redundancy, high availability and excellent read and write performance around the world. Using ElasticBox, and our concept of Boxes, which are application or infrastructure components made available as a service, we can consistently deploy a MongoDB cluster in just a matter of minutes on any of our Cloud Providers.

To get started deploying MongoDB clusters on ElasticBox, sign up today for our free account! If you’re interested in other resources on MongoDB, check out how you can easily use Splunk to monitor MongoDB using ElasticBox.

Why would you want to cluster MongoDB? To provide redundancy and high-availability for production deployments.

How We Use MongoDB

In our case, MongoDB is using a replica set model. A replica set is a group of MongoDB instances that host the same data set. One MongoDB, the primary, receives all write operations. All other instances, secondaries, apply operations from the primary so that they have the same data set.

The primary accepts all write operations from clients. Replica sets can have only one primary. Because only one member can accept write operations, replica sets provide strict consistency.

Deploying MongoDB through ElasticBox

ElasticBox provides a default MongoDB box that’s available to the public. It deploys a standalone instance of the MongoDB server. Our MongoDB production box very closely resembles the default box, minus a few configuration settings required for our production scenario.

While the default MongoDB box configuration is suited for development purposes, it needs to be configured further to use in production. To configure the MongoDB default box for production use, follow the steps below:

Step 1. Create a new box called MongoDB Replica. Add a box variable for the MongoDB Server (this is to use the default box settings).

Step 2. Add a text variable REPLICA_SET to hold the replica set name. This value must be shared between all the members of the cluster.

When you deploy the box without a binding, it creates a cluster for you with an initial configuration. On the other hand, if you bind to an existing instance, it adds the instance to the existing cluster!