Mongos dedicated to route only on secondary nodes of cluster

Hello MongoDB Folk,

I am looking for some inputs and thoughts on reading only from Secondary through dedicated mongos.

Is there any way to route all queries particularly from mongos that will read data only from secondary nodes of sharded cluster and no write will be entertained.

To achieve this below are the tools I am aware of and that too comes with a lot of constraints like no support on index sync and requires a lot of manual interventions in order to manage and replicate a whole new cluster.

mongo-connector and seems no more active:
mongo-shake - Documentation is not much clear:

This is the improvement request I have submitted in MongoDB
If the above improvement seems useful then please up-vote and any other tools or utility recommendations are most welcome.

I am not sure what your use-case for this. If to improve performances of the whole system you may want to consider that secondaries have the same workload as the primary. They performed the same amount of writes. So you might not see a lot of differences.

Before going to the complex route of having dedicated mongos, I would look at
for normal read workload as they may satisfy your use-case.

If you want mongos for reporting or analytic workload, you may consider

1 Like