IT lexicon Database Sharding

Sharding

Database På svenska → Updated: 2026-05-23

Split a database across multiple servers — each shard holds a subset of the data.

Classic: hash of user_id decides the shard. Scales well horizontally but cross-shard queries get painful. Postgres supports it via Citus. NoSQL (Cassandra, MongoDB) builds sharding in. Last resort, not first.

← Back to the lexicon