2
votes

Dynamo db documentation says, "In order for a table write to succeed, the provisioned throughput settings for the table and all of its global secondary indexes must have enough write capacity to accommodate the write; otherwise, the write to the table will be throttled. Even if no data needs to be written to a particular global secondary index, the table write will be throttled if that index has insufficient write capacity."

Does this mean, we need to maintain similar level of throughput on all secondary indexes even though the contents of it are going to be very less?

1

1 Answers

2
votes

No It is not necessary to maintain similar level of throughput on all secondary indexes as of the throughput of the table

The write to the table will not throttled when it is not written in Index.

We set indexes on table for fast retrieval based on non-key attributes and some times those attributes need not to be added when adding row in a table, at that time item in index will not be written. And it is not necessary to provisioned the write capacity on index as of the write capacity of the table.

Please refer to the Global Secondary Indexes FAQ for details, specifically Can I provision throughput separately for the table and for each global secondary index?:

Yes. GSIs manage throughput independently of the table they are based on. You need to explicitly specify the provisioned throughput for the table and each associated GSI at creation time. [...]

Depending upon on your application, the request workload on a GSI can vary significantly from that of the table or other GSIs. Some scenarios that show this are given below: [...]

As your needs evolve, you can change the provisioned throughput of the GSI, independently of the provisioned throughput of the table.