Database Partitioning and Sharding: Range, Hash and Consistent Hashing
Sharding splits data across multiple nodes and creates a new class of problems. This post covers range, hash, and consistent hashing with trade-offs that matter in production.
Latest articles, tutorials, and deep dives from ndlab tech blog.
Sharding splits data across multiple nodes and creates a new class of problems. This post covers range, hash, and consistent hashing with trade-offs that matter in production.
Automatic failover sounds simple — consensus makes it hard. This post explains leader election, Raft vs Paxos trade-offs, and what high availability means in distributed databases.
Replication lag creates bugs that only appear under load. Read-your-own-writes, monotonic reads, and consistent prefix reads are the guarantees that prevent them.
Replication keeps databases available when servers fail. Single-leader, multi-leader, and leaderless each trade consistency differently — this post explains all three clearly.
How does a database survive a server crash without losing data? The Write-Ahead Log is the answer. This post explains WAL, ARIES recovery, and what durability actually guarantees.
InnoDB uses B-Tree. RocksDB uses LSM-Tree. The choice determines read speed, write speed, and space amplification. Understanding both unlocks every storage engine decision.
Results