SysDesignAtlas

Building Blocks

The components you assemble in every design: load balancers, caches, queues, shards, indexes.

HLDEasy11 min

Load Balancing

L4 vs L7, the algorithms and when each actually matters, health checking, and why the load balancer itself isn't a single point of failure.

HLDMedium13 min

Caching

The caching layers, the four write strategies, eviction policies, and the three failure modes — stampede, penetration, avalanche — that every serious interview eventually reaches.

HLDEasy10 min

CDNs & Edge Delivery

How content lands close to users, push vs pull, cache keys and invalidation, and why the CDN is often the single largest scaling decision in a media-heavy design.

HLDMedium11 min

SQL vs NoSQL — Choosing a Datastore

A decision framework that goes beyond "relational vs document," the four NoSQL families and what each is genuinely for, and why the honest default is Postgres.

HLDMedium13 min

Database Indexing

How B-tree indexes actually work, composite index ordering, covering indexes, and why the wrong index is often worse than none at all.

HLDMedium11 min

Replication

Leader-follower, multi-leader and leaderless topologies; sync vs async and the data-loss window; replication lag and the failover problems it creates.

HLDHard12 min

Sharding & Partitioning

How to split data across machines, choosing a partition key, hot spots and celebrity problems, and why cross-shard queries and resharding are the costs you must name.

HLDMedium10 min

Consistent Hashing

Why modulo hashing breaks on rescale, how the ring fixes it, virtual nodes, and the modern alternatives — rendezvous hashing and bounded loads.

HLDMedium12 min

Message Queues

Why async decoupling changes a system's failure behavior, the log vs broker distinction, delivery semantics, ordering, and dead letter handling.

HLDMedium11 min

Rate Limiting

The five algorithms with their exact tradeoffs, where to enforce limits, and how to make counters correct across a distributed fleet.

HLDMedium11 min

WebSockets & Real-Time Delivery

Polling, long polling, SSE and WebSockets compared; how to scale millions of persistent connections and route a message to the right one.

HLDMedium11 min

Search & Inverted Indexes

How full-text search works internally, why your database can't do it, relevance ranking, and keeping the index in sync with the source of truth.

HLDMedium11 min

Unique ID Generation

Why auto-increment breaks when you shard, the Snowflake layout, UUID versions, and how to get sortable IDs without a coordinator.

HLDMedium11 min

Bloom Filters & Probabilistic Structures

Trading exactness for orders of magnitude less memory — Bloom filters, HyperLogLog, count-min sketch, and when approximation is the correct engineering answer.

HLDMedium12 min

API Gateway & Service Communication

What belongs at the edge, REST vs gRPC vs GraphQL, the BFF pattern, and how services should talk to each other without creating a distributed monolith.

HLDEasy11 min

Object Storage & Blob Handling

Why files never belong in your database, presigned uploads, multipart and resumable transfers, storage tiers, and the metadata pattern every media system uses.

HLDMedium10 min

Pub/Sub & Event-Driven Architecture

Fanout messaging, event notification vs event-carried state vs event sourcing, and the coupling problems event-driven systems trade for the ones they solve.

HLDMedium10 min

Geospatial Indexing

Why B-trees fail on two dimensions, and how geohash, quadtrees, S2 and H3 turn "find things near me" into a one-dimensional range query.

HLDHard11 min

Distributed Locks & Leases

Why a lock in a distributed system is never as safe as it looks, why fencing tokens are mandatory, and the designs that avoid needing a lock at all.

HLDEasy8 min

Proxies: Forward and Reverse

The middleman in front of clients and the middleman in front of servers — what each is for, the jobs a reverse proxy takes off your application servers, and how proxies relate to load balancers, CDNs, API gateways and sidecars.

HLDMedium9 min

Monoliths and Microservices

One deployable or many — what splitting a system into services really buys (independent teams, deploys and scaling), what it really costs (every call can fail, no shared transactions, far more to operate), where to draw the lines, and how to split a monolith safely.