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)

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.3.3, 4.0.25, 4.2.15
    • Affects Version/s: None
    • Component/s: None
    • Labels:
    • Fully Compatible
    • v4.2, v4.0
    • Sharding 2019-11-18, Sharding 2019-12-02, Sharding 2019-12-16, Sharding 2019-12-30
    • 47

      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.

            janna.golden@mongodb.com Janna Golden
            linda.qin@mongodb.com Linda Qin
            0 Vote for this issue
            17 Start watching this issue