I have a ruby on rails based application. Objective is to read from a mongo replica set member that is:
secondary
delayed by x seconds
priority: 0
- Placed in a separate data center.
DETAILS
: I have a production cluster running that uses mongo replica set.
Previously, It was noticed that sometimes Moped reads from other secondaries with high latency(remotely present in other data centers) and not from the secondary desired. To resolve the same problem, we have added a delay on remote secondaries.
Now I have a fresh analytics application that uses mongoid. Is there a way I could FORCE read from SPECIFIC secondary using mongoid or any other gem? i.e. Is there a way to override the Auto Discovery feature in Mongoid / Moped / MongoDB ? Please suggest