Mongdb replica set + query router

94 views
Skip to first unread message

Marcello A

unread,
Apr 27, 2015, 11:46:54 AM4/27/15
to mongod...@googlegroups.com
Hi All,
i'm testing a configuration with a replica set composed by 3 replicated server and without arbiters.

Do i have to install a query router to define in trasparent way a connection between the clients and the master server of this replica?

Thanks,
Marcello

Asya Kamsky

unread,
Apr 27, 2015, 7:56:36 PM4/27/15
to mongodb-user
You don't need a query router, you just need to specify the replica set in your connection string to the driver.   All of your data is in that replica set.   Query router (mongos) is only necessary when you shard aka split your dataset across multiple shards/replica sets.

Asya


--
You received this message because you are subscribed to the Google Groups "mongodb-user"
group.
 
For other MongoDB technical support options, see: http://www.mongodb.org/about/support/.
---
You received this message because you are subscribed to the Google Groups "mongodb-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mongodb-user...@googlegroups.com.
To post to this group, send email to mongod...@googlegroups.com.
Visit this group at http://groups.google.com/group/mongodb-user.
To view this discussion on the web visit https://groups.google.com/d/msgid/mongodb-user/3faea884-1706-4481-823a-4d12f09547b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MongoDB World is back! June 1-2 in NYC. Use code ASYA for 25% off!

PBS

unread,
Apr 28, 2015, 5:55:56 PM4/28/15
to mongod...@googlegroups.com
All you can do is add readpreferrence base on your requirement. i.e. PrimaryPreferred/SecondaryPreferred or nearestone
Reply all
Reply to author
Forward
0 new messages