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

provide an option to deny global queries (queries running on all shards)

    • Cluster Scalability
    • 4

      global queries can be sent innocently to a large cluster and hurt it's overall performance. In many systems global queries are intentionally avoided in order to make the system truly scalable (see a more elaborate explanation about the scale issue in the next paragraph).
      This issue attempts to request a collection level configuration that won't allow global queries, in other words, require the query to contain a shard key.

      Why global queries don't scale?:
      Usually there is a correlation between the size of the data and the number of queries per second invoked. Take for example a social network implementation: you start off with one shard and 1000 users. when you find yourself with 50 shards and 50000 you make 50 times more queries. if queries are global, the more users you have, the more shards you have, more queries are invoked per shard. I've heard MongoDB devs say before: each shard is doing 1/50 of the work. well that might be true for some map reduce queries, but not for many other simple queries.
      Another killer example is the system i'm working on: A 50 shard cluster scattered across the U.S, do I really want to suffer cross data center latencies for each query? I think not.

            Assignee:
            backlog-server-cluster-scalability [DO NOT USE] Backlog - Cluster Scalability
            Reporter:
            alonho Alon Horev
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: