Amazon DynamoDB doesn’t provide inbuild capabilities to auto tune throughput based on Dynamic Load. It provide API to increase or Decrease throughput. Customers are being charges hourly basis for provisioned read & write throughput.
What are the different ways to alter throughput of dynamodb and achieve cost saving benefits ?
If you use the AWS Management Console to create a table or a global secondary index, DynamoDB auto scaling is enabled by default. You can modify your auto scaling settings at any time. For more information, see Using the AWS Management Console with DynamoDB auto scaling.
You can perform a similar calculation to estimate how long it would take to bulk-load data into a Hive external table mapped to a DynamoDB table. Determine the total number of bytes in the data you want to load, and then divide it by the size of one DynamoDB write capacity unit (1 KB).
Provisioned Autoscaling Unlike on demand mode it operates on 1 minute average load and not peaks of 30 minutes time window — which means it both responds faster and does not does not overallocate as much. You can get aggressive scaling behavior similar to on-demand by simply setting the utilization target to 0.5.
DynamoDB auto scaling increases provisioned capacity when utilization exceeds 70 RCUs for at least two consecutive minutes. DynamoDB auto scaling decreases provisioned capacity when utilization is 20% or more below the target for 15 consecutive minutes (50 RCUs).
The answer from Chris is an accurate answer. Just to add a few points from prior experience using DynamoDB …
The situation with DynamoDB is different from EC2. The elastic compute service has an API supported directly as a web service by Amazon to allow you to program how to scale up or down according some logic such as how much demand exists. You program this by defining a monitoring threshold and automatically triggering creation or deletion of instances in a group.
Data servers do not work in the same way with triggers to adjust their capacity. But the capacity of DynamoDB is very flexible and may be controlled as Chris has pointed out. The API to provide this is good enough to make one off changes. Or equivalent manual changes from the console.
The different language bindings to program create and update actions with DynamoDB is here …
http://docs.aws.amazon.com/cli/latest/reference/dynamodb/index.html
The important operation to modify capacity is here …
http://docs.aws.amazon.com/cli/latest/reference/dynamodb/update-table.html
So this gives you the ability to make an increase or decrease in the ReadCapacityUnits or WriteCapacityUnits of ProvisionedThroughput.
Which is fine for a predicted or one-off change. But that is not the same thing as a flexibility tool to allow you to trigger the change automatically.
Programmatically, what you are most likely to want to do is to adjust capacity in response to change in utilization in the preceding time interval. In particular you may need to scale up rapidly in response to a surge in demand by defining an appropriate time slot and a lower and upper threshold to trigger.
A more complete solution to achieve this is described here …
https://aws.amazon.com/blogs/aws/auto-scale-dynamodb-with-dynamic-dynamodb/
The solution is maintained by Sebastian Dahlgren and may be found with all instructions at …
https://github.com/sebdah/dynamic-dynamodb
I see that the current release is 1.18.5 which is more recent than when I last used it.
Judging from earlier releases it is simple to configure by means of a dynamodb.conf properties style file …
Having provided credentials and region, the most crucial settings are
check-interval
— to test throughput in secondsmin-provisioned-reads, max-provisioned-reads; reads-upper-threshold, reads-lower-threshold; increase-reads-with, decrease-reads-with
— These are all percentagesmin-provisioned-writes, max-provisioned-writes; writes-upper-threshold, writes-lower-threshold; increase-writes-with, decrease-writes-with
— These are all percentagesIs this information up to date?
Well if you look at http://aws.amazon.com/new/ you will see just one additional recent change affecting DynamoDB which affects the documents stored. The entry for Dynamic DynamoDB is the last published entry dealing with scaling actions. So this is the best maintained DynamoDB automatic scaling capability at this time.
Amazon just added autoscaling for dynamodb, see the details here
I just discovered this project that will autoscale up and down your Dynamodb and looks better than Dynamic Dynamo, because it uses Lambda functions rather than EC2 instances:
https://github.com/channl/dynamodb-lambda-autoscale
You can manage throughput programmatically through the updateTable API or manually through the console.
There's also tools like Dynamic DynamoDB, though you could roll your own version as well: you'd use the updateTable API and have some background process running to detect those circumstances and call updateTable as necessary.
Some things to watch out for when changing the scale of DynamoDB:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With