Details
-
Improvement
-
Status: Closed
-
Minor - P4
-
Resolution: Duplicate
-
None
-
None
-
None
-
None
Description
Hidden members don't work well with a sharded cluster. The normal use case is for a single replica set. In that case, you can directly connect to the single hidden node and send your read-only testing queries there.
However, you cannot query a sharded collection and have it target the hidden nodes. Because those nodes are marked as 'hidden', there is no way to have the 'mongos' direct queries to those nodes.
The way to implement "hidden" nodes in a sharded cluster is to use the new tag-aware sharding features. In your three-node replica set, you'd tag one node as 'testing', and set it to priority 0, so it could never become master. You'd then tag the other two nodes as 'working'.
You would then have to set a read preference in your application: the production applications would set a read preference of 'working', and the testing/analytics application would set a read preference of 'testing'.
Attachments
Issue Links
- duplicates
-
DOCS-305 Add Tag Aware Sharding Content
-
- Closed
-