I am moving from a single mongodb instance to a sharded cluster with 3 replica sets, 3 config servers and 1 mongos instance. Each replica set in turn has three mongod instances.
I'm looking for high availability when I am adding documents to the collection. What should I connect to from my Java program? Should I connect to mongos or mongod from any replica set?
Can you please let me know ?
Thanks.