In a blog post on Thursday, OpenAI disclosed how it is using the open-source PostgreSQL database.
OpenAI runs ChatGPT and its API platform for 800 million users on a single-primary PostgreSQL instance — not a distributed database, not a sharded cluster. One Azure PostgreSQL Flexible Server handles all writes. Nearly 50 read replicas spread across multiple regions handle reads. The system processes millions of queries per second while maintaining low double-digit millisecond p99 latency and five-nines availability.
The setup challenges conventional scaling wisdom and offers enterprise architects insight into what actually works at massive scale.