🏗️

Documentation Course

System Design In-Depth

From the Silicon to the Multi-Region Ledger

Start Reading

A complete system design curriculum that starts at the memory hierarchy and ends at a multi-region ledger — 64 modules for engineers who have to build the thing, not just whiteboard it. Foundation covers the machine, the estimation math, and one server done properly. Practitioner covers distributed data, storage engines, sharding, Kafka, caching, and search. Architect covers consensus, sagas, multi-region topology, and the failure modes of distribution itself. Production & Governance covers observability, zero-downtime migrations, chaos engineering, disaster recovery, FinOps, and compliance. Every trade-off is stated as a trade-off with its cost named, and every internal is anchored to the production symptom that makes you care.

JJS
Written by Jatin Jain Saraf · Senior Software Engineer
Free64 modulesBeginner to AdvancedWritten / Documentation-style64 of 64 modules live

How to use this course

This course works as both a sequential read and a standalone reference. Read front-to-back to build the model from the memory hierarchy up to a multi-region ledger — each phase assumes the one before it. Or jump to the module that matches the decision in front of you: an estimation you have to defend, a sharding key you can't take back, a rebalance storm, a migration on a multi-terabyte table, or a cloud bill nobody can explain.

Total reading time

~30 hrs

across 64 live modules

Built from

UPI-scale payments

Postgres, Redis, Kafka, multi-region

Prerequisite

You ship backend systems

Beginner through architect — no distributed systems background assumed

Phase 1 — Foundation

Absolute basics · No prior knowledge assumed

16 modules
F-1
What Is System Design? Requirements, Constraints, and Trade-offs
Functional vs non-functional requirements, why "it depends" is the correct answer, and how to make it specific enough to build from.
F-2
Mechanical Sympathy: CPU Caches, Memory, and Disks
Cache lines, the memory hierarchy, RAM vs NVMe vs HDD, IOPS — and why a sequential disk write beats a random RAM access, the one fact that explains Kafka, LSM-trees, and UUID keys later.
F-3
Back-of-the-Envelope Estimation
QPS, storage, and bandwidth math built on real hardware numbers — sizing a system in five minutes without opening a spreadsheet.
F-4
Latency, Throughput, and Tail Latency
p50 vs p99 vs p999, why averages hide outages, and Little's Law — the equation that tells you how many servers you actually need.
F-5
The Anatomy of a Request
DNS → TCP handshake → TLS → HTTP, hop by hop, with the milliseconds attributed — so you know which layer to blame before you start guessing.
F-6
HTTP/1.1, HTTP/2, and HTTP/3
Head-of-line blocking at both the application and transport layer, multiplexing, keep-alive, and why connection reuse is the cheapest performance win you have.
F-7
Client–Server, N-Tier, and the Monolith
Why the monolith is almost always the right first answer, what a tier really buys you, and how layer boundaries decay when nobody defends them.
F-8
API Design: REST, GraphQL, and gRPC
Resource modelling, versioning, pagination that survives page 900, over- and under-fetching, and the N+1 problem in its API-layer disguise.
F-9
Scaling Up vs Scaling Out; Stateless vs Stateful
Sticky sessions, the vertical ceiling, and why state — not traffic — is what actually makes scaling hard.
F-10
Compute Models: VMs, Containers, Serverless, and the Edge
What each abstraction takes away — cold starts, execution ceilings, no work after the response returns, ephemeral disk, and why an edge runtime cannot hold a WebSocket or a TCP pool.
F-11
Load Balancing
L4 vs L7, round-robin vs least-connections vs hashing, health checks that lie, and connection draining during a deploy.
F-12
Caching Fundamentals
The cache layers from browser to CDN to app to database, hit ratio as the only number that matters, TTL choice, and sizing a cache to the working set instead of the dataset.
F-13
Database Fundamentals for Architects
Schema modelling, B-tree indexes, what the query planner is actually deciding, and how one slow query turns into an upstream outage.
F-14
Choosing a Data Model: SQL vs NoSQL
Access-pattern-first modelling and the four broad datastore shapes — the decision framework, before the deep comparison in P-9.
F-15
Reverse Proxies, API Gateways, and CDNs
TLS termination, routing, edge caching, cache keys that accidentally cache nothing, and purging content you already told the world to keep.
F-16
Capstone: Design a URL Shortener
A full single-region walk-through — key generation, schema, cache layer, the redirect hot path, and analytics that do not slow the redirect down.

Phase 2 — Practitioner

Production patterns · Real application architecture

24 modules
P-1
ACID, Transactions, and Isolation Levels
Read-committed vs repeatable-read vs serializable, and what lost updates and write skew look like when they hit real money.
P-2
Storage Engines: B-Trees vs LSM-Trees
Write vs read amplification, memtables, SSTables, and compaction stalls — the direct payoff of F-2, and why your write-heavy table hates a B-tree.
P-3
Primary Keys and Distributed ID Generation
Auto-increment vs UUIDv4 vs UUIDv7/ULID vs Snowflake — why random keys shred B-tree page locality, and what a monotonic public ID leaks.
P-4
Connection Pooling and the Database Bottleneck
Pool sizing, pgBouncer, why 500 app instances kill one Postgres — and the serverless version of the same failure, where every invocation brings its own connection.
P-5
Replication
Leader–follower topology, sync vs async trade-offs, replication lag as a product bug, and read-your-own-writes.
P-6
Sharding and Partitioning
Hash vs range vs directory partitioning, hot partitions, and the cross-shard queries and joins nobody plans for.
P-7
Consistent Hashing
The rebalancing problem, virtual nodes, and exactly how Redis Cluster and Cassandra decide which node owns your key.
P-8
Multi-Tenancy: Silo, Pool, Bridge, and Noisy Neighbours
Database-per-tenant vs shared schema vs schema-per-tenant, what each costs in migrations and blast radius, and how to contain a whale account.
P-9
Specialty Datastores: Wide-Column, Graph, and Time-Series
Cassandra and DynamoDB partition-key design, Neo4j traversals vs recursive SQL, TSDB downsampling and retention — what each one earns over Postgres.
P-10
CAP and PACELC
What CAP actually claims, the three things it is routinely misquoted as claiming, and the latency trade-off it leaves out entirely.
P-11
Consistency Models
Strong, causal, eventual, and monotonic reads as product decisions — plus quorum reads and writes and where R + W > N stops helping.
P-12
Distributed Caching with Redis
Cache-aside vs write-through vs write-behind, and the two failure modes that take the database down anyway: the stampede and the thundering herd.
P-13
Cache Invalidation
TTL strategy, versioned keys, tag-based purge, and naming your staleness budget out loud so the argument stops being a vibe.
P-14
Message Queues
Decoupling, at-least-once delivery, visibility timeouts, dead-letter queues, and exactly how much ordering a queue can actually promise you.
P-15
Event Streaming with Kafka
The log as source of truth, partitions and consumer groups, offset management, and the rebalance storm that stops all consumption at once.
P-16
Idempotency and Deduplication
Idempotency keys done properly, why exactly-once delivery is an illusion, and how wide a dedupe window has to be to be worth anything.
P-17
Webhooks and Callback Architectures
The Stripe model from both sides — signing and replay protection, retry schedules with backoff, receiver-side queue-then-ack, and fan-out to thousands of endpoints.
P-18
Rate Limiting and Quotas
Token bucket, leaky bucket, and sliding window log vs counter — implemented as distributed counters in Redis, with the per-tenant limits P-8 needs.
P-19
Background Jobs and Scheduling
Worker pools, priority queues, retry policy, cron that fires twice, and the long-running task that outlives the request that started it.
P-20
Search Systems
Inverted indexes, tokenisation and analysers, relevance scoring, and the exact point where Postgres full-text search stops being enough.
P-21
Vector Search and Embeddings
Embeddings as coordinates, HNSW vs IVF, the recall-for-latency trade you are silently making, pgvector vs a dedicated store, and hybrid ranking.
P-22
OLTP vs OLAP vs HTAP
Row vs columnar storage, warehouse vs lake vs lakehouse, why one analyst's GROUP BY takes production down, and why a read replica is the wrong fix.
P-23
Change Data Capture
Reading the WAL instead of polling, Debezium in practice, ETL vs ELT, schema evolution downstream, and CDC vs the Outbox pattern.
P-24
Capstone: Design a Payment System
Idempotency end to end, a double-entry ledger, explicit state machines, reconciliation as a first-class service, and UPI-scale throughput.

Phase 3 — Architect

Engine internals · High-throughput systems · Distributed architecture

14 modules
A-1
Consensus, Clocks, and the Ordering Problem
Raft leader election and log replication, quorums and split brain — plus why wall-clock timestamps cannot order events, and what TrueTime buys with atomic hardware.
A-2
Distributed Locks and Coordination
Redlock and its critics, etcd and ZooKeeper, fencing tokens as the actual safety mechanism, and how to design the lock away entirely.
A-3
Distributed Transactions: 2PC, Sagas, and the Outbox
Two-phase commit and its blocking problem, sagas with compensation — and what you do when compensation itself fails and the email has already gone out.
A-4
Microservices vs Monolith
Service boundaries from domain boundaries, the distributed monolith you get when you guess wrong, and the honest list of when not to split.
A-5
Service Discovery and Service Mesh
Registries, client- vs server-side discovery, the sidecar model, and a frank accounting of what a mesh costs in latency and operational surface.
A-6
Timeouts, Retries, and Backoff
Retry storms as self-inflicted DDoS, exponential backoff with jitter, retry budgets, and deadline propagation across a call graph.
A-7
Circuit Breakers, Bulkheads, and Graceful Degradation
Failing fast on purpose, isolating pools so one dependency cannot eat the whole thread budget, and shedding features instead of dropping requests.
A-8
Backpressure and Load Shedding
Queue depth as the earliest honest signal, admission control, and prioritising traffic when there is not enough capacity for all of it.
A-9
Multi-Region Architecture
Active-passive vs active-active, geo-routing, data residency — and ordering concurrent cross-region writes without trusting a wall clock, where last-write-wins is silent data loss.
A-10
Real-Time Systems
Long polling vs SSE vs WebSockets, connection fan-out at a million sockets, presence that is not a lie, and pub/sub that survives a reconnect storm.
A-11
Blob Storage and Media Pipelines
Object storage semantics, pre-signed uploads that keep bytes out of your app tier, transcoding pipelines, and CDN delivery with signed URLs.
A-12
RAG and LLM-Serving Architecture
Chunking and ingestion, retrieval plus rerank, prompt and response caching, tokens as a capacity unit, and designing around a non-deterministic dependency.
A-13
Security by Design
AuthN vs authZ, sessions vs JWT and token rotation, mTLS, secrets handling, and enforcing tenant isolation against the confused-deputy risk in pooled models.
A-14
Capstone: Design a Global News Feed
Fan-out on write vs on read, the celebrity problem, ranking, multi-region reads, and a cache hierarchy that earns its complexity.

Phase 4 — Production & Governance

Running it, funding it, proving it · Observability, migrations, DR, FinOps, compliance

10 modules
O-1
Observability
Metrics vs logs vs traces and what each one costs, cardinality as a budget, distributed tracing, and correlation IDs that actually correlate.
O-2
SLIs, SLOs, and Error Budgets
Choosing indicators users can feel, budget-driven release decisions, and alerting on symptoms instead of causes so the pager means something.
O-3
Infrastructure as Code
Terraform state and drift, immutable infrastructure, and what a Kubernetes StatefulSet does for stateful systems that a Deployment cannot.
O-4
Deploying and Migrating Without Downtime
Blue-green, canary, feature flags, expand/contract migrations — and why the danger on a multi-terabyte table is lock queueing, not the rewrite.
O-5
Load Testing and Capacity Planning
Load vs soak vs spike tests, shadow and replay traffic, finding the knee of the curve, and a headroom target you can defend in a budget meeting.
O-6
Chaos Engineering and Fault Injection
Steady-state hypotheses, blast-radius control, latency and error injection, and GameDays that prove the A-6/A-7 breakers actually fire.
O-7
Disaster Recovery: RTO and RPO
Backup tiers, point-in-time recovery, cold/warm/hot standbys, immutable and air-gapped copies against ransomware, and the rule that an unrestored backup is not a backup.
O-8
FinOps: Cost Architecture
Cost per request and per tenant as design metrics, the egress bandwidth tax, spot and reserved capacity, storage tiering — and when scaling out is just buying past a design flaw.
O-9
Compliance, Privacy, and Data Sovereignty
GDPR, HIPAA, CCPA, and DPDP as design constraints; PII tokenisation and vaulting; and crypto-shredding as the answer to deletion over an immutable log.
O-10
Capstone: The System Design Interview
A repeatable 45-minute framework, plus three worked designs — chat with presence, ride-hailing, and video streaming — with the trade-offs an interviewer actually probes.

© 2026 Jatin Jain Saraf (JJS). All rights reserved.