MongoDB Sharding
Automatic partitioning and management
Range based
Convert to sharded system with no downtime
Fully consistent
•
•
•
•
Slide 13
Slide 13 text
Range Based Partitioning
>"db.posts.save("{age:40}")
-∞ +∞
-∞ 40 41 +∞
Data in inserted
Ranges are split into more “chunks”
•
•
Slide 14
Slide 14 text
How MongoDB Sharding works
>"db.posts.save("{age:40}")
>"db.posts.save("{age:50}")
-∞ +∞
-∞ 40 41 +∞
41 50 51 +∞
More Data in inserted
Ranges are split into more“chunks”
•
•
Chunks
Min Key Max Key Shard
-∞ adam@yahoo.com 1
adam@yahoo.com jared@abc.com 1
jared@abc.com scott@gmail.com 1
scott@gmail.com +∞ 1
Stored in the config servers
Cached in MongoS
Used to route requests and keep cluster
balanced
•
•
•