When go connects to mongo replica set, how can read be evenly distributed to each secondary?

  golang, question

Replicaset has two secondary.Eventual modeBut in uselabix/mgo.v2When connecting to mongo, I found that all read was concentrated on one secondary, and only a small amount would access the other 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. Check the setting of connect URL;

2. If the read Load Balance is different from the expectation of the parameters you set, you can consider setting Tag to further configure what member to read from.

For reference.

Love MongoDB! Have Fun!