Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm kinda new to MongoDB. I've setup a single mongo server on an Amazon m2.xlarge EC2 instance. I've setup a RAID10 with 4 EBS volumes for storage. Seems to work great for collecting data. How do I setup a replica set? Do I have to manually create a whole new instance and RAID10 for this? What are the mechanics of this?.. with minimal or no downtime?

share|improve this question
up vote 1 down vote accepted

You need 3 instances of mongo running. Your best bet is another mongo instance for the data and then run another as an arbiter which is online just to cast a vote and not hold any data. This can be a free micro instance.

You could run it on the same host but that is pointless since if your host/ebs fails you lose it all so what is the point of a replica set then?

For more info on how to set it up see

share|improve this answer

On my setup, I use a replica set spanned across two servers, as follows:

host1 - master host2 - priority 0 // slave for reads arbiter - 2nd instance of mongodb, which I run on host1

(arbiter holds no data)

Note that on the read system, most users (and my experience) is that you need a lot of RAM. Specifically, you need RAM that exceeds the total size of your indexes.

Our experience (and that of others) is that Mongodb has horrible perf issues on reads when the indexes do not fit in memory.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.