Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-774

Documentation doesn't cover how to set up "hidden" nodes using a sharded cluster.

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      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'.

            Assignee:
            Unassigned Unassigned
            Reporter:
            william.zola@10gen.com William Zola
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:
              11 years, 24 weeks, 2 days ago