Reputation: 4917
Our DynamoDB is configured with On-Demand
capacity, but still seeing read/write throttling requests during high traffic hours.
Any clues?
Upvotes: 6
Views: 6228
Reputation: 33732
You could try to analyze how the partition keys for your write requests vary over the individual writes.. If too many write-requests for the same PK happen, it can overwhelm the partitions, and cause throttling.
Consider mixing up the PKs in BatchWriteItem calls, and also over time, so you don't hit the same partitions too frequently
Upvotes: 0
Reputation: 33392
On-Demand does not mean "unlimited throughtput". There is a limit, according to the docs:
If you recently switched an existing table to on-demand capacity mode for the first time, or if you created a new table with on-demand capacity mode enabled, the table has the following previous peak settings, even though the table has not served traffic previously using on-demand capacity mode:
- Newly created table with on-demand capacity mode: The previous peak is 2,000 write request units or 6,000 read request units. You can drive up to double the previous peak immediately, which enables newly created on-demand tables to serve up to 4,000 write request units or 12,000 read request units, or any linear combination of the two.
- Existing table switched to on-demand capacity mode: The previous peak is half the previous write capacity units and read capacity units provisioned for the table or the settings for a newly created table with on-demand capacity mode, whichever is higher.
I've also found an interesting article with some experiments and numbers: Understanding the scaling behaviour of DynamoDB OnDemand tables.
Upvotes: 6