System Design
Scalability, load balancing, CAP theorem, observability, and classic design problems explained step by step.
Courses
Learn how to design scalable, reliable, and maintainable systems — from single servers to distributed architectures used by millions of users.
From fundamentals to production — caching strategies, eviction policies, invalidation, Redis, CDN caching, and multi-level architectures. Practical patterns and a guided final project you build in your own stack (no bundled starter repo).
Master how microservices talk to each other — synchronous REST and gRPC, async messaging, event-driven patterns, resilience, and distributed consistency.
Articles
An order database's primary data center suffers a catastrophic, unrecoverable event — not a transient node failure, an actual disaster. Two …
A team deploys their application to three regions, each with its own app tier, database, and network path. On paper, a failure in one region…
A product-page personalization API needs to answer in under 100ms for a good user experience. A shopper in Sydney hits it, and the request h…
A multi-tenant analytics platform partitions incoming events by tenant_id, hashed onto 16 shards — a design that looked perfectly balanced i…
A URL shortener's redirect endpoint, GET /r/{code}, looks purely read-heavy — billions of redirects against a handful of short codes created…
An order service runs in two regions, us-east and eu-west. In one design, both regions serve live customer traffic right now, splitting the …
A permission check in front of a wire-transfer approval endpoint times out. What should happen next? One engineer's instinct says "don't blo…
A payment service keeps processing requests with zero dropped transactions while one of its three nodes crashes mid-request — that's fault t…
A product page shows the item, its price, and an "add to cart" button — the core path — plus a "customers also viewed" recommendation strip …
A checkout API runs three replicas across two availability zones behind a load balancer — on paper, no single point of failure. Then one AZ …
An order-ingestion API writes to an in-memory queue, a worker pool drains it, and a payment provider on the other end gets slow. The queue k…
A shopping cart write to cart-77 needs to land on enough replicas that a later read is guaranteed to see it — but "enough" is a number you c…
A 4-node session cache scales to 5 nodes to handle more traffic. With hash(key) % N, that single node addition changes almost every key's ta…
A user changes their display name, refreshes the page a second later from a phone on a different network, and sees the old name. Nothing cra…
A checkout API can wait until every step finishes, or accept an order and complete work later. The first path gives the caller an immediate …
A shopping cart must remember items, so the product cannot be literally stateless. The useful design question is where that state lives. Kee…
An order API can return responses all day and still charge the wrong amount. It can be temporarily unreachable while every stored order rema…
A dashboard can look “fast” while users still wait, and a load test can report huge requests-per-second while p99 checkout times explode. La…
You press Enter on https://shop.example/products/42. A moment later, a product page appears. That small action crosses naming, transport sec…
Five Docker containers with REST between them is not a production microservices system. Clients hit a load balancer and API gateway; service…
Checkout slows while product pages remain healthy. CPU is moderate, but the orders table shows rising lock waits and writes queue behind one…
A product page feels instant on the second visit because some layer reused work from the first. The useful beginner question is not “should …
Many developers reach for async/await hoping one method will finish sooner. It does not make a database round-trip or HTTP call execute fast…
At 3am you need three answers: what happened, how bad is it, and where time went. Logs record discrete events. Metrics aggregate rate, error…
Traffic climbs and something saturates — CPU, memory, disk, or connection count. Vertical scaling gives one machine more resources. Horizont…
The CAP theorem states that when a distributed system is partitioned, it cannot guarantee both linearizable consistency and availability for…
Docker and Kubernetes are not competitors on the same layer, and treating them as an either/or is the mistake that leads teams to run a clus…
Containers are ephemeral by design — when you remove one, its filesystem disappears with it. That is fine for stateless apps, but databases,…
When GET https://app.example.com/api/orders/42 returns 502, the failure may sit at DNS, the external load balancer, an Ingress controller, a…
Every new project faces the same question: one deployable application or separately deployed services? A monolith minimizes distributed-syst…
A load balancer spreads connections so one machine does not take all the pain. Layer 4 routes on IP and port — fast and protocol-agnostic. L…
One buggy client can retry a failing endpoint in a tight loop and starve everyone else. Rate limiting protects shared capacity and keeps abu…
This guide is for backend engineers who know HTTP and database transactions but need to decide where six microservice patterns fit. By the e…
This guide is for engineers who know basic SQL and key-value access but need to justify a production database choice. By the end, you can ev…
Asynchronous messaging decouples services in time — producers send without waiting for consumers. Kafka is a distributed event log for high-…
This guide is for developers who can build a frontend, API, and database but have not yet operated the whole request path. By the end, you c…
A team sets an internal reliability target of 99.9% and signs a customer contract promising 99.5% — and a new engineer immediately asks why …
A payment retry button, wired to a 0-RTT-resumed TLS connection for speed, gets pressed twice by an impatient user — and somewhere on the ne…
A distributed lock feels like it should be enough: acquire it, do your write, release it, and only one client at a time gets to touch the re…
Every request into a microservices backend crosses the same narrow point before it reaches any business logic: the API gateway. Under light …
Want a guided sequence? Follow a learning path that includes this topic.
View Learning Paths