Reputation: 9522
Reading the current dynamodb provisioned write units the api docs recoment to wait for tableExists
E.g:
dynamodb.waitFor('tableExists', params, function(err, data) {...}
Developing an application which will scale a lot on traffic peaks I'm curious about:
What is the state of DynamoDB while scaling the throughput?
Am I right with my understanding that DynamoDB is fully down/offline while scaling the provisioned throughput write units?
Upvotes: 0
Views: 114
Reputation: 21
Your DynamoDB tables is available for read and write transactions while you scale the throughput of your tables up or down.
When you scale your write throughput up, you end up calling UpdateTable API underneath, which changes the table status to UPDATING. After this call, DynamoDB scales your throughput and adds more resources. During this time, your table will be available for reading and writing. Once the scaling operation is completed, it flips to ACTIVE.
To your specific question on waitFor()
- it is a wrapper that calls describeTable() periodically. So, you can make it for table to become ACTIVE state (which is equivalent of tableExists parameter in the waitFor() function).
Upvotes: 2