Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can you manage write capacity for a global secondary index based on an autoscaled dynamodb table?

Global secondary indexes have capacity provisioned separately from the tables where they are applied. If insufficient write capacity is allocated for the GSI, then writes to the table are throttled. Therefore, if autoscaling for writes to the table is triggered, then one should expect that the write capacity of the GSI would need to be managed in response.

Autoscaling for table reads/writes can be configured through the AWS Management Console, via the CLI or using CloudFormation. The documentation posts sample JSON/YAML to accomplish this for table provisioning. However, when I attempt to create a new GSI on an autoscaled table, I see no options to mirror the table's settings. Nor can I find CLI or CloudFormation examples in the documentation on how to explicitly deal with indexes and auto-scaling.

So how do you manage write capacity for a GSI? Is my understanding of how things should work correct? Or does AWS "do the right thing" (in their opinion, anyway) and autoscale the GSI in parallel with the underlying table?

like image 662
user18728 Avatar asked Jul 21 '17 13:07

user18728


1 Answers

You can apply the same autoscaling settings for you global secondary indexes. According to AWS docs:

If you enable DynamoDB auto scaling for a table that has one or more global secondary indexes, we highly recommend that you also apply auto scaling uniformly to those indexes. You can do this by choosing Apply same settings to global secondary indexes in the AWS Management Console.

like image 109
Ivan Mushketyk Avatar answered Sep 24 '22 22:09

Ivan Mushketyk