DynamoDB On Demand Provisioned Cost Optimization

0

Customer reached out looking for options to cut their monthly Dynamo spend. Majority of their spend is WriteRequestUnits and I recommended (if it fit with their usage patterns) consider provisioned capacity, enable auto-scaling, then consider a capacity reservation.

Customer feels that their workload is too unpredictable and they have varying throughput needs so provisioned might be more expensive than on-demand.

What guidance can we provide customers for cost savings using on-demand capacity?

They mentioned deleting PITR for non-critical tables, possibly using AWS Backup to story last 2-3 days of data vs PITR which saves 30 days of data but that seems to be limited in terms of savings.

Thanks!

asked 3 years ago1166 views
1 Answer
0
Accepted Answer

Provisioned capacity mode is an option when you have predictable application traffic and you use the autoscaling to adjust the capacity in response to changing traffic. However you will get throttled if the request rate exceeds the provisioned capacity. Note that it is very unlikely to operate at 100% utilization of the provisioned capacity to be cost efficient. You can use the ReturnConsumedCapacity parametercin the request to see in the response exactly how much capacity the operation consumed.

Given that the customer has unpredictable request pattern, the On-Demand capacity mode will be more appropriate. And note that a newly created table with On-Demand capacity mode can serve up to 4000 write request units or 12000 read request units or a combination of the two. With On-Demand capacity mode, the requests can burst up to double the previous peak on the table. Note that throttling can occur if the requests exceed double the previous peak within 30 mins. It may be possible that the traffic rate may be different and if your spikes are too high (more than double) than the default capacity or the previously achieved peak request rate, then one solution is to go with pre-warming the tables to the expected peak capacity as per the spike you anticipate.

Pre-warming the table can be achieved by following steps when you currently on On-Demand capacity mode.

  1. Switch to Provisioned Capacity Mode
  2. Wait for 24 hours(You can switch between the capacity modes once every 24 hours)
  3. Set the Write throughput to the desired peak value or 40000. [ You will incur cost of this high value of throughput until you switch back to On-Demand (few mins) ]
  4. Switch to On-Demand capacity mode. This should sustain the provisioned throughput capacity values.

Here is a blog that describes how one of our customer was able to achieve a 90% cost saving by opting for On-Demand capacity mode and they too had a spiky workload.

AWS
answered 3 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions