Why one database eventually breaks
A single Postgres instance on a db.r6g.16xlarge (64 vCPU, 512 GB RAM) can handle roughly 50k simple reads/sec and ~5k writes/sec before latency climbs past 50 ms. For a mid-size product that number is fine β until it isn't.
Two independent bottlenecks hit at different times:
- Read throughput: your reporting queries, search, and API reads swamp the CPU. The writes are fine.
- Write throughput / storage: insert rate exceeds what one disk and WAL pipeline can absorb; or you simply have more data than fits in one machine's storage budget.
The solutions are also independent: replication solves (1); sharding solves (2). Using sharding to solve (1) β when replication would have sufficed β is one of the most common premature optimization mistakes in system design. Reach for read replicas first.
