hot take: databases should be single-threaded
someone a long time ago decided that database shards should be multi-threaded. ever since then, we've had to worry about transactions, serializability, race conditions, and locking.
instead, we should have single-threaded shards, and shard aggressively and early.
we switched from servers to serverless by building apps with statelessness in mind. it's time to switch from multi-threaded DBs to sharded single-threaded DBs by building apps with sharding in mind.
many will say that you can't JOIN across shards if you do this. but if you're JOINing across shards on your *writer* node you're already doing something wrong in the current world. your read replicas will still be able to JOIN just fine.
that way, scale comes naturally with no extra effort.
sharding sounds hard but is it really harder than worrying about transaction guarantees with every query you do?
(yes, i'm serious. at the very least i think this type of database is extremely underexplored.)