Hello Team,
I got the answer for the first question, as even-though I add arbiter in the cluster settings mongo shard is good enough to exclude arbiter.
Below is the output what I received eventhough I add arbiter:-
(localhost:20003 and localhost:30003 is arbiter)
mongos> db.runCommand( { addshard : "rs_A/localhost:20001,localhost:20002,localhost:20003" } )
{ "shardAdded" : "rs_A", "ok" : 1 }
mongos> db.runCommand( { addshard : "rs_B/localhost:30001,localhost:30002,localhost:30003" } )
{ "shardAdded" : "rs_B", "ok" : 1 }
mongos> db.runCommand({listshards:1})
{
"shards" : [
{
"_id" : "rs_A",
"host" : "rs_A/localhost:20001,localhost:20002"
},
{
"_id" : "rs_B",
"host" : "rs_B/localhost:30001,localhost:30002"
}
],
"ok" : 1
}
mongos>
Please let me the information on other two questions:-
2) And also let me know for Production setup what all the careful step I should take.
3) And also in case of no unique value exist in the collection then how should I have shard collection key?
Thanks,
Sudhakar