TLDR Dev · ARTICLES & TUTORIALS

SCALING POSTGRESQL TO POWER 800 MILLION CHATGPT USERS

links.tldrnewsletter.com14 min read

Summary from the TLDR Dev newsletter

OpenAI scaled PostgreSQL to support 800 million ChatGPT users and millions of queries per second for its predominantly read-heavy workloads. To achieve this, its team offloaded write-heavy operations to sharded systems like Azure Cosmos DB and implemented application and query optimizations. Their architecture uses a single primary Azure PostgreSQL instance and nearly 50 global read replicas.