addShard with multiple replica sets

158 views
Skip to first unread message

David M

unread,
Aug 2, 2010, 10:06:27 PM8/2/10
to mongodb-user
Following from http://groups.google.com/group/mongodb-user/browse_thread/thread/32b9e5760163e9b0
if I want a shard to include multiple replica sets, is the syntax:

db.runCommand( { addshard : "set1/server1A,server1B,server1C,set2/
server2A,server2B,server2C", name : "shard1" } );

This would then mean the data from this shard will exist on 6 separate
servers - correct?

Kristina Chodorow

unread,
Aug 2, 2010, 11:05:02 PM8/2/10
to mongod...@googlegroups.com
Using multiple replica sets for a shard isn't supported. mongos is
going to use the first master it finds and send all the writes to it,
meaning the other two replica sets aren't going to get any writes.

> --
> You received this message because you are subscribed to the Google Groups "mongodb-user" group.
> To post to this group, send email to mongod...@googlegroups.com.
> To unsubscribe from this group, send email to mongodb-user...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/mongodb-user?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages