Chapter 12. Scaling your system with sharding

This chapter covers

  • Sharding motivation and architecture
  • Setting up and loading a sample shard cluster
  • Querying and indexing a sharded cluster
  • Choosing a shard key
  • Deploying sharding in production

With the increasing scale of modern applications, it’s become more and more expensive, and in some cases impossible, to get a single machine powerful enough to handle the load. One solution to the problem is to pool the capacity of a large number of less powerful machines. Sharding in MongoDB is designed to do just that: partition your database into smaller pieces so that no single machine has to store all the data or handle the entire load. On top of that, sharding in MongoDB is transparent to ...

Get MongoDB in Action, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.