Back to System Design
🧮
Phase 4

Core Algorithms

1

Consistent Hashing: The Algorithm That Makes Distributed Systems Scale

Master consistent hashing - the algorithm behind Dynamo, Cassandra, and CDN edge networks. Understand hash rings, virtual nodes, and how this minimizes data movement during scaling.

consistent-hashinghash-ringvirtual-nodes
2

Bloom Filters: The Probabilistic Data Structure You Can't Ignore

Understand Bloom filters - the probabilistic data structure behind Bigtable, Cassandra SSTable lookups, Chrome malicious URL checks, and CDN cache routing. Learn how to tune false positives.

bloom-filterprobabilisticfalse-positives
3

Write-Ahead Log (WAL): The Foundation of Crash Recovery and Durability

Understand the WAL algorithm - the foundation of crash recovery in PostgreSQL, durability in Kafka, and replication in databases. Learn fsync ordering, checkpointing, and point-in-time recovery.

WALcrash-recoverydurability
4

Raft Consensus Algorithm: Leader Election, Log Replication, and Safety

Master Raft - the consensus algorithm behind etcd, Consul, and CockroachDB. Understand leader election, term-based log replication, commit indices, and how Raft prevents split-brain.

Raftconsensusleader-election
5

Paxos, Two-Phase Commit, and Distributed Consensus Protocols

Understand Paxos phases, Two-Phase Commit (2PC), and Three-Phase Commit (3PC). Learn when to use strong consistency vs eventual consistency in distributed systems.

Paxos2PC3PC
6

Merkle Trees and Anti-Entropy: Data Integrity in Distributed Systems

Understand hash trees for efficient data verification. Learn how Dynamo uses Merkle trees for anti-entropy repair, and how Git, BitTorrent, and blockchain use them for data integrity.

Merkle-treeanti-entropydata-integrity
7

Vector Clocks and Versioning: Causal Ordering in Distributed Systems

Understand vector clocks for causal ordering, conflict detection, and versioning in distributed systems. Compare with Lamport timestamps and hybrid logical clocks (HLC).

vector-clockscausal-orderingversioning
8

LRU, LFU, and TinyLFU: Cache Eviction Algorithms Explained Deeply

Master cache eviction: LRU, LFU, LRU-K, and modern TinyLFU used in Caffeine cache. Understand admission policies, window/protected segments, and near-optimal hit rates.

LRULFUTinyLFU
9

Snowflake ID and Distributed ID Generation: Time-Ordered Unique IDs at Scale

Understand Twitter's Snowflake algorithm for time-ordered unique IDs across nodes. Compare UUID v4, UUID v7, and FLAKE. Learn about clock skew, worker ID assignment, and sequence handling.

Snowflakedistributed-IDUUID
10

Quorum-Based Reads and Writes: The N, R, W Model for Distributed Consistency

Master the quorum formula R + W greater than N for strong consistency. Understand Dynamo and Cassandra tuning, tradeoffs between latency and consistency, and sloppy quorum.

quorumconsistencyN-R-W