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?
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
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!