Scaling PostgreSQL to power 800 million ChatGPT users
OpenAI
OpenAI shared how it keeps a single PostgreSQL setup running under ChatGPT's massive load. Turns out boring old Postgres can scale to hundreds of millions of users with the right plumbing.
Based on reporting by OpenAI — read the original for the full story.
Summary, retelling and take written by AI under human oversight; images are AI-generated illustrations. How we work · Report an error
There's a running joke in tech that every startup eventually rewrites its database layer three times before admitting the original choice was fine all along. OpenAI's engineering team just published a rare look at the opposite story: they never left PostgreSQL, even as ChatGPT ballooned to roughly 800 million users, and instead built an elaborate set of scaffolding around it to keep the queries flowing.
The core problem is one every growth-stage company eventually hits. A single primary database can only take so many writes before it falls over, and reads pile up even faster when hundreds of millions of people are hammering the same tables. OpenAI's answer was to lean hard on read replicas, spreading query load across multiple copies of the data so the primary isn't doing double duty as both the source of truth and the thing answering every lookup.
Caching does a lot of the unglamorous work here too. Rather than hitting Postgres for information that barely changes between requests, OpenAI pushes hot data into caching layers, cutting down the number of round trips to the database itself. Pair that with rate limiting, which throttles requests before they can overwhelm any single component, and you get a system that degrades gracefully instead of falling over during a traffic spike, which for ChatGPT is basically every few weeks.
Workload isolation might be the least flashy but most consequential piece. OpenAI separates different types of database traffic, so a slow analytics query or an internal tooling job doesn't choke the connections that ChatGPT itself needs to serve a live conversation. It's the database equivalent of not letting the intern's laptop sit on the same network switch as production.
What's notable is what OpenAI didn't do. No exotic new distributed database, no wholesale migration to some trendy NewSQL system. Just careful, layered engineering on top of a decades-old open-source project that a lot of engineers assumed would hit a ceiling long before reaching this kind of scale.
My take — AI-written commentary, not fact-checked reporting
I love this because it's a rebuke to the constant pressure to chase the newest database fad just because your traffic graph is going up and to the right. Postgres has been underestimated for years, and OpenAI proving it can carry 800 million users with the right architecture around it is a bigger endorsement of boring, well-understood open-source tooling than any benchmark post could be.
Read more about this at: OpenAI