Sanchay
Sanchay

Reputation: 1113

How to compute initial Auto-scaling limits for DynamoDb table

Our table has bursty writes, expected once a week. We have auto-scaling enabled, with provisioned capacity as 5 WCU's, with 70% target utilization. This suffices for our off-peak (non-bursty) traffic. However, during the bursty writes, the WCU's reach around 1.5-2k, which leads to a lot of throttled writed and ultimately failures to write as well.

1) Is the auto-scaling suitable for such an use-case?

2) If yes, what should our initial provisioned capacity be?

Upvotes: 2

Views: 917

Answers (2)

F_SO_K
F_SO_K

Reputation: 14869

This answer will tell you why auto-scaling is not working for you: https://stackoverflow.com/a/53005089/4985580

This answer will tell you how you can configure your SDK to retry operations over a much longer period (and therefore stop your operation failures furing peak requests). What should be done when the provisioned throughput is exceeded?

Ultimately you should probably move your tables to on-demand.

For tables using on-demand mode, DynamoDB instantly accommodates customers’ workloads as they ramp up or down to any previously observed traffic level. If the level of traffic hits a new peak, DynamoDB adapts rapidly to accommodate the workload.

Upvotes: 1

Renato Byrro
Renato Byrro

Reputation: 3784

No, auto-scaling is not suitable for your needs. It takes a few minutes to scale up and it does that by increasing a fixed percentage of your current capacity at each time. There's also a limited number of times it scales up or down per day, so you can't get from 5 to 2,000 in a matter of minutes. You may not even get that in a matter of hours.

I'd suggest to try on demand mode, or manually setting capacity to 2,000 some time before you actually need it (it doesn't really scale instantly).

I strongly advise to read the ENTIRE dynamo documentation with regards to best practices for primary key, GSI, data architecture. Depending on the size of your table (lager that 10 Gb), the 2,000 units may get spread across partitions and you could potentially still have throttled requests.

Upvotes: 0

Related Questions