Imagine the final of a band contest in a city park. The audience votes by phone, the big screen shows a live total, and thousands of votes per second pour in, most of them for one favourite band. The table runs in on-demand mode, so it "should scale automatically". Instead, the logs fill up with ThrottlingException .
I wrote a full hands-on guide on DynamoDB write sharding with a working voting API. This post sums up the ideas behind it.
One key, one partition, one hard ceiling
DynamoDB spreads data across physical partitions by partition key. According to the AWS documentation, a single partition delivers at most 1,000 write units and 3,000 read units per second, no matter how big the table is or which capacity mode you use. On-demand scales the table as a whole, not a single key.
Adaptive capacity helps with uneven load and can even isolate a very popular item on its own partition. That item still never gets more than 1,000 write units per second.β¦