The loop you run in every interview, then one thing to say and one to avoid for each foundation, building block and AI systems lesson. Every title opens its page.
About 6 min
Built to print
On this page6 sections
01The 45-minute loop
1Scope the requirements~5 minTurn an open-ended prompt into a designable system with three must-have features and numbered non-functional targets.
2Estimate the scale~3 minDo the back-of-envelope math that changes the design, and skip the math that does not.
3Define the API & core entities~5 minName the nouns and pin down the contract before drawing boxes, so the design has something concrete to satisfy.
4Draw the high-level design~10 minProduce a clean box diagram that visibly satisfies every functional requirement, and nothing more.
5Go deep where it counts~20 minSpend the largest block on the one or two hard problems, where senior and staff signal is earned.
6Wrap up~2 minLand the plane: recap the design against the requirements, name the top trade-off, and say what you would do next.
Read-heavyUse caches, replicas and edge layers to absorb repeated reads before they reach the primary database.
Write-heavyUse logs, shards, batching and idempotent consumers when the write path is the thing that runs out first.
Classic request-responseUse synchronous HTTP, a small app tier, a database and selective caching when the user needs an answer now.
Execution shape
Long-running tasksReturn a job id quickly, run the work elsewhere, and expose status, progress, cancellation and results.
Producer-consumer / work queuePut durable work between bursty producers and steady consumers, then make retries, idempotency and backpressure explicit.
Event-driven / sagaCoordinate multi-service workflows with local transactions, compensations and a durable owner for the flow.
PostgreSQLA relational database with ACID transactions, rich SQL, indexes and replicas; use it first when correctness and flexible queries matter.
Spanner / CockroachDB (distributed SQL)SQL tables and transactions spread across ranges, with Paxos or Raft quorums replacing the single primary bottleneck.
MongoDBA document database for aggregate-shaped data, flexible schemas, replica-set availability and shard-key-based horizontal scale.
DynamoDBA managed key-value and document store for known access patterns, where key design gives low latency without operating shards.
Apache CassandraA masterless wide-column store for write-heavy, multi-region systems with predictable partition-key queries.
ClickHouseA columnar OLAP database for fast scans and aggregates over append-heavy event data.
A flag check is a local SDK evaluation, not a network call on every request.
Avoid
Making the flag service a synchronous dependency for every request.
Choose polling, SSE or WebSocket, then separate live fan-out from durable catch-up.
Data movement & fan-out
Fan-out: on write vs on readChoose whether distribution happens on write, on read, or with a measured hybrid boundary.
Edge caching / CDN-firstUse a CDN as a cacheable read path, with explicit cache keys, TTLs and invalidation.
Multi-region active-passive / active-activeChoose a regional posture for latency, disaster recovery or compliance, then make the write ownership and failover path explicit.
Specialised shapes
Search over contentBuild a derived search index with async ingestion, per-field analysis, ranked queries and a routine rebuild path.
Geospatial / proximity lookupUse a real spatial index for nearby queries, then filter, rank and expire candidates so the result is both close and current.
Large file upload & blob handlingKeep big bytes out of the app server with constrained signed uploads, async processing and private CDN delivery.
Content recommendationSplit recommendations into cheap candidate generation, richer ranking and feedback logging so the system can learn without blowing the request budget.
Reliability & infra
High availabilityCombine redundancy, fast failover, graceful degradation and drills so a single failure does not become a full outage.
Leader election / consensusUse a consensus-backed lease with fencing when exactly one replica may act; use idempotency when duplicates are tolerable.
An in-memory store of data structures, used in designs for caching, locks, leaderboards, rate limits, nearby search, queues and pub/sub.
ElasticsearchA distributed search engine for full-text relevance, filters, facets and log analytics when a database scan or simple index is not enough.
Vector DatabaseA search store for embedding vectors, used when you need similarity by meaning for semantic search, recommendations or RAG.
Apache KafkaA retained, partitioned event log for durable streams, replay, and many independent consumer groups.
Apache FlinkA stream-processing engine for stateful real-time computation: windows, joins, enrichment and live materialised views.
Storage, edge & coordination
S3 / Blob StorageDurable object storage for large unstructured bytes, with databases holding metadata and CDNs handling delivery.
API GatewayA thin front door for client traffic: it authenticates callers, applies quotas, validates and routes requests, and keeps those cross-cutting concerns out of each service.
Load BalancerA traffic director for a server fleet: clients use one endpoint while the load balancer spreads requests, checks health and drains failed backends.
CDN (Content Delivery Network)A global edge cache for HTTP content: serve repeat reads near users, keep cacheable traffic away from origin, and use TTLs and keys to bound staleness.
ZooKeeper / etcdA consensus-backed coordination store for leader election, locks, config and service discovery when only one actor is allowed to win.
Message Queue (SQS / RabbitMQ)A task buffer between producers and workers, used for async jobs, retries, dead-letter handling and burst smoothing.
TemporalA durable workflow engine that stores event history, lets workers replay workflow code, and runs retried Activities from task queues.
Service mesh (Envoy, Istio)A service-to-service traffic layer that adds identity, mTLS, routing policy and telemetry through proxies rather than application libraries.