MongoDB Non Sharded Environment

mongodb

We are planning to setup non-sharded MongoDB Instance on Amazon AWS. As per my understanding we need MongoD setup on Primary and Secondary to forms as a replica set. Please advice if we need MongoS,Config Server & Arbiters

Best Answer

Please read the replication documentation before you go into production. Make sure you have understood them.

As per your questions:

  • You don't need config servers, as they are only needed for sharded environments
  • You don't need mongos instances, as they are only needed for accessing shards.
  • You only need an arbiter if you have an even number of data bearing replica set members, as the elections for a primary need a qualified majority with a quorum of 50% to elect a new primary.

Again, please read the docs. As you are obviously inexperienced with running MongoDB, it might be worth to have a look at the a MongoDB provider such as MongoLab or Compose (former MongoHQ). They are not necessarily more expensive (quite the contrary in some use cases) and you don't need to administer and monitor MongoDB yourself. Disclaimer: As a MongoDB DBA, I do not have first hand experience with either of them.

Some notes on running a non sharded environment: Please keep in mind that the space an EBS volume can provide is limited. So if there is any chance that you exceed 1TB of data (including indices, oplog and journal), you should think of using a sharded cluster from the beginning in order to prevent the need of interrupting your services when the need of scaling arises.