This is a pretty basic question but I can't find any answers on it. I know you use mongos to interface with a sharded collection. However, if I have a replica set which is not sharded how do I set up mongos so that my application can use both the primary and secondaries in that set? Is it even necessary to use mongos or will having my application's mongo driver (php in this case) connect to one server in the set have it automatically enumerate the other members in the set and connect to them as well?
You can connect to a replica set directly from the driver, a
Once some people try sharding, they prefer connecting to the
Also, occasionally people will know that they are going to have to shard in the future and start with one shard in anticipation of that future need so that they don't need to do anything other than add a shard to the config.
In general, the main pre-requisite to have