Database Sharding: Concepts and Examples
FAQs
Sharding allows for larger datasets that can be stored within a single database. Similarly, a sharded dataset where the requests are properly distributed across the machines can handle more requests than a single machine can.
In MongoDB, sharding is done through sharded clusters which consist of shards, routers/balancers, and config servers for metadata. While setting this up manually would require a fair amount of infrastructure setup and configuration, MongoDB Atlas — the database-as-a-service offering — makes this quite simple. Simply toggle the option on for your MongoDB cluster and select the number of shards.
The default setup both replicates and shards the data. This provides high availability, redundancy, and increased read and write performance through the use of both types of horizontal scaling. Routers that distribute queries and data are included as well. For more information, follow the link to learn more about MongoDB Atlas.
Other questions? Check out Sharding FAQs.
Get started with Atlas today
- 125+ regions worldwide
- Sample data sets
- Always-on authentication
- End-to-end encryption
- Command line tools