The Runtime Theory
hard · 14h · 12 steps

System Design Advanced

Consensus, sharding, circuit breakers, and cross-region resilience — the advanced patterns that keep distributed systems alive under failure.

Curriculum (12 steps)

1

A system is not a single program — it is components with boundaries, responsibilities, and failure modes. Learn how to see the box before you design inside it.

Start→
2

Every system design trade-off is ultimately a balance between doing work fast, doing work often, and paying the cost of making multiple components agree.

Start→
3

Round-robin, least connections, IP hash, consistent hashing, and health checks — the mechanics behind every routing decision.

Start→
4

From write-ahead logs to B-trees, from leader-follower to read replicas — how databases persist, index, and copy your data.

Start→
5

Why distributed systems need consensus, how Raft uses terms and quorums to elect a leader, and when the cost is worth paying.

Start→
6

Follow a leader failure from election timeout through candidate nomination, vote exchange, quorum, and a new leader taking over.

Start→
7

How to split a keyspace across many machines so that adding or removing one server moves the minimum amount of data.

Start→
8

How to prevent a slow or failing dependency from taking down your entire system by isolating failures and failing fast.

Start→
9

Follow traffic from a healthy primary region through failure detection, circuit breaker trip, failover decision, and traffic shift to a backup region.

Start→
10

Visualize a primary region handling all traffic, a passive backup region ready to take over, and the failover path when the primary becomes unhealthy.

Start→
11

Implement a circuit breaker with closed, open, and half-open states that fails fast on a degraded dependency and recovers automatically.

Start→
12

The interview answer to why consistent hashing reduces rebalancing cost, and the follow-up questions about virtual nodes and hotspots.

Start→