OpenAI Is Running PostgreSQL at Millions of QPS (Here’s How It Didn’t Explode)
dev.to·5h·
Discuss: DEV
Preview
Report Post

PostgreSQL has a reputation.

Great database.

Rock‑solid.

But “web‑scale”? Eh…

OpenAI just published how they’re running Postgres at millions of queries per second for ~800 million users.

With:

  • One primary
  • ~50 read replicas
  • And no sharding (for Postgres)

Let’s talk about what actually made this work.


The Architecture (Surprisingly Simple)

  • Single primary PostgreSQL
  • Writes go to the primary
  • Reads go almost everywhere else
  • ~50 read replicas across regions

This only works because the workload is:

  • Extremely read‑heavy
  • Ruthlessly optimized

Postgres wasn’t the bottleneck. Bad assumptions were.


The Failure Mode That Kept Biting Them

Every major incident followed the same pattern:

  1. Cache fails / misses spike
  2. Exp…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help