The boring database choices I keep making
Postgres, one primary, UUIDv7 keys and migrations that only ever add things.
I’ve worked on five production databases in ten years. These are the choices I’d make again on day one.
One Postgres primary, for longer than you think
A single primary with a read replica handled 9,000 writes per second at my last job. We talked about sharding for two years and never needed it.
UUIDv7 for primary keys
They sort by creation time, so inserts land at the end of the B-tree instead of all over it. You get the merge-friendliness of UUIDs without the index bloat of random v4 keys.
Migrations only add
Add a column, backfill it, switch reads, then drop the old one a release later. Every step is safe to deploy on its own and safe to roll back.