Skip to content

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.

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"]

Sorted alphabetically. The year is the publication date of the article, not of the system.

CompanyWrite-upWhat you learn
AirbnbAvoiding double payments in a distributed payments system (2019)An idempotency library that keeps network calls out of database transactions, so retries never charge twice.
AmazonAmazon architecture (2007)The move from a two-tier monolith to services owned by small teams, based on an interview with Werner Vogels.
AmazonBuilding 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.
CinchcastProducing 1,500 hours of audio every day (2012)A .NET and SQL Server stack that shields the database with Redis, a CDN and Elasticsearch.
CloudflareHow we built Pingora (2022)Why Cloudflare replaced NGINX with its own Rust proxy: connection reuse across workers, efficiency and safety.
DataSiftRealtime 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.
DiscordHow Discord stores billions of messages (2017)Moving chat history from MongoDB to Cassandra, with partitions keyed by channel and time bucket.
DiscordHow 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.
DropboxInside 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.
DropboxRewriting 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.
ESPNOperating at 100,000 requests per second (2013)Serving sports traffic peaks from a few hundred servers by caching pages and page fragments heavily.
Facebook / MetaHow 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 / MetaHow 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 / MetaHow 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.
FigmaHow 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.
FigmaHow 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.
FlickrFlickr architecture (2007)A classic PHP and MySQL stack scaled with database sharding, memcached and Squid caching.
GitHubPartitioning GitHub’s relational databases to handle scale (2021)Splitting one large MySQL cluster by schema domain, with tooling that detects queries crossing domain boundaries.
GoogleGoogle architecture (2008)How GFS, MapReduce and Bigtable fit together on commodity hardware. Read with the foundational papers.
GoogleHow Google serves data from multiple datacenters (2009)Backups, leader-follower, multi-leader, two-phase commit and Paxos compared for multi-datacenter data.
Instagram14 million users, terabytes of photos (2011)How three engineers ran a fast-growing app on AWS with PostgreSQL, Redis, memcached and async task queues.
InstagramWhat powers Instagram (2011)The team’s own tour of its stack, from load balancing to monitoring, at roughly one year old.
InstagramSharding 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.
MailboxFrom 0 to one million users in 6 weeks (2013)Using a reservation queue to control growth while the backend caught up with demand.
NetflixWhat 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.
NetflixZuul 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.
NetflixIntroducing Netflix’s key-value data abstraction layer (2024)Hiding Cassandra and other stores behind one API, with idempotency tokens, chunking and adaptive pagination.
NotionHerding 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.
OpenAIScaling 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.
Pinterest18 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.
PinterestFrom 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.
Playfish50 million monthly users and growing (2010)Social games on EC2: stateless Java servers, sharded MySQL, and each user’s data stored as one blob.
PlentyOfFishPlentyOfFish architecture (2009)How far vertical scaling, large-memory machines and a CDN can take a site run by very few people.
SalesforceHow 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.
ShopifyA 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.
ShopifyDeconstructing the monolith (2019)The modular monolith: one deployable Rails app split into components with explicit domain boundaries, checked by tooling, instead of microservices.
SlackScaling datastores at Slack with Vitess (2020)Moving from workspace-sharded MySQL to Vitess for flexible sharding keys, and how the migration was run.
SlackReal-time messaging (2023)Channel, gateway and presence servers that fan out messages and events to connected clients worldwide.
SlackSlack’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 OverflowStack 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 OverflowStack 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.
StripeScaling your API with rate limiters (2017)Four kinds of rate limiters and load shedders, and how to roll them out without hurting legitimate traffic.
StripeDesigning robust and predictable APIs with idempotency (2017)Idempotency keys, plus retries with exponential backoff and jitter, for APIs on unreliable networks.
StripeOnline migrations at scale (2017)A four-step dual-write pattern for moving hundreds of millions of records with no downtime.
TripAdvisor40M 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.
Tumblr15 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 / XAnnouncing Snowflake (2010)Unique, roughly time-ordered 64-bit IDs generated without central coordination.
Twitter / XTimelines at scale (2013)Talk: fan-out on write into Redis timelines, and the special handling of accounts with millions of followers.
Twitter / X150M 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.
UberHow Uber scales their real-time market platform (2015)The dispatch system: geospatial indexing, a consistent-hash ring of workers, and surviving a datacenter failure.
UberLessons 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.
UberH3: Uber’s hexagonal hierarchical spatial index (2018)Why hexagonal grid cells suit supply, demand and pricing analysis better than squares.
UberHow 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.
WhatsAppThe WhatsApp architecture Facebook bought for $19 billion (2014)Erlang on FreeBSD, millions of connections per server, and a very small engineering team.
YouTubeYouTube 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.

If you are preparing for a particular kind of question, start here:

Question typeRead
Chat, presence, real-time collaborationDiscord (both posts), Slack real-time messaging, WhatsApp, Figma multiplayer
News feed or timelineTwitter timelines, Tumblr, Pinterest, Instagram
Sharding a relational databaseInstagram IDs, Notion, Figma databases, GitHub, Slack and Vitess, Shopify pods, OpenAI (how far one primary goes)
Video, photos and large filesNetflix Open Connect, YouTube, Justin.tv, Facebook Live, Dropbox Magic Pocket, Amazon S3
Payments and API reliabilityStripe (all three), Airbnb double payments
Location and dispatchUber dispatch, Uber H3
Caching at very high read ratesUber CacheFront, ESPN, Stack Overflow
Monolith or servicesAmazon, Shopify modular monolith, Netflix Zuul 2, Salesforce
Availability zones and blast radiusSlack cells, Shopify pods, Salesforce
Unique ID generationTwitter Snowflake, Instagram sharding and IDs
  • 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.

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.