HLD Foundations in High-Level Design

Lessons in this section

  1. Requirements and the Design Loop

    Start every design by asking what the system must do and how well: functional and non-functional requirements, SLIs, SLOs and SLAs, percentiles, error budgets, scope, and the design loop.

  2. Back-of-Envelope Estimation

    Turn people per day into requests per second, storage, bandwidth and servers with quick, rounded sums, and learn why you always plan for the peak.

  3. Latency and the Request Path

    Follow one request from the phone to the database and back, learn the latency numbers worth remembering, and find out where the time really goes and how to cut it.

  4. Load Balancing

    Share traffic across many servers: scale up vs scale out, round robin, weighted and least connections, health checks, sticky sessions vs stateless servers, layer 4 vs layer 7.

  5. Caching

    Keep popular data somewhere fast: hits and misses, why small caches work, cache-aside, write strategies, TTLs, LRU and LFU eviction, cache stampedes and what not to cache.

  6. Data Storage and Replication

    Choose where data lives: SQL tables, joins and transactions, NoSQL document, key-value and graph stores, indexes and their cost, leader-follower replication, lag and failover.

  7. Partitioning and Consistent Hashing

    Split data across machines: partitioning vs replication, choosing a partition key, range vs hash splits and hot spots, why hash mod N fails, the consistent hash ring, virtual nodes and hot keys.

  8. CAP, PACELC and Quorums

    Decide what happens when copies disagree: strong, read-your-writes and eventual consistency, what CAP really says, PACELC's latency trade-off, and N, W, R quorums with the R + W > N rule.

  9. Queues, Streams and Idempotency

    Hand slow work to queues: producers, consumers and acks, absorbing bursts, queues vs pub/sub, streams and offsets, at-least-once delivery, idempotency keys and dead-letter queues.

  10. Rate Limiting

    Protect busy endpoints: choosing keys and limits, 429 and Retry-After, fixed windows and their edge problem, sliding windows, token buckets, shared counters and well-behaved clients.

  11. Reliability: Timeouts, Retries and Circuit Breakers

    Keep working when dependencies fail: cascading failures, timeouts, retries with backoff and jitter, circuit breakers, fallbacks, bulkheads, backpressure and load shedding.

  12. Observability: Metrics, Logs and Traces

    See what your system is doing: the three pillars, golden signals, structured logs, distributed traces, and alerting on SLO burn rate instead of noise.