← All tutorials

Skill Zuno · skillzunos.com · System Design

Replication and Sharding tutorial

Learn Replication and Sharding on Skill Zuno. This Replication and Sharding tutorial covers New, Easy, Medium, Hard, and Diff levels so you can study practical Replication and Sharding problems on skillzunos.com.

Open Replication and Sharding on Skill Zuno

Also see the Replication and Sharding interview questions.

Replication keeps copies of the same data on several machines for availability and read scaling, while sharding splits data across machines so each holds only part of it. Most large databases combine both. Interviews cover leader-follower and multi-leader replication, synchronous versus asynchronous replication, shard keys, hot spots and resharding.

Replication and Sharding topics covered

  • Leader-follower replication — All writes go to one leader that streams changes to read-only followers.
  • Multi-leader and leaderless replication — Accepting writes in several places, and resolving the conflicts that follow.
  • Synchronous versus asynchronous replication — Trading write latency for durability and up-to-date replicas.
  • Sharding strategies — Range, hash, directory and geographic sharding, and their trade-offs.
  • Choosing a shard key — Spreading load evenly while keeping related data together for queries.
  • Resharding and cross-shard queries — Moving data as the cluster grows, and the cost of joins and transactions across shards.

What you can learn

  • Replication and Sharding tutorial for beginners and experienced developers
  • Level-based practice: New, Easy, Medium, Hard, and Diff
  • System Design topics alongside Replication and Sharding on skillzunos.com

More System Design tutorials

All tutorials