Closed
Description
DynamoDB is provisioned at a certain ops/sec level which can be scaled up and down. For the past several months we have been using AWS' auto-scaler (#507) but it doesn't really meet the requirement: it will sometimes scale up after some brief peaks in throughput, and hotspotting (#733) can reduce throughput which provokes it to scale down.
The key thing in Cortex is the flush queue - we should scale up when the queue is building, and can scale down when it is below some reasonable length (10K?). Note DynamoDB has limits on how often you can scale down in a 24-hour period; check the docs.