AWS DynamoDB Auto-Scaling vs On-Demand Scaling
December 3, 2018 • 2 min read
AWS just announced on-demand scaling for DynamoDB which will automatically scale up and down the table’s throughput capacity. This is the best option if your application uses DynamoDB and must always be able to read and write from it. Also, here’s AWS’s recommended use cases
New applications, or applications whose database workload is complex to forecast
Developers working on serverless stacks with pay-per-use pricing
SaaS provider and independent software vendors (ISVs) who want the simplicity and resource isolation of deploying a table per subscriber
Where you still might want to use manual autoscaling policies is if you want to control the upper limits of your read and write capacity. With on-demand scaling, there is no upper limit. So for example, if your application were to receive a huge spike in traffic and reading from DynamoDB, it would happily scale up and serve those requests. But you would also pay for however high it scaled.
With a manually set scaling policy, you can set the upper and low limits of the scaling. So for example, you could set it at a minimum of 1 and a max of 20 read capacity. This would mean that no matter what you would always have at least 1 read capacity but never more than 20.
So now if you receive that same spike but have the max throughput to 20, DynamoDB will throttle those requests and preventing you from going over your max autoscaled threshold.
Within our team, we will likely switch most of our applications over to using the on-demand scaling since we want to always be able to serve requests, but you might choose to put a cap and design your application to handle throttles.
Update — here are some other great related articles and resources on this topic.