replicaset有两个secondary,Eventual mode
,但在使用labix/mgo.v2
连接mongo时,发现所有的read都只集中在一个secondary上了,仅有很少的量会访问另外一个secondary。
// Read preference modes are specific to mgo: Eventual Mode = 0 // Same as Nearest, but may change servers between reads. Monotonic Mode = 1 // Same as SecondaryPreferred before first write. Same as Primary after first write. Strong Mode = 2 // Same as Primary.
1、检查一下connect URL的设置;
2、如果读的Load Balance和你设置的参数的预期不一样,可以考虑配合设置Tag,进一步配置从什么member读。
供参考。
Love MongoDB! Have Fun!