I have a Mongo DB setup of 4 DB (2 shards of 2 replica) and I noticed that the secondary servers of each shard is not being used for read queries. Both secondary servers received all inserts, updates and deletes from their master but when I look at mongostat, the number under 'query' is always zero.
Do I need to setup something such as 'slaveOk' for my mongos client to be able to use the secondary server of each shard for read queries?
Thanks!
Reading from the slaves is not the default behavior, but it is enabled in the application via the language driver (because they can only be used on read operations.) It is not controllable from the server. An example in pymongo is described in the master_slave_connection page.