OpenAI Scaled PostgreSQL To Serve 800 Million ChatGPT Users

openai logo on an iphone

OpenAI said it scaled PostgreSQL to handle millions of queries per second as ChatGPT usage grew to roughly 800 million users worldwide.

According to the company, database load increased more than tenfold over the past year as adoption accelerated.

OpenAI runs PostgreSQL in a single-primary architecture with nearly 50 read replicas distributed across multiple global regions.

The setup supports read-heavy workloads while maintaining low latency for users accessing ChatGPT and OpenAI’s API. The company said this approach challenged common assumptions about PostgreSQL’s scalability at extreme scale.

Engineers identified several failure patterns as traffic surged, including cache-miss storms, expensive multi-table joins, and write spikes during feature launches.

These events increased latency and triggered retry loops that risked cascading outages across services.

To address the limits of write scalability, OpenAI migrated shardable, write-heavy workloads to alternative systems such as Azure Cosmos DB.

PostgreSQL remains unsharded, serving primarily read traffic, while new write-intensive workloads default to sharded databases.

Why This Matters Today

PostgreSQL is widely used across the industry, but it is often considered unsuitable for ultra-large, globally distributed workloads.

OpenAI’s experience suggests that, with extensive optimization, PostgreSQL can support far larger read volumes than typically assumed.

The architecture highlights tradeoffs many AI platforms face as usage shifts from experimentation to sustained, daily activity.

Read scalability can be achieved with replicas, but write pressure remains a bottleneck that requires careful workload separation and system design.

As AI services move toward billions of users, infrastructure choices like these shape reliability, latency, and cost. OpenAI’s approach provides a reference point for companies scaling consumer AI systems under heavy global demand.

Our Key Takeaways:

  • OpenAI scaled PostgreSQL with a single primary and nearly 50 read replicas to support ChatGPT at a global scale.

  • Write-heavy workloads were moved off PostgreSQL to sharded systems to preserve stability and performance.

  • The company is exploring cascading replication and other strategies to support future growth beyond current limits.

You may also want to check out some of our other tech news updates.

Wanna know what’s trending online every day? Subscribe to Vavoza Insider to access the latest business and marketing insights, news, and trends daily with unmatched speed and conciseness. 🗞️

Subscribe to Vavoza Insider, our daily newsletter. Your information is 100% secure. 🔒

Subscribe to Vavoza Insider, our daily newsletter.
Your information is 100% secure. 🔒

Share With Your Audience

Read More From Vavoza...

Wanna know what’s
trending online?

Subscribe to access the latest business and marketing insights, news, and trends daily!