The Case for Single-Threaded, Aggressively Sharded Databases
By
lawrencechen
A baker's-dozen of insight crammed into one ring.
Summary
The article argues that most transactional databases should be single-threaded and aggressively sharded, challenging the conventional wisdom of multi-threaded database architectures. The author contends that single-threaded shards would eliminate many complexities like transactions, serializability, race conditions, and locking that plague multi-threaded systems. The post explores why this approach would work better for many applications, particularly B2B SaaS apps, by simplifying architecture and improving performance through sharding rather than threading.
Key quotes
· 4 pulledhot 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
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
You might also wanna read
Three Years In: A Senior Engineer's Reflection on AI's Impact on the Software Development Role
A senior engineer reflects on the long-term sustainability of AI tools in software development, three years into deep organizational adoptio
Three Years In: A Senior Engineer's Reflection on AI's Impact on the Software Development Role
A senior engineer reflects on the long-term sustainability of AI tools in software development, three years into deep organizational adoptio
Bijou64: A variable-length integer encoding that's both correct and accidentally fast
This article describes the development of bijou64, a variable-length integer (varint) encoding created for the Subduction CRDT sync protocol
Bijou64: A variable-length integer encoding that's both correct and accidentally fast
This article describes the development of bijou64, a variable-length integer (varint) encoding created for the Subduction CRDT sync protocol
Domain Expertise, Not Code, Is the True Competitive Advantage in Software
The article argues that true competitive advantage ("moat") in software has always been domain expertise—deep understanding of the business
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
