System design / README.md

Scaling building blocks

Updated 1 min read index source

Scaling building blocks

The vocabulary every system design answer needs, as first-class topics rather than scattered across backend folders.

# File Covers
01 Load balancing and CDN L4 vs L7, algorithms, health-check failure modes, CDN caching
02 Replication, sharding and consistency models replication models, sharding, CAP/PACELC, the consistency spectrum

Deeper treatment of individual pieces lives in the backend folders: caching, sharding and partitioning, CAP/ACID, message queues.

Three precision points

CAP is about partitions, not a general “pick two”. With no partition you get both consistency and availability. PACELC is the more useful framing because it also describes the everyday latency-vs-consistency choice.

A deep health check is an outage amplifier. If the check queries the database, one database blip marks every backend unhealthy simultaneously and the load balancer removes your whole fleet.

Shard last. Read replicas, caching, vertical scaling and archiving come first. The shard key is the hardest decision to reverse, and a key that isn’t in your common query turns every read into a scatter-gather.

Contents 2