How companies built it
Engineering write-ups show how the patterns in this guide behave under real traffic, deadlines and legacy code. This page lists, company by company, the articles worth reading and one line on what each one teaches. It keeps the companies from the original primer wherever a working source still exists, and adds strong posts from 2016 to 2026.
How to read a case study
Section titled “How to read a case study”Treat each article as an answer to a design question that you did not see. While reading, write down:
- The starting point and the trigger. What was the stack, and what broke first: write throughput, a hot partition, fan-out cost, an outage, or developer speed?
- The options they rejected. The reasons a team gives for not choosing a technology are often more useful than the choice itself.
- The cost. Migrations take months, dual writes need verification, and new systems need operators. Good posts name these costs.
- The date. A 2011 post describes 2011 hardware and tools. Keep the reasoning and update the technology choices.
Most of the stories follow a similar growth path:
flowchart TB one["Single app server<br/>and database"] --> cache["Add cache<br/>and read replicas"] cache --> cdn["CDN and async<br/>job queues"] cdn --> shard["Shard the<br/>database"] shard --> svc["Split into<br/>services"] svc --> cells["Cells or pods<br/>for blast radius"]
Company write-ups
Section titled “Company write-ups”Sorted alphabetically. The year is the publication date of the article, not of the system.
| Company | Write-up | What you learn |
|---|---|---|
| Airbnb | Avoiding double payments in a distributed payments system (2019) | An idempotency library that keeps network calls out of database transactions, so retries never charge twice. |
| Amazon | Amazon architecture (2007) | The move from a two-tier monolith to services owned by small teams, based on an interview with Werner Vogels. |
| Amazon | Building and operating a pretty big storage system called S3 (2023) | How scale changes the work: spreading data across huge numbers of drives, using heat management, and building team ownership. |
| Cinchcast | Producing 1,500 hours of audio every day (2012) | A .NET and SQL Server stack that shields the database with Redis, a CDN and Elasticsearch. |
| Cloudflare | How we built Pingora (2022) | Why Cloudflare replaced NGINX with its own Rust proxy: connection reuse across workers, efficiency and safety. |
| DataSift | Realtime datamining at 120,000 tweets per second (2011) | Stream filtering at firehose rate by compiling filters, sharing common work between customers, and sharding the stream. |
| Discord | How Discord stores billions of messages (2017) | Moving chat history from MongoDB to Cassandra, with partitions keyed by channel and time bucket. |
| Discord | How Discord stores trillions of messages (2023) | The follow-up: hot partitions and garbage-collection pauses, a move to ScyllaDB (177 nodes to 72), and Rust data services that coalesce requests. |
| Dropbox | Inside the Magic Pocket (2016) | The in-house, immutable block store that replaced S3 for most of Dropbox’s data: design goals, durability and the overall architecture. |
| Dropbox | Rewriting the heart of our sync engine (2020) | When a full rewrite is justified, and the testing practices that made a four-year rewrite ship safely. |
| ESPN | Operating at 100,000 requests per second (2013) | Serving sports traffic peaks from a few hundred servers by caching pages and page fragments heavily. |
| Facebook / Meta | How Facebook Live streams to 800,000 simultaneous viewers (2016) | Spiky live traffic, edge caches that collapse duplicate requests, and capacity planning for a new product. |
| Facebook / Meta | How we built a general purpose key value store with ZippyDB (2021) | A strongly consistent, geo-distributed store on RocksDB, with consistency levels that clients choose per request. |
| Facebook / Meta | How Meta built the infrastructure for Threads (2023) | Absorbing more than 100 million sign-ups in five days by reusing proven platforms (the ZippyDB store and the Async serverless job platform) instead of building new ones. |
| Figma | How Figma’s multiplayer technology works (2019) | Real-time collaboration with a central server and CRDT-inspired rules, and why Figma did not use operational transformation. |
| Figma | How Figma’s databases team lived to tell the scale (2024) | Horizontal sharding of Postgres behind a query proxy, after vertical partitioning ran out of room. |
| Flickr | Flickr architecture (2007) | A classic PHP and MySQL stack scaled with database sharding, memcached and Squid caching. |
| GitHub | Partitioning GitHub’s relational databases to handle scale (2021) | Splitting one large MySQL cluster by schema domain, with tooling that detects queries crossing domain boundaries. |
| Google architecture (2008) | How GFS, MapReduce and Bigtable fit together on commodity hardware. Read with the foundational papers. | |
| How Google serves data from multiple datacenters (2009) | Backups, leader-follower, multi-leader, two-phase commit and Paxos compared for multi-datacenter data. | |
| 14 million users, terabytes of photos (2011) | How three engineers ran a fast-growing app on AWS with PostgreSQL, Redis, memcached and async task queues. | |
| What powers Instagram (2011) | The team’s own tour of its stack, from load balancing to monitoring, at roughly one year old. | |
| Sharding and IDs at Instagram (2012) | Time-sortable 64-bit IDs generated inside PostgreSQL, using thousands of logical shards mapped onto fewer physical servers. | |
| Justin.tv (now Twitch) | Live video broadcasting architecture (2010) | Building a replication tree of video servers for each stream, based on load and network position. |
| Mailbox | From 0 to one million users in 6 weeks (2013) | Using a reservation queue to control growth while the backend caught up with demand. |
| Netflix | What happens when you press play? (2017) | The split between the AWS control plane and the Open Connect CDN, which serves pre-positioned video from inside ISPs. |
| Netflix | Zuul 2: the journey to asynchronous, non-blocking systems (2016) | Moving the API gateway to async I/O: big gains in connection handling, little gain for CPU-bound work. |
| Netflix | Introducing Netflix’s key-value data abstraction layer (2024) | Hiding Cassandra and other stores behind one API, with idempotency tokens, chunking and adaptive pagination. |
| Notion | Herding elephants: lessons from sharding Postgres (2021) | 480 logical shards on 32 databases, application-level routing, and a migration through an audit log, backfill and verification. |
| OpenAI | Scaling PostgreSQL to power 800 million ChatGPT users (2026) | One unsharded Postgres primary with nearly 50 read replicas, connection pooling, cache leases against miss storms, and write-heavy workloads moved to sharded stores. |
| 18 million visitors, 10x growth, 12 employees (2012) | A small team growing fast on AWS with Python and Django, about 70 sharded master databases and a large in-memory cache tier. | |
| From 0 to tens of billions of page views a month (2013) | Why they chose mature tools and manual sharding over clustered databases. A useful counterweight to chasing new technology. | |
| Playfish | 50 million monthly users and growing (2010) | Social games on EC2: stateless Java servers, sharded MySQL, and each user’s data stored as one blob. |
| PlentyOfFish | PlentyOfFish architecture (2009) | How far vertical scaling, large-memory machines and a CDN can take a site run by very few people. |
| Salesforce | How they handle 1.3 billion transactions a day (2013) | Multi-tenant SaaS partitioned into isolated instances and “superpods”, with a separate store for large files. |
| Shopify | A pods architecture to allow Shopify to scale (2018) | Isolating groups of shops into pods so a failure in one shard does not take down the whole platform. |
| Shopify | Deconstructing the monolith (2019) | The modular monolith: one deployable Rails app split into components with explicit domain boundaries, checked by tooling, instead of microservices. |
| Slack | Scaling datastores at Slack with Vitess (2020) | Moving from workspace-sharded MySQL to Vitess for flexible sharding keys, and how the migration was run. |
| Slack | Real-time messaging (2023) | Channel, gateway and presence servers that fan out messages and events to connected clients worldwide. |
| Slack | Slack’s migration to a cellular architecture (2023) | After a gray failure in one availability zone, each zone became a cell, and operators can drain traffic away from a zone within minutes. |
| Stack Overflow | Stack Overflow architecture (2009) | A famously small fleet (two web servers and one SQL Server machine) that relied on scaling up and keeping the database almost entirely in RAM. |
| Stack Overflow | Stack Overflow: the architecture, 2016 edition (2016) | The same approach seven years later: load balancers, web tier, Redis, Elasticsearch and SQL Server, with real traffic numbers. |
| Stripe | Scaling your API with rate limiters (2017) | Four kinds of rate limiters and load shedders, and how to roll them out without hurting legitimate traffic. |
| Stripe | Designing robust and predictable APIs with idempotency (2017) | Idempotency keys, plus retries with exponential backoff and jitter, for APIs on unreliable networks. |
| Stripe | Online migrations at scale (2017) | A four-step dual-write pattern for moving hundreds of millions of records with no downtime. |
| TripAdvisor | 40M visitors, 200M dynamic page views, 30 TB of data (2011) | A Java and PostgreSQL stack with heavy caching, run by teams that owned features from end to end. |
| Tumblr | 15 billion page views a month (2012) | Moving the dashboard from scatter-gather reads to per-user inboxes inside self-contained cells, and the move from a PHP monolith to JVM services. |
| Twitter / X | Announcing Snowflake (2010) | Unique, roughly time-ordered 64-bit IDs generated without central coordination. |
| Twitter / X | Timelines at scale (2013) | Talk: fan-out on write into Redis timelines, and the special handling of accounts with millions of followers. |
| Twitter / X | 150M active users, 300K QPS, a 22 MB/s firehose (2013) | A written summary of the same design: home timelines precomputed on write, search computed on read. |
| Uber | How Uber scales their real-time market platform (2015) | The dispatch system: geospatial indexing, a consistent-hash ring of workers, and surviving a datacenter failure. |
| Uber | Lessons learned from scaling Uber to 2000 engineers, 1000 services (2016) | The hidden costs of a thousand microservices: many languages, tracing, ownership and coordination between teams. |
| Uber | H3: Uber’s hexagonal hierarchical spatial index (2018) | Why hexagonal grid cells suit supply, demand and pricing analysis better than squares. |
| Uber | How Uber serves over 40 million reads per second (2024) | CacheFront: a Redis cache built into the Docstore database’s query path, with change data capture to invalidate stale entries. |
| The WhatsApp architecture Facebook bought for $19 billion (2014) | Erlang on FreeBSD, millions of connections per server, and a very small engineering team. | |
| YouTube | YouTube architecture (2008) | Early growth: Python app servers, MySQL replication and then sharding, and a CDN for popular videos. |
The foundational papers from these companies (memcache, TAO and Haystack at Facebook; Dynamo and Aurora at Amazon; Bigtable and Spanner at Google) are on the foundational papers page.
Reading by theme
Section titled “Reading by theme”If you are preparing for a particular kind of question, start here:
| Question type | Read |
|---|---|
| Chat, presence, real-time collaboration | Discord (both posts), Slack real-time messaging, WhatsApp, Figma multiplayer |
| News feed or timeline | Twitter timelines, Tumblr, Pinterest, Instagram |
| Sharding a relational database | Instagram IDs, Notion, Figma databases, GitHub, Slack and Vitess, Shopify pods, OpenAI (how far one primary goes) |
| Video, photos and large files | Netflix Open Connect, YouTube, Justin.tv, Facebook Live, Dropbox Magic Pocket, Amazon S3 |
| Payments and API reliability | Stripe (all three), Airbnb double payments |
| Location and dispatch | Uber dispatch, Uber H3 |
| Caching at very high read rates | Uber CacheFront, ESPN, Stack Overflow |
| Monolith or services | Amazon, Shopify modular monolith, Netflix Zuul 2, Salesforce |
| Availability zones and blast radius | Slack cells, Shopify pods, Salesforce |
| Unique ID generation | Twitter Snowflake, Instagram sharding and IDs |
What changed since the classic write-ups
Section titled “What changed since the classic write-ups”- Teams shard relational databases instead of leaving them. Notion, Figma, GitHub and Slack all stayed on Postgres or MySQL and added a routing layer (custom code, a proxy or Vitess). In the 2010s, many teams moved to a NoSQL store at this point. OpenAI shows the other end: one unsharded Postgres primary with many replicas can go very far if new write-heavy data goes elsewhere.
- Cells and pods limit the blast radius. Shopify pods, Salesforce superpods and many AWS services split users into isolated copies of the stack, so one failure affects only a fraction of customers. Slack applies the same idea per availability zone.
- Data access goes through platform abstractions. Netflix’s key-value layer and Uber’s integrated cache hide storage engines behind an API. This makes migrations such as Discord’s from Cassandra to ScyllaDB less painful.
- Rust appears on hot paths. Discord’s data services and Cloudflare’s Pingora show Rust used where garbage-collection pauses or memory safety matter.
- Reuse beats invention at launch. Meta’s Threads launch shows that proven internal platforms let a product survive a sudden traffic spike.
Further reading
Section titled “Further reading”- High Scalability: the archive behind most of the classic links above. No new posts since May 2024.
- InfoQ: Architecture and design: conference talks and articles from practitioners, updated weekly.
- ByteByteGo newsletter: illustrated summaries of how well-known systems work.
- Engineering blogs: where to find new write-ups like these.
Related topics
Section titled “Related topics”- Foundational papers and systems: the research behind many of these designs.
- Partitioning and sharding: the technique behind most of the database stories above.
- Monolith and microservices: the Amazon, Shopify and Uber stories, in general form.
- Design a Twitter timeline: a full case study built on the timeline write-ups.
- Scaling to millions of users: the growth path from the diagram above, step by step.
Based on The System Design Primer by Donne Martin (CC BY 4.0). Restructured, rewritten and updated; site content is licensed under CC BY 4.0.