SecurityZines.com Join

DB Sharding

Splitting one database across many machines

Cloud & ContainersSketchnote

DB Sharding (Splitting one database across many machines): hand-drawn explainer poster

What it is: sharding splits one large table horizontally: each shard holds a subset of the rows on its own server, so reads, writes and storage scale out instead of up.

How rows are placed: by a shard key. Range-based sharding (users A–M, N–Z) keeps ranges together but can create hot spots. Hash-based sharding spreads load evenly but makes range queries touch every shard. Directory-based sharding keeps a lookup table of key to shard.

Why it matters: a bad shard key is hard to change later. Cross-shard joins and transactions get expensive, and rebalancing when you add shards needs planning (consistent hashing helps).

More on Cloud & Containers

All 8

Get the next one by email

New posters land in the Security Zines newsletter on Substack. Free, no spam.