Partitioning and Request Routing
The Problem With "Just Ask Every Node"
A naive distributed key-value store might broadcast a lookup to every node and let the fastest/correct answer win, or maintain a global index that every write must update. Both approaches trade write cost or fan-out latency for query flexibility. DynamoDB refuses that trade: the partition key is mandatory on every read/write API call, and the hash of that key determines, deterministically and in O(1) after a metadata lookup, exactly one partition to talk to. There is no fan-out on the hot path.
The Five-Tier Architecture
The 2022 USENIX paper describes DynamoDB's internal architecture as five tiers:
Client
│
▼
┌─────────────────┐
│ Request Router │ ◄── stateless, horizontally scaled, terminates TLS,
│ (fleet) │ authenticates via IAM, looks up partition metadata
└────────┬─────────┘
│ "which storage nodes own partition for key K?"
▼
┌─────────────────┐
│ MemDS │ ◄── in-memory metadata service: partition map,
│ (metadata svc) │ current leader per replication group, key ranges
└────────┬─────────┘
│ routing decision returned + cached by Request Router
▼
┌─────────────────┐
│ Storage Nodes │ ◄── B-tree + write-ahead log per replica (Section 2),
│ (replication grp)│ leader handles the write, replicates via Paxos
└────────┬─────────┘
│ background: split decisions, load balancing, health
▼
┌─────────────────┐
│ Auto Admin │ ◄── control plane: decides partition splits, moves,
│ (control plane) │ replaces unhealthy replicas
└────────┬─────────┘
│ cold data, backups, point-in-time recovery
▼
┌─────────────────┐
│ S3 │ ◄── archival tier — backups and PITR restore from here
└─────────────────┘
The Request Router Caching Trick
A naive design would have every request router cache the entire table's partition map. At DynamoDB's scale (millions of tables, some with tens of thousands of partitions), that cache would be enormous and constantly stale. Instead:
- Each request router only caches metadata for the specific partitions it has recently routed to — not the whole table.
- Every single request — cache hit or cache miss — still sends an asynchronous call to MemDS.
This second point looks wasteful until you see why it exists: if request routers only called MemDS on a cache miss, then any event that invalidated caches broadly (a MemDS fleet restart, a mass partition rebalance) would cause a simultaneous stampede of cache-miss traffic against MemDS, exactly when MemDS is least prepared for a spike. By always sending a "shadow" call regardless of cache outcome, MemDS's traffic volume stays constant — cache hits and misses look the same from MemDS's point of view. This is a "constant work" pattern: pay a small fixed tax on every request in exchange for eliminating a correlated-failure spike. The same pattern shows up all over well-run distributed systems (fixed-rate heartbeats instead of on-demand health checks, for the same reason).
Partition Limits and Splits
Two hard, separate limits govern when a partition splits:
| Limit | Value | Trigger |
|---|---|---|
| Size | 10 GB per partition | "Split for size" — once a partition's data exceeds 10 GB, Auto Admin splits it into two, each taking half the key range |
| Throughput (per partition, per replica group) | 3,000 RCU or 1,000 WCU, sustained | "Split for heat" — even a partition well under 10 GB gets split if it's sustaining throughput near this ceiling |
Split for heat is the mechanism most engineers have never heard of and most need to understand, because it directly explains hot-partition behavior in the Adaptive Capacity and Hot Partitions part. When Auto Admin detects a partition is consistently near its throughput ceiling, it splits that partition's key range into two new partitions — even though the total data size doesn't require it — so that the previously-concentrated throughput can (in theory) be served by two leaders instead of one.
What AWS Has Not Published
Worth stating plainly rather than guessing: AWS has never publicly specified the exact hash function used to map a partition key to a point in the keyspace, nor the exact internal keyspace layout (whether it is a true consistent-hashing ring like Cassandra's, or a simpler range-partitioned scheme managed centrally by MemDS and Auto Admin). What is documented and can be relied on: the mapping is deterministic (the same key always resolves to the same partition, until that partition is split), and the routing decision is looked up rather than computed by the client — a client-side SDK does not attempt to predict which physical partition a key maps to; it always goes through a Request Router. This is a meaningful difference from Cassandra's token-aware drivers, which do compute the target replica client-side from the ring topology to save a network hop. DynamoDB's fully-managed model trades that client-side optimization away in exchange for never exposing ring topology as a concept the application needs to know about.
A Worked Example: Following One Request
PutItem(TableName="Orders", Item={pk: "CUSTOMER#48219", sk: "ORDER#2026-07-11#001", ...})
1. Client SDK sends the request over HTTPS to the DynamoDB endpoint for the region.
2. A Request Router in the fleet receives it, authenticates via IAM (Signature V4),
and extracts the partition key "CUSTOMER#48219".
3. Router checks its LOCAL cache: "do I know which partition serves CUSTOMER#48219?"
- Cache hit (router recently routed for this key): use cached mapping,
but STILL send an async shadow call to MemDS (the "constant work" pattern).
- Cache miss: synchronously call MemDS, cache the result for next time.
4. MemDS returns: "CUSTOMER#48219 lives in partition P-7f3a, leader replica on
storage node stg-node-118, in AZ us-east-1a."
5. Router forwards the write directly to stg-node-118.
6. stg-node-118 (the leader) appends to its write-ahead log, replicates the
log entry to the two follower replicas in stg-node-204 (AZ 1b) and
stg-node-331 (AZ 1c), and waits for a QUORUM ack (itself + one follower = 2 of 3).
7. On quorum ack, the leader applies the entry to its local B-tree and returns
success to the Router, which returns success to the client.
Total hops on the hot path: client → router → leader storage node → quorum ack.
No fan-out. No comparison of multiple replicas. No query planning.
The Invariants
- Guaranteed: every read/write API call resolves to exactly one partition (or, for transactions, a bounded small set of partitions) — no query ever silently fans out across the whole table.
- Guaranteed: partition splits are transparent to the client — no downtime, no API change, no need to know your own partition topology.
- Not guaranteed: that your chosen partition key distributes traffic evenly. DynamoDB's routing layer has no opinion about your key design — it faithfully routes however lopsided your traffic is to however lopsided your partitions are. The Adaptive Capacity and Hot Partitions part covers what happens next.