</>CodexBash
All articles
Databases

Sharding

How sharding splits one database across many servers: when you actually need it, choosing a shard key, range, hash and directory-based sharding, routing queries, cross-shard queries and transactions, rebalancing, hot spots, and the databases that shard for you.

CodexBash, , 5 min read

A single database server can go a long way: modern machines with fast SSDs and hundreds of gigabytes of memory handle millions of rows and thousands of queries per second. But eventually some systems outgrow any one machine, in storage, in write throughput, or both. Sharding splits the data across many database servers, each holding a subset called a shard, so capacity grows by adding machines. It is powerful and it is expensive in complexity, so this article explains how it works and also when to avoid it.

Sign in to read the rest

The whole 5 minute article is free with an account, along with every problem, lesson and tutorial. No card.