Unbalanced replica set reads: php driver (v1.2.6)

20 views
Skip to first unread message

Chris Merz

unread,
Nov 22, 2011, 7:16:08 PM11/22/11
to mongodb-user, chris...@mapmyfitness.com
Greetings! Here at MapMyFitness.com, we're using MongoDB as a
document store backing for a humongous amount of route data, fronted
by a lightweight rest api served up by apache. We upgraded to version
1.2.6 of the driver, but we're still encountering unbalanced reads
across the replica set. setSlaveOkay(true) is being set at the query
level. Anybody know what might cause a distribution like this?

server1: 156 queries/s
server2: 0 queries/s #primary
server3: 12 queries/s

Nat

unread,
Nov 22, 2011, 8:07:34 PM11/22/11
to mongod...@googlegroups.com
First you know that when slaveOkay is set, read requests will be mostly served by slave right? For why requests didn't go to the other slave, can you tell more of your setup environment ie which php cgi you are using, your setting, replicaset information etc?
--
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.

Kristina Chodorow

unread,
Nov 28, 2011, 4:44:13 PM11/28/11
to mongodb-user
The driver figures out who it should read from based on average ping
time, so probably server1 is "closer" to your app server than server3.
Reply all
Reply to author
Forward
0 new messages