The Complete DynamoDB Architecture: From Microseconds to Multi-Region
This is Not Your Mother's NoSQL DB. It is an Architecture that Would Have Made the Framer's Proud
Listen, I've been around the block a few times - and let me tell you something about distributed systems: they're like running a large organization. Everyone thinks they know how to do it better until they actually have to keep the lights on.
Watching Elon and Donald get mad at each other has made me yearn for systems that run smoothly. So I decided to compare DynamoDB to the history of our government. I will do an abysmal job of it, but stay with me.
Amazon DynamoDB? Now that's a system that keeps the lights on for hundreds of thousands of customers while processing 126 million requests per second.
Today, we're going to walk through the whole enchilada - from the microsecond caching layer to the multi-region replication that would make even the most complex bureaucracy jealous.
The Foundation: Core Architecture That Actually Works
Let me start with something that'll blow your mind faster than a complex economic theory - DynamoDB uses B-trees, not LSM-trees like everyone and their mother assumes. Yeah, you heard that right.
While the rest of the NoSQL world was having their LSM-tree party, Amazon quietly built its system on good old InnoDB-style B-trees.
Why? Because sometimes the old ways are the best ways, like how a classical education beats a dozen management consultants.
The system organizes data into partitions - think of them as 10GB filing cabinets that know how to replicate themselves. Each partition is like a small state in our federal system: autonomous enough to handle its own affairs but coordinated enough to work as part of the whole.
These partitions use consistent hashing, which, despite sounding like something from a cooking show, is actually a brilliant way to distribute data evenly across potentially millions of storage nodes.
Now, here's where it gets interesting—and I mean "constitutional convention" interesting. Each partition maintains exactly three replicas distributed across different Availability Zones. Not two, not four - three.
Keep reading with a 7-day free trial
Subscribe to Wired for Scale: Sid Rao's Musings to keep reading this post and get 7 days of free access to the full post archives.