- Install Mongo on A. Start the server: $ mongod --rest --replSet myset
- rs.initiate() on A.
- Install Mongo on B. Start the server: $ mongod --rest --replSet myset
- Connect to A and add B to the set: rs.add("B");
- Set up C as the Arbiter: $ mongod --rest --replSet myset --oplogSize
- Connect to A and add C as an arbiter: rs.add( { host:āCā, arbiterOnly:true }
Alright, my question is:
What Mongo server does my web server connect to? Before replica set, it's very simple. I just give it a host, user, pass, and the web server connects perfectly. But with all of this set up, how does the web server know whether to point to A, or to B, or to C?
I'm guessing that the web server should always point to C, and it will handle everything magically?