How does throttling on my global secondary index affect my Amazon DynamoDB table?

Last updated: 2021-11-05

My global secondary index (GSI) is being throttled. How does this affect the base Amazon DynamoDB table?

Short description

Throttling on a GSI affects the base table in different ways, depending on whether the throttling is for read or for write activity:

  • When a GSI has insufficient read capacity, the base table isn't affected.
  • When a GSI has insufficient write capacity, write operations don't succeed on the base table or any of its GSIs.

For more information, see Using global secondary indexes in DynamoDB.

Resolution

To prevent throttling, do the following:

  • Be sure that the provisioned write capacity for each GSI is equal to or greater than the provisioned write capacity of the base table. To modify the provisioned throughput of a GSI, use the UpdateTable operation. If automatic scaling is turned on for the base table, then it's a best practice to apply the same settings to the GSI. You can do this by choosing Copy from base table in the DynamoDB console. For best performance, be sure to turn on Use the same read/write capacity settings for all global secondary indexes. This option allows DynamoDB auto scaling to uniformly scale all the global secondary indexes on the base table. For more information, see Enabling DynamoDB auto scaling on existing tables.
  • Be sure that the GSI's partition key distributes read and write operations as evenly as possible across partitions. This helps prevent hot partitions, which can lead to throttling. For more information, see Designing partition keys to distribute your workload evenly.
  • Use Amazon CloudWatch Contributor Insights for DynamoDB to identify the most frequently throttled keys.

Did this article help?


Do you need billing or technical support?