ALL COVERED TOPICS

NoSQL Benchmarks NoSQL use cases NoSQL Videos NoSQL Hybrid Solutions NoSQL Presentations Big Data Hadoop MapReduce Pig Hive Flume Oozie Sqoop HDFS ZooKeeper Cascading Cascalog BigTable Cassandra HBase Hypertable Couchbase CouchDB MongoDB OrientDB RavenDB Jackrabbit Terrastore Amazon DynamoDB Redis Riak Project Voldemort Tokyo Cabinet Kyoto Cabinet memcached Amazon SimpleDB Datomic MemcacheDB M/DB GT.M Amazon Dynamo Dynomite Mnesia Yahoo! PNUTS/Sherpa Neo4j InfoGrid Sones GraphDB InfiniteGraph AllegroGraph MarkLogic Clustrix CouchDB Case Studies MongoDB Case Studies NoSQL at Adobe NoSQL at Facebook NoSQL at Twitter

NAVIGATE MAIN CATEGORIES

Close

Understand MongoDB's request routing

A. Jesse Jiryu Davis put together a couple of scripts to explain how requests are routed in a MongoDB cluster:

In a sharded cluster of replica sets, which server or servers handle each of your queries? What about each insert, update, or command? […] Operations are routed according to the type of operation, your shard key, and your read preference.

I actually think there are more hops involved between the config servers, mongos, and mongod instances. But the basic rules are pretty simple:

  1. if the query contains the shard key then it’s routed to specific shards
  2. if the query doesn’t contain shard keys then the request is send to all shards.

Original title and link: Understand MongoDB’s request routing (NoSQL database©myNoSQL)

via: http://blog.mongodb.org/post/53841037541/real-time-profiling-a-mongodb-cluster