Sharding
Last updated
What is Sharding?
Sharding distributes data across different databases such that each database can only manage a subset of the data. Taking a users database as an example, as the number of users increases, more shards are added to the cluster.
Similar to the advantages of federation, sharding results in less read and write traffic, less replication, and more cache hits. Index size is also reduced, which generally improves performance with faster queries. If one shard goes down, the other shards are still operational, although you'll want to add some form of replication to avoid data loss. Like federation, there is no single central master serializing writes, allowing you to write in parallel with increased throughput.
Free resources to learn Sharding
More in stage 14: Asynchronism
Sharding: common questions
Can I learn Sharding in Hindi?
This lesson is written in English. Once you sign in, open it in the interactive course and ask the AI tutor to explain Sharding in Hindi or Hinglish. The tutor answers from this lesson’s own text, so it stays on the syllabus, and it runs on your own Google, OpenAI or Anthropic key.
Is this Sharding tutorial for beginners?
It is lesson 45 of 147 in the free System Design roadmap, in stage 14, Asynchronism. If you are new to System Design, start from stage 1 and come back here in order; if you already know the earlier stages, this lesson stands on its own.