System design, one building block at a time
The questions on this site are drills; these guides are the theory behind them. Each one covers a topic the way you would explain it in an interview: what it is for, the realistic options, the numbers, and the sentence to say. Read them in order the first time, then use them as a reference while practising. Some ideas are easier to play with than to read about: those have an interactive concept with a playground.
- 01How to run a system design interviewA minute-by-minute framework for the 45-minute system design interview: scoping, numbers, high-level design, deep dives, and what senior and staff interviewers are actually grading.
- 02Functional vs non-functional requirements in system designHow to write the requirements in a system design interview: functional vs non-functional requirements with examples, how to put a number on each, typical targets for chats, feeds, payments, video and search, the clarifying questions to ask, and the mistakes that cost candidates the first five minutes.
- 03Common system design interview mistakesThe mistakes that cost candidates system design interviews and how to avoid them: skipping requirements, designing before estimating, buzzword architecture, ignoring the data model, no trade-offs, missing failure modes, poor time management and not driving the conversation.
- 04How to practice system design interviews with ChatGPTA copy-paste prompt that turns ChatGPT (or Claude or Gemini) into a system design interviewer, how to run a 45-minute round with it, a debrief rubric, and the four places it falls short with a fix for each.
- 05What interviewers expect at mid, senior and staff levelsHow system design interviews are graded at different levels: what mid-level, senior and staff candidates are expected to show in scoping, depth, trade-offs, failure handling and leadership of the conversation, with examples of the same question answered at each level.
- 06Meta product architecture vs system design interviewThe two design rounds in Meta's software engineer loop compared: what product architecture asks for (APIs, data model, client and server) against system design (backend scale and failure), which one you get, example prompts for each, and how to prepare.
- 07High-level design vs low-level design interviews (HLD vs LLD)What a high-level design round asks (architecture, scale, trade-offs) against a low-level design or machine coding round (classes, interfaces, patterns, working code), example questions for each, how they are graded, and how to prepare for both.
- 08System design patterns cheat sheetA one-page map of the patterns that solve recurring system design problems: scaling reads and writes, consistency, reliability, messaging, data processing, real-time, search and geo, security and operations, each with a one-line use and a link to the full guide.
- 09Conway's law and team boundariesHow organisations shape architecture and why staff-level interviews care: Conway's law, aligning services with teams and domains, ownership and on-call, platform teams, contracts between teams, the cost of coordination, and how to discuss team structure in a system design interview.
- 10The best system design books and papers for interviewsThe books worth reading for system design interviews and what each is for (Designing Data-Intensive Applications, Alex Xu's System Design Interview, Understanding Distributed Systems, Database Internals and more), the dozen papers behind the classic questions, and the order to read them in.
- 11Back-of-envelope estimationThe numbers to memorise for system design interviews (latency, throughput, storage, powers of two) and a repeatable method to estimate QPS, storage and bandwidth in under five minutes.
- 12Back-of-envelope estimation, worked examplesFive complete capacity estimates for classic interview questions: a URL shortener, a chat app, a video platform, a news feed and a metrics system, with traffic, storage, bandwidth and server counts, and what each number means for the design.
- 13Latency numbers every engineer should knowThe approximate costs of memory access, disk and SSD reads, network round trips within a data centre and across continents, serialization, database queries and cache hits, with what each implies for system design and how to use them in back-of-envelope estimates.
- 14Queueing theory and capacity planningThe few queueing ideas every system designer should know: Little's law, utilisation and why latency explodes near 100 %, headroom, concurrency limits, sizing thread pools, connection pools and worker fleets, and planning capacity for peaks and failures.
- 15Scalability fundamentalsVertical vs horizontal scaling, stateless services, the standard web architecture, and how to reason about which tier breaks first.
- 16Stateful vs stateless servicesWhy stateless services scale and recover easily, where state has to live instead (databases, caches, sessions, object storage), and how to run genuinely stateful services such as WebSocket gateways, game servers, caches and stream processors with sticky routing, partitioning, replication and draining.
- 17What happens when you type a URLThe classic interview question answered end to end: URL parsing, browser and DNS caches, DNS resolution, TCP and TLS handshakes, HTTP/2 and HTTP/3, CDNs and load balancers, application servers, databases and caches, the response, and rendering, with what to emphasise for system design.
- 18Networking for system designDNS, TCP and UDP, HTTP/1.1 versus HTTP/2 and HTTP/3, TLS, proxies and reverse proxies, and the latency numbers behind them, at the depth a system design interview expects.
- 19Global traffic management, DNS and anycastHow users reach the nearest healthy region: DNS resolution and TTLs, GeoDNS and latency-based routing, anycast, global load balancers, health checks and failover, the limits of DNS-based failover, and steering traffic during incidents and migrations.
- 20Tail latency, percentiles and queueingWhy p99 matters more than the average, how fan-out amplifies tail latency, Little's law and queueing near full utilisation, hedged requests, timeouts and deadlines, and how to set and measure latency budgets.
- 21Designing read-heavy vs write-heavy systemsHow the read/write ratio shapes a design: caching, replicas, denormalisation and CDNs for read-heavy systems; log-structured storage, batching, partitioning, queues and asynchronous processing for write-heavy ones; and the patterns for systems that are heavy on both.
- 22Compression in system designWhere compression saves money and latency: HTTP compression with gzip, Brotli and Zstandard, compression in Kafka and databases, columnar and time-series encodings, images and video codecs, ratio versus speed trade-offs, dictionary compression, and when compression hurts.
- 23Load balancingLayer 4 vs layer 7 load balancers, routing algorithms, health checks, sticky sessions, global load balancing and how to talk about them in a system design interview.
- 24Autoscaling and capacity planningHorizontal versus vertical scaling, what to autoscale on, why autoscaling is too slow for spikes, warm pools and pre-scaling, serverless trade-offs, headroom, and how to plan capacity from numbers.
- 25Kubernetes for system design interviewsThe Kubernetes concepts that come up in system design: pods, deployments, services and ingress, autoscaling of pods and nodes, health probes, resource requests and limits, stateful sets, jobs, rolling updates, multi-zone scheduling, and what Kubernetes does not solve for you.
- 26Serverless architectureWhen functions as a service fit a design and when they do not: event-driven triggers, scaling to zero and to thousands, cold starts, execution limits, state and connections, cost at low and high volume, managed building blocks, and common serverless patterns.
- 27CachingWhere to cache (browser, CDN, application, database), cache-aside vs write-through vs write-back, eviction policies, invalidation, hot keys, thundering herds and cache stampedes.
- 28Cache invalidation strategiesKeeping caches correct when data changes: TTLs, delete on write, write-through and write-behind, the race conditions that leave stale data, versioned keys, invalidation from change data capture, leases against stampedes, and multi-layer caches.
- 29Redis data structures and patternsThe Redis building blocks that appear in system designs: strings and counters, hashes, lists, sets, sorted sets for leaderboards and delayed queues, HyperLogLog, geospatial indexes, streams and pub/sub, Lua scripts, persistence, clustering and pitfalls.
- 30Skip lists and sorted setsHow Redis sorted sets and other ordered in-memory structures work: skip lists versus balanced trees, operations and complexity, ranking with ZRANK, range queries by score and lexicographic order, memory costs, and using sorted sets for leaderboards, rate limiters, time-ordered feeds and scheduling.
- 31Redis vs MemcachedChoosing an in-memory store: Redis and Memcached compared on data structures, threading, persistence, replication, clustering, eviction, memory efficiency and operations, with guidance on when a plain cache is enough and when you need Redis features.
- 32CDNs and edge computingHow a content delivery network works, push vs pull, cache keys and TTLs, what to put at the edge, edge functions and KV, and the pitfalls of caching dynamic content.
- 33HTTP caching and cache headersHow browsers, CDNs and proxies decide what to cache: Cache-Control directives, max-age and s-maxage, ETags and conditional requests, immutable assets with fingerprinted URLs, stale-while-revalidate, Vary, private versus shared caches, and purging.
- 34Edge computingRunning code and data close to users: edge functions at CDN locations, use cases such as auth, routing, personalisation and A/B assignment, edge key-value stores and their consistency, latency gains and limits, data residency, and what should stay in the origin region.
- 35Object storage and large filesBlob storage, pre-signed uploads, chunking and resumable transfer, multipart, erasure coding, storage tiers and lifecycle, plus how media pipelines are structured.
- 36Distributed file systems and erasure codingHow huge files are stored across thousands of disks: the GFS and HDFS design with a metadata master and chunk servers, chunk sizes and replication, write pipelines, metadata scaling, object storage internals, and erasure coding versus replication for durability and cost.
- 37Storing billions of small files (Haystack)Why file systems struggle with billions of small photos and how Facebook's Haystack solved it: metadata overhead, packing files into large volumes, in-memory indexes, needle lookups in one disk read, deletes and compaction, warm storage with erasure coding, and lessons for photo and attachment storage.
- 38Delta sync and content-defined chunkingHow file sync and backup tools transfer only what changed: fixed-size versus content-defined chunking with rolling hashes, the rsync algorithm, chunk indexes and deduplication, block-level sync for large files, compression, metadata sync, and conflict handling.
- 39Media uploads and processing pipelinesHow photo and video uploads work at scale: direct-to-storage uploads with presigned URLs, resumable and chunked uploads, processing pipelines for thumbnails and transcoding, metadata and status tracking, deduplication, moderation hooks and serving variants through a CDN.
- 40Video streaming: transcoding, HLS, DASH and adaptive bitrateHow online video works end to end: uploads, transcoding into a bitrate ladder, segmenting for HLS and DASH, adaptive bitrate in the player, CDN delivery, live versus on-demand, and the numbers behind it.
- 41Live video streamingHow live streams reach millions of viewers: ingest with RTMP, SRT or WebRTC, real-time transcoding, segmenting for HLS and DASH, low-latency HLS, CDN fan-out, WebRTC for interactive streams, latency trade-offs, live chat at scale, recording and reliability.
- 42Video calls and WebRTCHow Zoom-style video calling works: WebRTC media and signaling, NAT traversal with STUN and TURN, peer-to-peer versus SFU versus MCU, simulcast and adaptive quality, scaling large meetings with cascaded SFUs, recording, latency budgets and reliability.
- 43Distributing software updates at scaleHow apps, games, devices and package managers deliver updates to millions of clients: update manifests and version checks, CDN and peer-assisted delivery, delta patches, signing and integrity, staged rollouts and kill switches, rollback, bandwidth peaks on release day, and offline or constrained devices.
- 44Choosing a databaseRelational vs document vs wide-column vs key-value vs graph vs search vs time-series; how to pick storage from the access pattern, design keys and indexes, and answer "why not Postgres?".
- 45Document databases and MongoDB-style modellingWhen document stores fit and how to model them: documents and collections, embedding versus referencing, designing for access patterns, unbounded arrays, indexes, sharding and shard keys, transactions and consistency options, schema validation and common pitfalls.
- 46Database indexing: B-trees, LSM trees and secondary indexesHow database indexes work, B-tree versus LSM-tree storage engines, composite and covering indexes, secondary indexes on sharded data, and the trade-offs between read speed, write speed and space.
- 47Storage engines, write-ahead logs and durabilityWhat happens inside a database when you write: write-ahead logs and fsync, B-trees versus LSM trees, memtables, SSTables and compaction, read, write and space amplification, group commit, checkpoints and crash recovery.
- 48Transactions, isolation levels and lockingACID explained for interviews, the anomalies each isolation level allows, MVCC, optimistic versus pessimistic concurrency control, and how to stop double bookings and lost updates.
- 49ACID vs BASEThe two philosophies of data consistency compared: ACID transactions (atomicity, consistency, isolation, durability) versus BASE (basically available, soft state, eventual consistency), what each guarantees, the databases that follow them, and how real systems combine both.
- 50Optimistic vs pessimistic lockingTwo ways to stop concurrent updates from overwriting each other: pessimistic locks with SELECT FOR UPDATE, optimistic concurrency with version numbers and compare-and-set, lost updates, deadlocks, retries, contention levels, HTTP ETags, and which to use for bookings, inventory, documents and counters.
- 51Scaling a relational databaseHow far one Postgres or MySQL database goes and how to stretch it: query and index tuning, connection pooling, read replicas and lag, caching, partitioning tables, vacuum and bloat, vertical scaling, splitting by function, and when to shard or move to a distributed SQL database.
- 52Online schema migrations and data backfillsChanging database schemas and moving data without downtime: expand and contract, why ALTER TABLE can lock production, online schema change tools, backfills in batches, dual writes with verification, and migrating to a new database.
- 53Database normalization for system designNormal forms in practical terms: why normalize, first, second and third normal form with examples, anomalies that normalization prevents, when and how to denormalize deliberately, and how to present a schema in a system design interview.
- 54Data modelling for readsModelling from access patterns rather than entities: denormalisation, precomputed views, fan-out on write versus read, and the write amplification each choice buys you.
- 55Data modelling for Cassandra and DynamoDBHow to design tables for wide-column and key-value stores: query-first modelling, partition keys and sort keys, one table per query versus single-table design, time-bucketed partitions, secondary indexes, avoiding hot and huge partitions, and consistency options.
- 56Storing and querying graphsSocial graphs and other graph data in system design: adjacency lists in a key-value store, graph databases, friends-of-friends and mutual friends, celebrity nodes, sharding a graph, and what Facebook's TAO does.
- 57Large-scale graph processingRunning algorithms over graphs with billions of edges: the Pregel vertex-centric model, PageRank, connected components, friend-of-friend recommendations, partitioning graphs, offline batch versus online queries, incremental updates, and where graph processing appears in system design.
- 58Modelling comments and nested threadsStoring and serving comment threads at scale: flat versus nested comments, adjacency lists, materialized paths, nested sets and closure tables, loading trees efficiently, sorting by top, new and controversial, pagination of deep threads, counts, edits and deletions, and caching hot threads.
- 59Sharding and partitioningHorizontal partitioning strategies (range, hash, directory), consistent hashing, choosing a shard key, hot shards, cross-shard queries, and resharding without downtime.
- 60Consistent hashingWhy hash mod N breaks when nodes change, how a hash ring with virtual nodes fixes it, replication on the ring, rendezvous hashing and jump hash, fixed slots, and handling hot keys.
- 61Hot keys, hot partitions and data skewWhy real traffic is never uniform, how a single hot key or partition takes down a sharded system, and the fixes: key splitting, local caching, request coalescing, write buffering, salting, adaptive rebalancing, and skew in joins and stream processing.
- 62Geospatial indexing and proximity searchGeohash, S2 and quadtrees, nearest-neighbour and radius queries, indexing moving objects, map tiles, and the accuracy and hot-cell problems that come with each.
- 63Geohash vs quadtree vs S2 vs H3Comparing spatial indexes for proximity search: geohashes, quadtrees, Google S2 and Uber H3, plus R-trees in databases. How each divides the map, handles neighbours and density, fits in a key-value store, and which to pick for nearby search, ride matching and heat maps.
- 64Routing and shortest paths at scaleHow maps and delivery apps compute routes on graphs with hundreds of millions of edges: Dijkstra and A*, why they are too slow alone, contraction hierarchies and precomputation, live traffic, ETA prediction, partitioning the road graph and map matching.
- 65Geocoding and place searchTurning addresses and place names into coordinates and back: address parsing and normalisation, forward and reverse geocoding, gazetteers and place databases, autocomplete for places, ranking by relevance, distance and popularity, handling ambiguity and languages, and caching and freshness.
- 66Location tracking at scaleIngesting and serving live GPS locations for drivers, couriers and devices: update frequency and battery, the ingest path, latest-location stores versus history, geospatial indexing of moving objects, sharing a live location with riders, map matching, geofencing, privacy and retention.
- 67Dispatch and marketplace matchingHow ride-hailing, delivery and services marketplaces assign supply to demand: location indexing, candidate selection by ETA, greedy versus batched matching, offers and acceptance timeouts, preventing double assignment, batching orders, and the metrics that matter.
- 68Surge and dynamic pricing systemsHow marketplaces adjust prices in real time: measuring supply and demand per area, computing multipliers in a stream, smoothing and caps, price quotes and locking, fairness and regulation, and experimenting with pricing.
- 69Replication and consistencyLeader-follower, multi-leader and leaderless replication; synchronous vs asynchronous; quorums; CAP and PACELC; consistency models from eventual to linearizable; read-your-writes and failover.
- 70Consistency models: strong vs eventual and everything betweenWhat consistency guarantees actually mean: linearizability, serializability, sequential and causal consistency, read-your-writes, monotonic reads, bounded staleness and eventual consistency, with examples of which product features need which, and what each costs.
- 71Quorums and leaderless replicationHow Dynamo-style databases replicate without a leader: N, W and R quorums, what quorum overlap guarantees and what it does not, sloppy quorums and hinted handoff, read repair, anti-entropy with Merkle trees, conflict handling with vector clocks or last-writer-wins.
- 72Merkle treesHow hash trees let systems compare and verify large datasets cheaply: structure and root hashes, finding differences between replicas, proofs of inclusion, uses in databases' anti-entropy, file sync, Git, certificate transparency, blockchains and audit logs, and design choices for building them.
- 73The CAP theorem and PACELCWhat CAP actually says, why "pick two of three" is misleading, PACELC and the latency trade-off you face every day, where real databases sit, and how to use it in an interview without hand-waving.
- 74Search, indexing and autocompleteInverted indexes, analysis and ranking, prefix search with tries, filtering by permissions, index freshness, and when vector search actually belongs in the answer.
- 75How Elasticsearch worksElasticsearch and OpenSearch internals for system design: inverted indexes and analyzers, Lucene segments, refresh and near real-time search, shards and replicas, scatter-gather queries, relevance scoring with BM25, indexing pipelines and common scaling mistakes.
- 76Search ranking and relevanceHow search results are ordered: retrieval then ranking, text relevance with BM25, business and personal signals, learning to rank, semantic and hybrid search, query understanding, evaluation with NDCG and click metrics, and serving ranking within a latency budget.
- 77Web search engine architectureHow a Google-style web search engine fits together: crawling, document processing, building inverted indexes, document-partitioned versus term-partitioned indexes, tiered indexes, query serving with scatter-gather, ranking signals including links, freshness, caching and the numbers involved.
- 78Tries and autocompleteHow search-as-you-type works at scale: tries and prefix indexes, precomputed top-K suggestions per prefix, ranking by popularity and personalisation, building from query logs, fuzzy matching, latency budgets and client-side tricks.
- 79Bloom filters, HyperLogLog and count-min sketchProbabilistic data structures for system design interviews: Bloom filters for membership, HyperLogLog for counting distinct items, count-min sketch for frequencies and heavy hitters, with sizes, error rates and where each is used.
- 80Bloom filters explainedA deep dive on Bloom filters: how bits and hash functions give "definitely not" or "probably yes", sizing with the false positive formula, choosing the number of hashes, deletions with counting filters, cuckoo and xor filters, distributed and scalable variants, and where they appear in databases, caches, crawlers and CDNs.
- 81Vector search, embeddings and RAGEmbeddings and similarity, approximate nearest-neighbour indexes (HNSW, IVF, product quantisation), vector databases versus adding vectors to your existing store, hybrid search, and retrieval-augmented generation (RAG) pipelines end to end.
- 82Approximate nearest neighbour indexes (HNSW, IVF, PQ)How vector databases find similar embeddings fast: why exact search does not scale, HNSW graphs, IVF clustering, product quantisation and other compression, the recall versus latency versus memory trade-off, filtering, updates and deletes, sharding, and choosing parameters.
- 83Consensus, leases and coordinationLeader election, Raft and Paxos at interview depth, ZooKeeper and etcd, distributed locks and why they are fencing tokens, plus how to avoid needing coordination at all.
- 84How Raft consensus worksRaft explained for system design interviews: replicated state machines, leader election with terms and randomised timeouts, log replication and commit rules, safety, membership changes, snapshots, read consistency and where Raft is used in practice.
- 85Gossip protocols and failure detectionHow large clusters know who is alive without a central coordinator: heartbeats and timeouts, phi accrual failure detectors, gossip dissemination and SWIM, membership changes, split brain, and how these show up in databases, caches and service discovery.
- 86Spanner, TrueTime and distributed SQLHow globally distributed SQL databases work: ranges replicated with Paxos or Raft, distributed transactions with two-phase commit, Spanner's TrueTime and commit wait, hybrid logical clocks in CockroachDB and YugabyteDB, latency costs, data placement, and when to use them.
- 87Distributed locks, leases and fencing tokensWhen you need mutual exclusion across machines and how to get it safely: lock services, leases with expiry, why Redis locks can fail, fencing tokens, leader election, optimistic alternatives, and avoiding locks altogether.
- 88Multi-region architectureWhy and when to run in several regions, active-passive versus active-active, routing users to a region, replicating data across regions, conflict handling, failover and evacuation, and data residency rules.
- 89Active-active vs active-passiveHigh-availability topologies compared: active-passive with hot, warm and cold standbys, active-active within and across regions, failover detection and promotion, split brain and fencing, write conflicts, RTO and RPO, cost, and how to choose for databases, services and whole regions.
- 90Cell-based architectureLimiting the blast radius of failures and bad deploys by splitting a system into independent cells: what a cell contains, routing customers to cells, sizing and placement, cell migration, shared global services, deployment by waves, and the costs of running many copies of a system.
- 91Message queues and event streamsWhen to go asynchronous, queues vs logs (SQS, RabbitMQ vs Kafka), delivery guarantees, ordering, consumer groups, dead-letter queues, backpressure, and the outbox pattern.
- 92How Kafka worksKafka's internals for system design interviews: topics, partitions and the append-only log, segments and indexes, replication with leaders and in-sync replicas, acks and durability, consumer groups and offsets, retention and compaction, ordering and throughput.
- 93Kafka vs RabbitMQ vs SQSChoosing a messaging system: Kafka, RabbitMQ and Amazon SQS compared on model, ordering, replay, throughput, routing, delivery guarantees, delays and dead letters, operations and cost, with guidance on when to use a log, a broker or a managed queue.
- 94Synchronous vs asynchronous communicationWhen services should call each other directly and when they should communicate through queues and events: latency, coupling, availability, consistency and debugging trade-offs, request-reply over queues, the 202 Accepted pattern, and how to split a user flow into sync and async parts.
- 95Event-driven architectureDesigning systems around events: events versus commands, notification events versus event-carried state transfer, topics and schemas, choreography, eventual consistency, idempotent consumers, ordering, replay, event storming, and the pitfalls that make event-driven systems hard to operate.
- 96At-most-once, at-least-once and exactly-once deliveryWhat message delivery guarantees really mean: why exactly-once delivery is impossible over a network but exactly-once processing is achievable, acknowledgements and retries, idempotent consumers, deduplication, transactional processing in Kafka, and ordering.
- 97Event sourcing, CQRS and change data captureStoring events instead of state, separating write and read models (CQRS), keeping read models in sync with change data capture and the transactional outbox, and when these patterns are worth their complexity.
- 98Change data capture and the outbox patternKeeping caches, search indexes, warehouses and other services in sync with a database: dual writes and why they fail, log-based change data capture with Debezium, the transactional outbox, ordering, backfills, schema changes and delete handling.
- 99Background jobs and task queuesMoving slow work off the request path, task queues and workers, retries with backoff, dead-letter queues, idempotent jobs, priorities, scheduled and delayed jobs, and how to keep a job system healthy.
- 100Delayed jobs, timers and distributed cronRunning work at a specific time across a cluster: cron at scale, delayed queues, time-bucketed tables, timing wheels, leader election and partitioned schedulers, exactly-once firing, time zones, missed runs and backfills.
- 101Workflow orchestration and durable executionRunning multi-step processes reliably: choreography versus orchestration, durable execution engines like Temporal, state machines, retries and timeouts per step, compensation, long waits and human steps, data pipeline schedulers like Airflow, and versioning running workflows.
- 102Batch and stream processingStream versus batch, windowing and watermarks, late and out-of-order data, exactly-once counting, approximate algorithms, and the lambda/kappa argument in one paragraph.
- 103Lambda vs Kappa architectureTwo designs for combining real-time and historical data processing: Lambda with separate batch and speed layers merged at query time, Kappa with a single replayable stream, their trade-offs in correctness, complexity and cost, and how modern stream processors and lakehouses changed the choice.
- 104MapReduce and SparkHow large-scale batch processing works: the MapReduce model of map, shuffle and reduce, combiners, fault tolerance by re-execution, why Spark replaced it with in-memory DAGs, partitions and shuffles, joins and skew, and when batch jobs appear in system designs.
- 105Windowing, event time and watermarksAggregating streams correctly: event time versus processing time, tumbling, sliding and session windows, late and out-of-order events, watermarks and allowed lateness, triggers and updates, state size, and stream joins.
- 106Web crawling at scaleHow large crawlers fetch billions of pages: the URL frontier, politeness per host, prioritisation and recrawl scheduling, DNS and fetching, URL normalisation and deduplication, content fingerprints, robots.txt, traps and distributing the crawl.
- 107OLTP versus OLAP: analytics, columnar storage and data warehousesWhy analytics needs a different store from your application database, row versus columnar storage, data warehouses and lakes, star schemas, pre-aggregation and rollups, and real-time analytics with ClickHouse or Druid.
- 108Dimensional modelling and star schemasHow analytics data is modelled for reporting: facts and dimensions, star and snowflake schemas, grain, slowly changing dimensions, conformed dimensions, wide denormalised tables, pre-aggregations, and how these choices make dashboards fast and numbers consistent.
- 109Data lakes, warehouses and lakehousesWhere analytical data lives: data warehouses versus data lakes, columnar files like Parquet, table formats such as Iceberg and Delta Lake, partitioning and file sizing, ingestion with ELT, medallion layers, query engines, governance and cost.
- 110Data quality and data contractsKeeping data pipelines trustworthy: common failure modes, data contracts between producers and consumers, schema and semantic validation, freshness, volume and distribution checks, quarantining bad records, lineage, backfills, and alerting on data like you alert on services.
- 111Recommendation systemsHow large recommendation systems are built: candidate generation, ranking and re-ranking, embeddings and two-tower models, features and feature stores, offline and online serving, feedback loops, cold start, and how to evaluate them.
- 112Feature stores and serving machine learning modelsThe infrastructure behind production machine learning: offline and online feature stores, training-serving skew, point-in-time correct training data, real-time features from streams, model serving with latency budgets, batching, shadow and canary deployments, and monitoring drift.
- 113Multi-armed bandits and explorationLearning what works while serving users: the explore-exploit trade-off, epsilon-greedy, upper confidence bounds and Thompson sampling, contextual bandits, bandits versus A/B tests, uses in ranking, notifications, pricing and creative selection, logging for off-policy evaluation, and pitfalls.
- 114Voting and ranking algorithmsHow Reddit, Hacker News and review sites rank content: raw scores and their problems, time decay and hot ranking, the Wilson score lower bound for ratings, Bayesian averages for star ratings, controversy scores, vote manipulation defences, and computing rankings efficiently at scale.
- 115Ad serving and real-time auctionsHow an ad system picks and serves an ad in under 100 ms: targeting and candidate retrieval, click prediction, auctions and pricing, budgets and pacing, frequency caps, impression and click tracking, fraud filtering and billing-grade counting.
- 116Time-series dataStoring and querying time-series data such as metrics, sensor readings, prices and events: write patterns, time-partitioning, compression, downsampling and retention, and choosing between time-series databases, wide-column stores and OLAP engines.
- 117Counting at scaleHow to count likes, views, clicks and unique visitors at high volume: exact versus approximate counts, sharded counters, batching through streams, idempotent counting, HyperLogLog for uniques, windowed counts and reconciliation.
- 118API designREST vs gRPC vs GraphQL, resource modelling, pagination (offset vs cursor), idempotency keys, versioning, error handling, authentication, and rate limiting in system design interviews.
- 119REST vs gRPC vs GraphQLChoosing an API style: REST, gRPC and GraphQL compared on data format, performance, typing, caching, streaming, browser support, versioning and tooling, with typical uses for public APIs, internal service calls and client-driven data fetching.
- 120API gateways and backends for frontendsWhat an API gateway does at the edge of a system: routing, authentication, rate limiting, request transformation and aggregation, the backend-for-frontend pattern, GraphQL gateways, and how to keep the gateway from becoming a bottleneck or a monolith.
- 121Serialization formats and schema evolutionChoosing how data is encoded on the wire and in storage (JSON, Protocol Buffers, Avro, Thrift), forward and backward compatibility, rules for evolving schemas safely, schema registries, and versioning APIs and events.
- 122Pagination: offset, cursor and keysetWhy OFFSET pagination gets slow and skips items, cursor and keyset pagination done right, opaque cursors, sorting by score, pagination over sharded data and feeds, and what to return to clients.
- 123Bulk imports and exportsDesigning features that move large amounts of data in and out of a system: CSV and file uploads processed as background jobs, validation and partial failures, idempotent resumable imports, throttling to protect production, streaming exports, presigned download links, scheduled and incremental exports, and APIs for bulk operations.
- 124Designing webhooksHow to deliver webhooks reliably: event payloads, signing and verification, retries with backoff, ordering, idempotency on the receiver, per-customer isolation, and replay, as Stripe and GitHub do it.
- 125Microservices, service discovery and API gatewaysMonolith versus microservices and when to split, service discovery, API gateways and backends for frontends, synchronous versus asynchronous communication, service meshes, and the failure modes that come with a distributed system.
- 126Migrating legacy systems with the strangler fig patternHow to replace a monolith or legacy system without a big-bang rewrite: the strangler fig pattern, routing facades, extracting services by capability, data migration and synchronisation, dual running and shadow traffic, anti-corruption layers, and deciding what to migrate first.
- 127Service discovery and service meshHow services find and talk to each other in a dynamic fleet: DNS and registries, client-side versus server-side discovery, health checks, sidecar proxies, what a service mesh adds (mTLS, retries, traffic shifting, telemetry) and when it is worth the cost.
- 128Multi-tenancyDesigning SaaS systems that serve many customers from shared infrastructure: tenancy models from shared tables to dedicated stacks, tenant isolation for data and security, noisy neighbours, per-tenant limits, cells, enterprise requirements and tenant-aware operations.
- 129Authentication, authorisation and data protectionSessions versus tokens, OAuth and OIDC in the depth interviews ask for, service-to-service auth, authorisation models, secrets, encryption and the privacy requirements that change a design.
- 130JWT vs session cookiesTwo ways to keep users logged in: server-side sessions with cookies versus self-contained JSON Web Tokens. How each works, revocation, size, security pitfalls, refresh tokens, storage in browsers and mobile apps, and the hybrid most large systems use.
- 131OAuth 2.0 and OpenID Connect explainedHow delegated authorization and single sign-on work: OAuth roles, the authorization code flow with PKCE, scopes, access and refresh tokens, client credentials for services, OpenID Connect ID tokens, enterprise SSO with SAML and OIDC, and designing an identity service.
- 132Authorization and permission systemsDesigning who can do what: authentication versus authorization, RBAC, ABAC and relationship-based access control, Google Zanzibar-style permission services, sharing and inheritance, checking permissions fast, filtering lists, and auditing.
- 133Encryption and key managementEncryption in transit, at rest and end to end, envelope encryption with a KMS, key rotation, hashing passwords, tokenisation, crypto-shredding for deletion, and what each one actually protects against.
- 134End-to-end encryption in messagingHow end-to-end encrypted chat works and what it changes in the design: identity and prekeys, the X3DH key agreement and Double Ratchet, forward secrecy, multi-device support, group messaging with sender keys, encrypted media and backups, key verification, and what the server can and cannot do.
- 135Privacy in system design: deletion, retention and residencyDesigning for privacy requirements: knowing where personal data lives, deleting a user everywhere including caches, logs, backups and analytics, retention limits, data residency, minimisation, and consent.
- 136Audit logs and tamper-evident recordsDesigning audit trails that answer who did what and when: what to record, append-only storage, immutability and retention, hash chains and Merkle trees for tamper evidence, querying and exporting, privacy in audit data, and the difference between audit logs, application logs and event sourcing.
- 137Trust and safety, moderation and abuse preventionDesigning defences against spam, fake accounts, fraud and harmful content: layered checks at signup, posting and payment, rules plus machine learning, review queues, hashing known-bad media, reputation, rate limits and feedback loops.
- 138Running untrusted code safelyHow online judges, notebooks, CI systems and AI agents execute code they did not write: isolation with containers, gVisor and microVMs, resource limits, network and filesystem restrictions, judging pipelines, warm pools, fairness and abuse prevention.
- 139Real-time systems: WebSockets, SSE and pushLong polling vs Server-Sent Events vs WebSockets, connection servers and registries, pub/sub fan-out, presence, reconnection and resync, and scaling to millions of connections.
- 140WebSockets vs Server-Sent Events vs long pollingChoosing how a server pushes updates to clients: short polling, long polling, Server-Sent Events and WebSockets compared on direction, latency, overhead, proxies, scaling and mobile behaviour, plus WebTransport and push notifications, with a decision guide for interviews.
- 141Presence and managing millions of connectionsHolding millions of persistent WebSocket connections and showing who is online: connection gateways, routing messages to the right server, heartbeats, presence with TTLs, fan-out of status changes, typing indicators, reconnect storms and deploys.
- 142Group chat and channel fan-outDelivering messages to groups of every size: small groups versus huge channels, fan-out on write to inboxes versus reading from a channel log, membership storage, per-member read state and unread counts, read receipts, mentions, large group limits and notification throttling.
- 143Fan-out on write vs fan-out on readThe core trade-off behind feeds, timelines and inboxes: precomputing per-user timelines on write versus assembling them on read, the celebrity problem, hybrid fan-out, ranking, storage cost and how to explain it in an interview.
- 144Activity feeds and notification inboxesDesigning the "notifications" tab: activity events, per-user inbox storage, aggregation like "Alex and 12 others liked your photo", read and seen state, unread badges, fan-out and celebrity accounts, ranking and filtering, pagination, retention and cross-device sync.
- 145Push notificationsHow push notifications reach phones and browsers through APNs, FCM and Web Push, device token management, fan-out to millions, user preferences and quiet hours, deduplication, rate limits, collapsing, and measuring delivery.
- 146Sending email at scaleHow transactional and bulk email systems work: SMTP and email providers, deliverability with SPF, DKIM and DMARC, IP and domain reputation, warm-up, bounces and complaints, suppression lists, unsubscribe handling, queues and rate limits per provider, templates, tracking and privacy.
- 147Designing an email inbox (Gmail-style)The backend of a webmail service: receiving mail over SMTP, spam filtering, storing messages and attachments, threading into conversations, labels and folders, per-user search, sync with IMAP and mobile clients, quotas, deduplication and retention.
- 148IoT device fleets and telemetryDesigning backends for millions of connected devices: MQTT and persistent connections, device identity and provisioning, telemetry ingestion and time-series storage, device shadows and desired state, commands to devices, offline buffering, firmware updates, and fleet monitoring and security.
- 149Offline-first apps and syncDesigning apps that work without a connection and sync later: local-first storage, change logs and sync cursors, conflict resolution with last-writer-wins, merges and CRDTs, operational transformation, and keeping clients and server consistent.
- 150CRDTs vs operational transformationHow collaborative editors merge concurrent edits: the problem of concurrent operations, operational transformation with a central server, CRDTs for text and data, convergence and intent preservation, metadata and performance costs, presence and cursors, and which to choose.
- 151Mobile system designWhat changes when the client is a phone: unreliable networks, battery and data limits, offline-first storage, sync, API design for mobile, image and media sizing, push notifications, app versions that never update, background work limits, startup performance and release processes.
- 152Matchmaking and skill ratingHow online games and other two-sided systems pair people: skill ratings with Elo, Glicko and TrueSkill, matchmaking pools and widening search windows, the trade-off between match quality and wait time, regions and latency, parties, and scaling the matchmaker.
- 153Multiplayer game serversHow real-time multiplayer games keep players in sync: authoritative servers, tick rates and snapshots, client prediction and reconciliation, lag compensation, UDP networking, interest management, server allocation and fleets, persistence, cheating and scaling to large worlds.
- 154Rate limiting and resilienceToken bucket, leaky bucket, fixed and sliding windows, distributed rate limiters, plus the resilience toolkit: timeouts, retries with backoff and jitter, circuit breakers, bulkheads, load shedding and graceful degradation.
- 155The thundering herd problemWhen many clients act at the same moment and overwhelm a system: cache stampedes, retry storms, reconnect storms after outages, synchronised cron jobs and notification opens, cold starts after deploys, and the fixes: jitter, request coalescing, early refresh, backoff, admission control and staggering.
- 156Rate limiting algorithmsThe algorithms behind rate limiters and how to run them across many servers: fixed window, sliding window log, sliding window counter, token bucket, leaky bucket and GCRA, with their accuracy, memory and burst behaviour, plus distributed counters, Lua atomicity and response headers.
- 157DDoS protection and abusive trafficDefending a service against denial-of-service attacks: volumetric, protocol and application-layer attacks, absorbing traffic with anycast and CDNs, scrubbing, web application firewalls, rate limits and challenges, protecting origins, autoscaling cost traps, and designing APIs that are cheap to reject.
- 158Load shedding and backpressureStaying up when demand exceeds capacity: why overloaded systems collapse, backpressure in queues and streams, bounded buffers, load shedding by priority, adaptive concurrency limits, deadlines, brownouts and graceful degradation, and retry storms.
- 159Distributed transactions and idempotencyWhy cross-service transactions are hard, two-phase commit vs sagas, the outbox pattern, idempotency keys, exactly-once semantics, and how to keep money and inventory correct.
- 160Idempotency keys in practiceHow to make retried API requests safe: what idempotency means, client-generated keys, storing keys with request fingerprints and responses, handling concurrent duplicates, expiry, keys across service boundaries, idempotent consumers, and the mistakes that still cause double charges.
- 161Inventory, reservations and flash salesNever overselling: atomic decrements, reservations with expiry, holds versus commits, sharded inventory counters, queues and virtual waiting rooms for flash sales, bots, and keeping cached stock counts honest.
- 162Bookings, reservations and availabilityDesigning reservation systems that never double-book: modelling availability for rooms, rentals, appointments and seats, holds with expiry, preventing overlaps with constraints and locks, time zones, overbooking strategies, searching availability, and syncing with external calendars.
- 163Calendar and appointment scheduling systemsDesigning calendars and booking of time slots: events and recurrence rules, expanding recurring events, time zones, free/busy queries, finding meeting times, invitations and RSVPs, appointment slots for providers, preventing double booking, reminders and syncing with external calendars.
- 164Shopping cart and checkout designDesigning e-commerce carts and checkout: cart storage for guests and signed-in users, merging carts, pricing and promotions, tax and shipping, inventory reservation, the checkout state machine, payment integration, order creation, idempotency and handling failures and abandonment.
- 165Money in system design: ledgers, idempotency and reconciliationHow to handle money correctly: integer minor units, double-entry ledgers, balances derived from entries, idempotent payment calls, the unknown-outcome state, authorisation and capture, and daily reconciliation with providers.
- 166Digital wallets and stored balancesDesigning wallets that hold money or credits: balances derived from a double-entry ledger, top-ups and withdrawals, peer-to-peer transfers, holds and authorisations, concurrency on hot balances, limits and KYC, multi-currency, reconciliation with banks, and in-app credits and virtual currencies.
- 167Real-time fraud detectionDesigning fraud and risk systems for payments and marketplaces: the decision point and latency budget, rules plus machine learning, real-time velocity features, device and network signals, graph features, step-up actions, review queues, feedback and label delay, and measuring precision and losses.
- 168Low-latency systems and matching enginesHow exchanges and other microsecond systems are built: single-threaded deterministic cores, in-memory order books, sequencers and event logs, replication by replay, avoiding garbage collection and locks, kernel bypass, and fairness.
- 169Subscriptions and recurring billingDesigning SaaS and consumer subscription billing: plans, prices and entitlements, billing cycles and invoices, proration on upgrades and downgrades, usage-based billing and metering, payment retries and dunning, trials, cancellations, taxes, and keeping billing and access in sync.
- 170Real-time market data distributionHow price feeds reach traders and apps: exchange feeds and multicast, sequence numbers and gap recovery, order book snapshots plus incremental updates, conflation for slow consumers, fan-out to web and mobile clients, entitlements, historical tick storage, and latency tiers.
- 171Unique ids, ordering and timeAuto-increment vs UUID vs Snowflake vs ULID/UUIDv7, time-ordered ids, id generation at scale, clock skew, logical clocks, and why "ordered by time" is harder than it sounds.
- 172Lamport clocks, vector clocks and hybrid logical clocksOrdering events without trusting wall clocks: the happened-before relation, Lamport timestamps, vector clocks and version vectors for detecting concurrency, hybrid logical clocks used by modern databases, their sizes and limits, and where each appears in system design.
- 173Message ordering and sequence numbersKeeping messages and events in the right order: why global order is expensive, per-conversation and per-key ordering, server-assigned sequence numbers, client ids and timestamps, detecting gaps, reordering buffers, ordering with partitions and retries, and how chat and trading systems do it.
- 174Hashing and encoding for system designThe hashing and encoding tools that appear in designs: cryptographic versus non-cryptographic hashes, base62 and base64, short codes, collisions and the birthday bound, checksums, content addressing, HMAC signatures and password hashing.
- 175Time zones, dates and calendars in system designHandling time correctly in distributed systems and products: UTC timestamps versus local times, time zone identifiers and daylight saving, scheduling recurring events, business days and local dates, storing durations, clock skew, leap seconds, and testing time-dependent code.
- 176Internationalization and localization at scaleBuilding products for many languages and regions: locales, translation pipelines and string management, plural and gender rules, right-to-left layouts, Unicode and text handling, currencies and number formats, regional content and pricing, search across languages, and serving localized content efficiently.
- 177Observability, operations and rolloutsMetrics, logs and traces; SLIs, SLOs and error budgets; alerting; safe deploys (canary, blue-green, feature flags); migrations without downtime; capacity planning; and how to answer "how would you know it is working".
- 178Distributed tracing and structured loggingFollowing one request through dozens of services: traces, spans and context propagation, OpenTelemetry, sampling strategies including tail-based sampling, correlating logs, metrics and traces, structured logging, log pipelines, cardinality and cost.
- 179SLIs, SLOs and error budgetsDefining reliability with numbers: choosing SLIs, setting SLO targets, availability nines and what they allow, error budgets and how teams spend them, burn-rate alerting, and SLAs versus SLOs.
- 180Deployment strategies and safe releasesShipping changes without outages: rolling deployments, blue-green, canary releases with automated analysis, feature flags versus deploys, backward-compatible changes across services and databases, progressive delivery across regions, rollbacks and deploy freezes.
- 181Feature flags and A/B testingFeature flags for safe releases, how flag evaluation works at scale, gradual rollouts and kill switches, A/B test design with consistent assignment, exposure logging, metrics and guardrails, network effects, and flag hygiene.
- 182Cost-aware system designDesigning systems that are cheap to run as well as fast: estimating cost in interviews, where cloud bills come from (compute, storage, egress, managed services), storage tiering, caching and CDNs for cost, right-sizing, spot capacity and unit economics.
- 183Testing distributed systems and chaos engineeringHow to gain confidence that a distributed system survives real failures: unit and contract tests, integration tests with real dependencies, load and soak tests, fault injection, chaos engineering, game days, deterministic simulation and testing in production safely.
- 184Incident response and postmortemsHow engineering teams handle production incidents: detection and paging, severity levels, incident roles, mitigation before diagnosis, communication with users, runbooks, blameless postmortems, action items, and designing systems that are easier to operate during an outage.
- 185Backups and disaster recoveryRPO and RTO, why replication is not a backup, full, incremental and point-in-time backups, testing restores, ransomware and accidental deletes, disaster recovery tiers, and how to answer "what if we lose the database?"
- 186Building LLM features: serving, latency and costSystem design for LLM-powered products: streaming responses, the cost and latency of tokens, batching and KV caches in inference, prompt caching, rate limits and fallbacks, guardrails, evaluation, and when to use RAG, tools or fine-tuning.
- 187Serving LLMs on GPUsThe mechanics behind fast, affordable model serving: prefill and decode phases, the KV cache and paged attention, continuous batching, quantisation, tensor and pipeline parallelism, speculative decoding, prefix caching, routing and autoscaling GPU fleets, and the metrics that matter.
- 188Designing AI agent systemsThe architecture behind LLM agents that use tools: the agent loop, tool definitions and execution, sandboxing, memory and context management, orchestration and multi-agent patterns, durable long-running tasks, guardrails and permissions, evaluation, cost control and observability.