sebdah / dynamic-dynamodb

Dynamic DynamoDB provides auto scaling for AWS DynamoDB
http://dynamic-dynamodb.readthedocs.org/
Apache License 2.0
618 stars 124 forks source link

Limit the number of downscale actions #296

Open kennethjor opened 8 years ago

kennethjor commented 8 years ago

DynamoDB is limited by default to 4 downscales per 24 hours. I'm finding that Dynamic DynamoDB exhausts this limit in the first hours of each day, scaling up and down, often leaving us severely over capacity for more than half the day. Is there currently a way to limit the number of downscaling actions performed? Perhaps a cooldown period or something?

danutDiac commented 8 years ago

You can set the interval of the checks to once each 6 hours (4 times per day), and set your downscale rules accordingly.

kennethjor commented 8 years ago

True, but then I would also limit the number of scaling up actions. I'd like to scale up fast, but only limit scaling down.

danutDiac commented 8 years ago

You can have a separate config designed for upscale that will also have a rule for downscale that won't ever (or rarely) be executed, and run that separately.

kennethjor commented 8 years ago

That would be a workaround yes.

Perhaps we could add decrease-reads-cooldown and decrease-writes-cooldown parameters so it automatically waits for a configured number of seconds since the last scale down before executing another one.

fedenusy commented 8 years ago

num-read-checks-before-scale-down and num-write-checks-before-scale-down may achieve the same effect.

tmitchel2 commented 8 years ago

Although much less mature than dynamic-dynamodb, my implementation at https://github.com/channl/dynamodb-lambda-autoscale might suit you as it segments the remaining daily time period by the remaining allowance of downscaling operations.