Read replicas: 6 real scaling case studies
6 of the 73 engineering write-ups in our database are tagged with the technique "read replicas". They come from 5 companies (GitHub, Figma, GitLab, OpenAI and Shopify) and were published between 2021 and 2026. Stack that shows up most often in these stories: PostgreSQL (3), Azure (2), Azure Blob Storage (2) and Git (2). Often combined with caching (2), connection pooling (2), query optimization (2) and workload isolation (2). 3 of the 6 state concrete scale numbers, for example "99.99999% of repositories copied to Azure" (GitHub). Each card below links to our short summary and the original post.
The bridge to agent-scale Git infrastructure
GitHub has copied 99.99999% of its Git repositories to Azure, where most now keep two of their five replicas and Azure serves about half of Git traffic. The busiest remaining repositories were blocked by a ~25ms cross-region round trip, because Spokes held a repository-wide lock for each write while waiting on the slowest healthy replica. Scoping the quorum to individual Git references lets writes to different branches proceed in parallel (3-4x higher throughput in internal testing), and a virtual write replica that streams writes into Azure Blob Storage lets stateless read replicas scale out on demand.
Building Git infrastructure for agent-scale development
GitHub explains why agent workloads strain Spokes, which keeps five durable copies of each repo on fileserver disks, so every added read replica slows writes. The new design coordinates only the ref update, moves compaction and GC to separate workers, and separates storage from compute: Azure Blob Storage holds the authoritative data while lightweight caching workers serve reads.
Scaling PostgreSQL to power 800 million ChatGPT users
OpenAI runs ChatGPT on a single-primary Postgres with nearly 50 global read replicas. Reads are offloaded, write-heavy shardable workloads move to Cosmos DB, and PgBouncer, cache leasing and multi-layer rate limits keep the primary safe.
The growing pains of database architecture
How Figma moved from one Postgres instance to multiple databases by vertically partitioning table groups.
Why we spent the last month eliminating PostgreSQL subtransactions
GitLab traced replica stalls to Postgres subtransaction overflow and removed subtransactions from its code.
Read Consistency with Database Replicas
Shopify routes reads to MySQL replicas while giving apps consistency guarantees such as monotonic reads.