Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

http://www.mongodb.org/display/DOCS/Replica+Sets

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.

hth!

share|improve this answer

Your Answer

 
discard

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.