SYSTEM DESIGN · TRACK 1

Concepts, in the order they make sense

Each level only uses ideas taught before it. Watch the animated episode, read the notes, answer the interview questions, then let the app bring it back for two revisions. All 41 episodes are live.

AHow the web works

What happens between your browser and a server.

  1. 1 What Happens When You Type a URL?Follow one request from your keyboard to a data centre and back: URL, DNS, TCP, TLS, HTTP, load balancers, servers, CDNs and rendering.26 steps · 4 interview Q&As · video
  2. 2 DNS: How the Internet Finds Any WebsiteHow a name like google.com becomes an IP address: resolvers, root, TLD and authoritative servers, caching and TTL, record types, and what goes wrong.23 steps · 6 interview Q&As · video
  3. 3 HTTP vs HTTPS: What the S Really DoesWhat HTTP looks like on the wire, why plain HTTP is readable by anyone on the path, and how HTTPS uses TLS, certificates and keys to keep data private and untampered.21 steps · 6 interview Q&As · video
  4. 4 What Is a Server, Really?A server is a program listening on a port. Processes, threads and event loops, the request lifecycle, stateless vs stateful servers, and scaling up vs scaling out.21 steps · 5 interview Q&As · video
  5. 5 Load Balancers ExplainedWhy one server is not enough, what a load balancer does, the main algorithms, health checks, L4 vs L7, sticky sessions, and how to avoid the load balancer becoming the weak point.20 steps · 5 interview Q&As · video
  6. 6 Reverse Proxy vs Forward ProxyWhat a proxy is, forward vs reverse proxies, everything a reverse proxy does (TLS, caching, compression, routing, rate limiting, security), and how it relates to load balancers and API gateways.18 steps · 5 interview Q&As · video
  7. 7 Nginx ExplainedWhat Nginx is, why its event-driven design handles huge traffic, and a real configuration line by line: static files, HTTPS, redirects, reverse proxy, load balancing, caching, compression and rate limiting.16 steps · 5 interview Q&As · video

BServices and how they talk

APIs, real-time connections, caching, and how a system is split into services.

  1. 8 API Design: REST vs RPC vs GraphQLHow clients talk to a backend: REST resources and HTTP verbs, status codes, RPC and gRPC, GraphQL and the over-fetching problem, pagination with cursors, versioning, and how to sketch an API in a system design interview.11 steps · 8 interview Q&As
  2. 9 Real-Time: WebSockets, Long Polling and SSEHow a server pushes new data to a client: short polling, long polling, server-sent events and WebSockets, how chat apps route a message to the right connection, scaling millions of open connections, and how to pick one in an interview.10 steps · 8 interview Q&As
  3. 10 Latency, Throughput and the Numbers to KnowLatency vs throughput, why averages lie and p99 matters, the rough cost of memory, SSD, network and cross-continent calls, how latency adds up across serial calls, and how to use these numbers in a system design interview.10 steps · 7 interview Q&As
  4. 11 Caching: Where It Lives and What Goes WrongWhy caching makes reads fast, the layers where caches live, cache-aside vs write-through vs write-back, TTLs and invalidation, eviction policies like LRU, and the classic failures: stale data, thundering herd, hot keys and cache stampedes.10 steps · 8 interview Q&As
  5. 12 CDN: How Static Files Get Close to UsersWhat a content delivery network is, edge servers and the origin, cache hits and misses, Cache-Control headers and TTLs, cache keys and versioned file names, invalidation, pull vs push CDNs, what else CDNs do (TLS, DDoS protection, video), and when to use one in a design.10 steps · 7 interview Q&As
  6. 13 Monolith vs Microservices: When to SplitWhat a monolith and microservices really are, why monoliths are the right start, the real reasons teams split (team independence, scaling, failure isolation), the costs (network calls, distributed data, operations), how to draw service boundaries, the modular monolith, and how to talk about it in an interview.10 steps · 7 interview Q&As
  7. 14 Service to Service: Sync vs Async, gRPC, DiscoveryHow services talk to each other: synchronous calls with REST or gRPC, asynchronous events through a queue, the chain-of-calls availability problem, service discovery and client-side load balancing, timeouts and retries, service meshes, and when to choose sync or async in a design.10 steps · 7 interview Q&As
  8. 15 Stateless vs Stateful Services and SessionsWhat state means for a server, why stateless services scale and recover easily, where session state goes instead (sticky sessions, a shared session store, signed tokens), which parts must stay stateful (databases, caches, WebSocket gateways), and how to explain it in an interview.10 steps · 7 interview Q&As

CDatabases

The part of every interview: choosing, indexing, replicating and sharding data.

  1. 16 SQL vs NoSQL: How to ChooseWhat a relational database gives you (tables, joins, transactions), what the four NoSQL families give you (flexible shape, scale by key), the myth that NoSQL is faster, and the four questions that pick the right one in an interview.19 steps · 7 interview Q&As · video
  2. 17 Indexes: Why a Query Is Fast or SlowWhat a database does without an index (a full scan), what a B-tree index is and why it makes lookups logarithmic, composite indexes and column order, covering indexes, the write cost, and how to read EXPLAIN to find the slow query.16 steps · 7 interview Q&As · video
  3. 18 Transactions, ACID and Isolation LevelsWhat a transaction promises (atomic, consistent, isolated, durable), how the database keeps those promises with a write-ahead log and locks or MVCC, the four isolation levels and the anomalies each one allows, and the two rules that keep transactions safe at scale.17 steps · 7 interview Q&As · video
  4. 19 Schema Design: Normalise or DenormaliseHow to turn a product into tables: entities and relationships, primary and foreign keys, one-to-many and many-to-many with join tables, what normalisation protects you from, when to denormalise on purpose (read-heavy feeds, counters, caches), and the five-step way to design a schema in an interview.17 steps · 7 interview Q&As · video
  5. 20 Replication: Leader-Follower, Multi-Leader, LeaderlessWhy one database becomes several copies, how leader-follower replication streams the write-ahead log, synchronous vs asynchronous followers, replication lag and the read-your-own-writes problem, failover and split brain, when multi-leader and leaderless (quorum) replication fit, and how to say it in an interview.17 steps · 7 interview Q&As · video
  6. 21 Sharding and PartitioningWhen one database is too big rather than too slow: vertical vs horizontal partitioning, choosing a shard key, range vs hash sharding and the hot-spot trap, how a request finds its shard, what breaks (cross-shard joins, transactions, resharding), and the interview answer.15 steps · 8 interview Q&As · video
  7. 22 Consistent HashingWhy hash(key) % N falls apart the moment you add a server, the hash ring that fixes it, how a key finds its node, virtual nodes for balance, and where it runs today: caches, Cassandra, DynamoDB, load balancers.13 steps · 8 interview Q&As · video
  8. 23 Storage Engines: B-Tree vs LSM TreeWhat a database actually does with a row: the write-ahead log, B-tree pages that update in place, LSM trees that append and compact, read vs write amplification, and which engine sits under PostgreSQL, MySQL, Cassandra and RocksDB.12 steps · 8 interview Q&As · video
  9. 24 Database Types Tour: Key-Value to Time-SeriesRelational, key-value, document, wide-column, graph, time-series and search: what each one is built around, the query it makes cheap, real products, and how to pick one (or three) for a system design answer.11 steps · 8 interview Q&As · video

DDistributed systems

What changes when data lives on many machines.

  1. 25 CAP and PACELC in Plain WordsWhat CAP actually says: during a network partition you choose consistency or availability. CP vs AP systems with real examples, why "pick two of three" is misleading, PACELC for the normal case, and how to answer the interview question.12 steps · 8 interview Q&As · video
  2. 26 Consistency Models: Strong, Eventual, Read-Your-WritesWhat a read is allowed to return when data has several copies: strong (linearizable) consistency, eventual consistency, and the session guarantees in between (read-your-writes, monotonic reads, consistent prefix), with the bugs each one prevents and how to pick per feature.12 steps · 8 interview Q&As · video
  3. 27 Quorum Reads and WritesHow leaderless databases like Cassandra and DynamoDB stay consistent without a leader: N replicas, W write acks, R read responses, why R + W > N means a read always overlaps the latest write, tuning for reads or writes, read repair, hinted handoff and the edge cases quorums do not cover.12 steps · 8 interview Q&As · video
  4. 28 Message Queues and Pub-SubWhy services hand work to a queue instead of calling each other directly: decoupling, buffering spikes and retries. Work queues vs pub-sub, Kafka-style logs with partitions, offsets and consumer groups, delivery guarantees (at-most-once, at-least-once, effectively once), ordering, and dead-letter queues.12 steps · 8 interview Q&As · video
  5. 29 Idempotency and RetriesWhy retries cause double charges and duplicate orders, what idempotent means, which HTTP methods are idempotent, idempotency keys stored with the result, making queue consumers safe with dedup tables and upserts, and retrying well with timeouts, exponential backoff and jitter.11 steps · 8 interview Q&As · video
  6. 30 Rate Limiting AlgorithmsWhy APIs limit requests, where the limiter sits, and the four algorithms interviewers expect: fixed window, sliding window log, sliding window counter and token bucket (plus leaky bucket), with their trade-offs, a Redis implementation for many servers, and the 429 response with Retry-After.12 steps · 8 interview Q&As · video
  7. 31 Distributed Locks and Leader ElectionHow several servers agree that only one of them does something: why a local mutex is not enough, locks with leases and TTLs, why a paused process can still corrupt data, fencing tokens, leader election with ZooKeeper or etcd, the Redis lock debate, and when to avoid locks altogether.11 steps · 8 interview Q&As · video
  8. 32 Clocks, Ordering and Unique IDsWhy server clocks disagree and what that breaks, last-write-wins losing data, logical clocks (Lamport timestamps) and vector clocks for ordering and detecting conflicts, and how to generate unique IDs at scale: auto-increment, UUIDs, ULID / UUIDv7 and Twitter-style Snowflake IDs.11 steps · 8 interview Q&As · video
  9. 33 Distributed Transactions: 2PC, Sagas, OutboxWhy one transaction cannot span several services and databases, two-phase commit and its blocking problem, sagas with compensating actions, orchestration vs choreography, the dual-write problem and the transactional outbox, and how to answer "what if payment fails after the order is created?"10 steps · 8 interview Q&As · video
  10. 34 Consensus: Raft and Paxos in Plain WordsWhat consensus means, why a replicated log needs it, how Raft elects a leader with terms and majority votes, how it replicates and commits log entries, what happens in a network split, why clusters have 3 or 5 nodes, where Paxos fits, and which systems use consensus (etcd, ZooKeeper, Kafka KRaft, Spanner).10 steps · 8 interview Q&As · video

ERunning it in production

Keeping a system up, observable and safe.

  1. 35 Availability, SLAs and the NinesWhat availability means, the nines and how much downtime each allows, SLI vs SLO vs SLA and error budgets, how serial and redundant components combine, removing single points of failure, active-passive vs active-active, multi-zone and multi-region designs, and how to talk about availability in an interview.10 steps · 8 interview Q&As · video
  2. 36 Back-of-the-Envelope EstimationHow to estimate scale in a system design interview: daily active users to requests per second, peak factor, read/write ratio, storage per year, bandwidth, cache size and number of servers, with handy round numbers and a worked example for a photo-sharing app.10 steps · 7 interview Q&As · video
  3. 37 Observability: Logs, Metrics, TracesHow you find out what a production system is doing: metrics and the four golden signals, structured logs with request ids, distributed tracing with spans, alerting on SLO symptoms instead of causes, dashboards, and how to describe monitoring in a system design interview.10 steps · 8 interview Q&As · video
  4. 38 Security: Auth, OAuth, JWT, EncryptionThe security basics every system design needs: authentication vs authorisation, storing passwords with slow hashes, sessions vs JWT access and refresh tokens, OAuth 2.0 and "Sign in with Google", encryption in transit and at rest, secrets management, least privilege, and common attacks with their defences.10 steps · 8 interview Q&As · video
  5. 39 Deploying and Scaling: Containers, Autoscaling, CanaryHow code gets to production safely and how a fleet grows with traffic: containers and images, Kubernetes basics, CI/CD pipelines, rolling, blue-green and canary deployments, feature flags, database migrations without downtime, horizontal autoscaling and its limits, and how to describe it in an interview.10 steps · 7 interview Q&As · video
  6. 40 Failure Handling: Timeouts, Circuit Breakers, BackpressureHow to stop one slow dependency from taking down a whole system: cascading failures, timeouts and deadlines, retries with backoff, circuit breakers and their three states, bulkheads, load shedding and backpressure, fallbacks and graceful degradation, and chaos testing.10 steps · 8 interview Q&As · video
  7. 41 Batch vs Stream Processing BasicsTwo ways to process large amounts of data: batch jobs over stored data (MapReduce, Spark, data warehouses) and stream processing over events as they arrive (Kafka, Flink), windows and event time vs processing time, exactly-once and late events, lambda vs kappa architectures, and how to choose in a design.10 steps · 8 interview Q&As · video

After the concepts

Technologies, building blocks, patterns and the design problems themselves follow this track. See the full path.

The System Design path →