System Design
Browse all articles, tutorials, and guides about System Design
Posts
How Shopify Survives Black Friday: The Flash-Sale Playbook
Shopify load tests at 150% of last year's peak, queues buyers at the edge and reserves stock during payment. We rebuilt checkout with k6 and measured it.
Six System Design Problems, and the New Problem Each Fix Creates
Caching, read replicas, sharding, queues, WebSockets, retries, circuit breakers and CQRS each solve a real problem and hand you a new one. A practical map of the six problems every growing system meets, the usual fixes, and what each fix costs you.
How Netflix Ships a Third of the Internet: The CDN They Had to Build
At its 2015 peak Netflix was 37% of North American downstream traffic, and almost none of it came from a commercial CDN. Open Connect is a cache hierarchy built on one asymmetry: Netflix knows tonight what people will watch tomorrow. Here is how the appliances, the nightly fill, the BGP steering and the 800 Gb/s FreeBSD boxes fit together, a runnable comparison of push fill against pull-through caching, and what it teaches anyone running a cache.
In-App, Email and Push From One Event
An order ships. The user wants a badge in the app, a digest email later, no push at all, and their own webhook endpoint pinged. The design that handles that without duplicates: an outbox keyed by event, user and channel, preferences evaluated at send time, digest windows, and provider feedback wired back in. With a runnable model and a build-or-buy verdict.
Meta Says Every Muse User Gets Their Own VM
Meta says its new consumer agent runs on a dedicated cloud VM per person, with a second agent that has to approve anything leaving that machine and a credential store the agent can use but never read. Those are three infrastructure decisions you face too. Here is what each one defends against, what it costs to build, and a runnable model of the broker, including the injected page that tries to walk out with a token.
How Stripe Avoids Double-Charging Anyone
A payment request times out. Did the charge happen? Stripe answers that question with idempotency keys, and the design behind them is more than a cache of responses: locked key rows, recovery points, and a rule about which calls can be retried. Here is the design, a working Postgres implementation, the run where our own version double-created rides, and the constraint that caught it.
How Does It Work So Fast? The Engineering Behind Instant UI Responses
Credit card validation, username checks, autocomplete, URL shorteners - they all feel instant. Here is what is actually happening under the hood in each case.