Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Is it possible to set different capacities for table and index ? #46

Open
manjirinamjoshi opened this issue Oct 10, 2018 · 2 comments
Open

Comments

@manjirinamjoshi
Copy link

Hello,

Wondering if it is possible to set different values of read: minimum (capacities) for table and global secondary index ?

For e.g.
capacities:
- table: TestTable # DynamoDB Resource
index: # List or single index name
- test1-index
- test2-index
read:
minimum: 20 # Minimum read capacity
maximum: 100 # Maximum read capacity
usage: 0.70 # Targeted usage percentage
write:
minimum: 5 # Minimum write capacity
maximum: 40 # Maximum write capacity
usage: 0.7

I would like a different minimum read capacity for table. And, a different value for test1-index

If it is possible, then could you please show an example.

Thank you

Sincerely,
Manjiri

@manjirinamjoshi
Copy link
Author

Dont think AWS allows to set different values for table and index. But, still keeping the issue open, incase it is possible

@l-j-g
Copy link

l-j-g commented Mar 9, 2022

Hi -
I believe you can set the minimum provisioned read/write (non-scaling) in the resources section i.e :

           - IndexName: MarketCapIndex
              KeySchema:
                - AttributeName: GSI1PK
                  KeyType: HASH
                - AttributeName: Market Cap
                  KeyType: RANGE
              Projection:
                ProjectionType: ALL
              ProvisionedThroughput:
                ReadCapacityUnits: 2
                WriteCapacityUnits: 2

As a side note i recently had the experience of my dynamodb going into meltdown because the provisioned writes were not matched between the main table and the index. This can cause the write to fail, and the function to restart - in my cause it was a db initialization function which then started and failed over and over again.

AWS recommend, For best performance, be sure to turn on Use the same read/write capacity settings for all global secondary indexes

More on this here: https://aws.amazon.com/premiumsupport/knowledge-center/dynamodb-gsi-throttling-table/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants