Last night, I caused something on X by saying that (most) transactional databases should be single-threaded and aggressively sharded:
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,… — Konsti Wohlwend (@konstiwohlwend) December 18, 2025
I have a lot more to say than would fit in a tweet, and the tweet also got more attention than I thought, so here's a lengthy blog post.
(There's no solution that solves every problem. But I hope I can convince you that aggressively sharded, single-threaded databases would suit you best more often than you'd think, even if you're "just" building a generic B2B SaaS app.)
The Status Quo
In essence, a traditional SQL database can write and read to rows in a table. It can also lock those rows, meaning that other writers may have to wait for the lock to be freed.
... continue reading