Imagine it’s 9:00 AM on a Tuesday. Your e-commerce platform just launched a limited-edition drop. Within seconds, millions of users are hitting the same product ID. In the old world of distributed databases, this is the “Black Swan” event—the dreaded Hot Partition. One physical server is being hammered into the dirt while ninety-nine others sit idle, sipping their metaphorical coffee.
For years, the “Hot Partition” was the tax we paid for massive scale. We were told to “design your keys for uniform distribution” or “add a random suffix to your partition keys.” We were effectively being asked to do the database’s job: managing the physics of hardware limits.
But something changed. Over the last few years, Amazon DynamoDB quietly engineered its way out of this constraint. Today, DynamoDB doesn’t just handle hot partitions; it flattens them in real-time, rebalancing throughput at microsecond granularity without you ever seeing a ProvisionedThroughputExceededException.
Let’s peel back the curtain on the distributed systems wizardry that makes this possible.
The Physics of the Problem: Why Partitions Get “Hot”
To understand the solution, we have to respect the problem. DynamoDB is a key-value and document store built on top of Consistent Hashing.
When you create a table, DynamoDB doesn’t store it as one giant file. It splits your data into Table Partitions. Each partition is a subset of your data, backed by SSDs and replicated across three Availability Zones (AZs) using the Paxos consensus protocol.
Historically, these partitions had hard “speed limits”:
- 3,000 Read Capacity Units (RCUs) per partition.
- 1,000 Write Capacity Units (WCUs) per partition.
- 10 GB of data per partition.
If your table was provisioned for 10,000 RCUs and had 10 partitions, DynamoDB would traditionally allocate 1,000 RCUs to each. If Partition A received 1,200 requests while Partition B received 0, Partition A would throttle—even though you were only using 12% of your total table capacity.
This is the “Throughput Dilution” problem. As your table grows in size, your data is spread across more partitions, and your per-partition throughput limit effectively drops.
The First Evolution: Burst Capacity and the “300-Second” Window
The first attempt to solve this was Burst Capacity. DynamoDB began allowing partitions to “save up” unused capacity for a rainy day. If a partition wasn’t busy, it could store up to 300 seconds (5 minutes) of unused RCU/WCU.
# The logical math of Burst Capacity
unused_capacity = min(
(current_time - last_request_time) * provisioned_rate,
provisioned_rate * 300
)
While helpful for short spikes, burst capacity was a band-aid. If the “hot” event lasted 6 minutes, the bucket ran dry, and the throttling returned. It wasn’t true rebalancing; it was just a temporary overdraft facility.
The Breakthrough: Adaptive Capacity and the Global Admission Control (GAC)
In 2017, AWS introduced Adaptive Capacity, but the real magic happened in 2019 when they made it instantaneous.
To achieve this, the DynamoDB team had to decouple the Logical Throughput (what the user asks for) from the Physical Throughput (what the hardware provides). They introduced a sophisticated layer called Global Admission Control (GAC).
How GAC Functions as the “Traffic Cop”
Think of the GAC as a highly distributed, ultra-low-latency tracking system. Instead of individual partitions making local decisions about whether to throttle a request, they consult the GAC.
- The Heat Map: Every partition continuously reports its “heat” (consumption metrics) to a central (but shard-replicated) monitoring service.
- The Token Bucket Migration: If Partition A is seeing a massive spike, the GAC identifies that Partitions B through Z are underutilized.
- Instant Reallocation: The GAC dynamically increases the “soft limit” for Partition A. It essentially “borrows” the unused throughput from the rest of the table and assigns it to the hot partition.
The kicker? This doesn’t require moving data. In the past, “rebalancing” meant splitting a partition and moving 5GB of data to a new server—a process that took minutes. Modern Adaptive Capacity changes the logic, not the location, of the data.
Under the Hood: Microsecond Granularity via “Token Buckets”
How does DynamoDB do this at microsecond granularity? It uses a refined version of the Leaky Bucket Algorithm implemented at the Request Router layer.
When a request hits a DynamoDB endpoint, it first lands on a Request Router. The Router needs to decide in less than a millisecond if this request should be allowed.
The Anatomy of a Request Decision
- Request Arrival: A
GetItemcall hits the Router forPartitionKey: "PRODUCT_DEAL_2024". - Router Cache Check: The Router checks its local cache for the “token bucket” status of that specific partition.
- GAC Synchronization: If the local bucket is low, the Router makes a sub-millisecond call to the Global Admission Control service.
- Dynamic Refill: The GAC looks at the total table-level consumption. Since the table as a whole has headroom, it grants the Router additional tokens for that specific hot key.
This happens so fast that it’s effectively transparent. The system isn’t waiting for a human or a slow monitoring script to trigger a scaling event; the admission control logic is a closed-loop feedback system that operates at the speed of the network stack.
Managing the “Noisy Neighbor” in Multi-Tenant Architecture
DynamoDB is a multi-tenant service. Your data lives on the same physical NVMe SSDs as other AWS customers. Solving the hot-partition problem for you must not impact the performance for them.
This is where Internal Admission Control comes in. DynamoDB uses a “Hierarchical Token Bucket” strategy:
- Level 1: Table-Level Tokens. (The capacity you pay for).
- Level 2: Partition-Level Tokens. (The 3k/1k physical hardware limits).
- Level 3: Node-Level Tokens. (The total capacity of the physical EC2-like instance).
If your partition gets “hot,” Adaptive Capacity can raise your Level 2 limit to match your Level 1 limit (up to the physical maximum of the node). However, if the Physical Node (Level 3) starts to saturate because multiple customers are having “hot” moments simultaneously, DynamoDB’s Autonomic Control Plane kicks in.
The “Silent” Partition Migration
If a node becomes physically hot, DynamoDB uses Live Partition Migration. It uses the Paxos replicas to “seed” a new replica on a colder node. Once the new replica is in sync, the Leader role is handed over, and the old, hot node is decommissioned.
This is the ultimate engineering flex: DynamoDB can move your “hot” data to a faster lane of hardware while it’s being actively queried, with zero downtime.
Impact of “On-Demand” Mode: The Death of Capacity Planning
The culmination of these technologies led to the launch of DynamoDB On-Demand.
In On-Demand mode, you don’t even specify RCUs or WCUs. You just pay per request. Behind the scenes, the Adaptive Capacity engine is running on overdrive. It treats your entire table as a fluid pool of resources.
The technical substance here is the Predictive Scaling algorithm. By analyzing the rate of change ($\Delta$) of your request volume, DynamoDB pre-splits partitions before they even hit the 3,000 RCU limit.
P_{future} = P_{current} + \left( \frac{dP}{dt} \times \text{BufferTime} \right)
If the system sees your traffic doubling every 10 seconds, it doesn’t wait for you to hit the wall. It triggers a proactive partition split to ensure that the “Physical Limit” stays well ahead of the “Consumption Curve.”
Best Practices in the Era of Infinite Rebalancing
Does this mean we can stop worrying about schema design? Not entirely.
While DynamoDB can handle a hot partition, it cannot violate the laws of physics. A single partition key still has a physical ceiling (roughly 3,000 RCUs/1,000 WCUs if the data is served from a single leader). If a single item (one specific row) is requested 50,000 times per second, you will still hit a bottleneck because that item cannot be split across multiple nodes.
To truly leverage microsecond rebalancing, engineers should still follow these “Modern Dynamo” rules:
- Avoid “Super-Hot” Items: If you have a single row that everyone needs to read (like a global configuration), use DynamoDB Accelerator (DAX) or an in-memory cache.
- Use Large Cardinality for Partition Keys: The more partitions you have, the more “levers” the Adaptive Capacity engine has to pull.
- Embrace On-Demand for Unpredictable Workloads: Don’t try to out-guess the GAC. For most apps, the slight premium for On-Demand is cheaper than the engineering hours spent tuning provisioned capacity.
The Engineering Curiosity: How do they test this?
One of the most fascinating aspects of DynamoDB’s rebalancing is how AWS tests it. They use a technique called Formal Methods, specifically TLA+.
Because the logic for moving tokens between partitions is so complex and happens so fast, traditional testing can’t catch every edge case. AWS engineers write formal proofs to ensure that their rebalancing algorithms can never enter a “deadlock” state where two partitions are waiting for the same tokens, or where a “split” operation causes data inconsistency.
Furthermore, they use Game Day Simulations where they intentionally “flood” specific keys in massive test clusters to ensure the GAC responds within the expected millisecond windows.
Closing the Loop
The evolution of DynamoDB from a strict, partitioned database to a fluid, “shape-shifting” data store is a masterclass in distributed systems engineering. By decoupling logical throughput from physical storage and implementing Global Admission Control, AWS has effectively solved one of the oldest problems in the book.
The “Hot Partition” is no longer a bug; it’s just another state that the system is designed to handle. For developers, this means one thing: Focus on your business logic. The database is finally smart enough to handle the heat.
The next time your app goes viral, take a second to appreciate the silent work of the GAC—calculating tokens, shifting heat, and rebalancing the load, all in the time it takes for a photon to travel a few hundred miles.
That is the power of serverless at scale.
Key Takeaways for the Technical Lead:
- Adaptive Capacity is now instantaneous, removing the need for manual “key salting” in many use cases.
- Global Admission Control (GAC) acts as a distributed arbiter that allows hot partitions to “borrow” unused capacity from the table’s global pool.
- Physical limits (3k RCU/1k WCU) still exist at the hardware level, but DynamoDB mitigates this by proactively splitting partitions and moving replicas to “cool” nodes.
- Schema design still matters for single-item hotness, but partition-level hotness is largely a solved problem.