System Design Visualized
Lesson 13.7

Scaling the storage: smart sharding

Play this lessonThis lesson comes with an interactive animation you can break, a live-code challenge and a chapter quiz.

When the trie no longer fits on one server, shard it. A naive approach shards by first character: 2 servers → 'a–m' and 'n–z'; 3 servers → 'a–i', 'j–r', 's–z'. Up to 26 servers at the first level, then shard on the second or third character (e.g. 'aa–ag', 'ah–an', …).

The rest of this lesson is part of Pro

Pro unlocks every lesson with its animation, code challenge and quiz, plus every interview problem. ₹299 a month or ₹1,999 a year.

See Pro

Remember it, then prove it

Create a free account to save your progress, get spaced-repetition reviews of what you miss, and design real systems in the interview simulator.

Start free