Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-43617

Add metrics on the mongos to indicate the number of shards targeted for the commands (find, aggregate, etc)

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 4.3.3, 4.0.25, 4.2.15
    • Component/s: None
    • Labels:
      None
    • Backwards Compatibility:
      Fully Compatible
    • Backport Requested:
      v4.2, v4.0
    • Sprint:
      Sharding 2019-11-18, Sharding 2019-12-02, Sharding 2019-12-16, Sharding 2019-12-30
    • Case:
    • Linked BF Score:
      47

      Description

      Currently the mongos collects the opcounter metrics etc, with which we can get an idea on the incoming operations to the mongos. The mongos dispatch the operations to the shards:

      • If the operation only targets one shard, then the mongos only needs to dispatch it to one shard.
      • However, if the operation is a scatter-gather operation or targets a sub set of shards, then the mongos would need to dispatch the operation to multiple shards. In this case, the mongos is doing more work for such operation than the targeted operation, and there would be more load on the mongos.

      Currently we have added a metric to indicate the amount of sharded updates done with only _id in query (SERVER-41184). It would be nice to expose the number of shards targeted for the operations (find, aggregate, etc), so that we can have some insight on the number of outgoing operations from the mongos, to understand the (outgoing) workload on the mongos.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              janna.golden Janna Golden
              Reporter:
              linda.qin Linda Qin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              17 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: