How real companies do itLesson 061 min
How does ChatGPT serve 800 million users from one main database?
OpenAI described in January 2026 how ChatGPT's PostgreSQL setup works. One main server, the primary, accepts every write, such as a new chat. Most work is reading, so nearly fifty copies, called read replicas, spread across regions handle those requests. Every change on the primary is passed to each copy. The costs: a copy can be a moment behind, and one primary has a ceiling for writes.
Remember
Before you scale an app, find out whether it mostly reads or mostly writes.
