Database Reference
In-Depth Information
If you have items larger than 4 KB, then you have to round up the size to the next multiple
of 4. For example, if your item size is 7 KB (~8KB) and you need to read 100 items per
second, then the required read capacity units would be 200 for strong consistency and 100
capacity units for eventual consistency.
In the case of write capacity units, the same logic is followed. If the item size is less than
1 KB, then it is rounded up to 1 KB, and if item size is more than 1 KB, then it is rounded
up to next multiple of 1.
The AWS SDK provides auto-retries on ProvisionedThroughputExceededEx-
ception when configured though client configuration. This configuration option allows
us to set the maximum number of times HttpClient should retry sending the request to
DynamoDB. It also implements the default backoff strategy that decides the retry interval.
The following is a sample code to set a maximum of three auto retries:
// Create a configuration objectfinal
ClientConfiguration cfg = new ClientConfiguration();// Set
the maximum auto-reties to 3cfg.setMaxErrorRetry(3);
// Set configuration object in
Clientclient.setConfiguration(cfg);
Tip
Downloading the example code
You can download the example code files for all Packt topics you have purchased from
your account at http://www.packtpub.com . If you purchased this topic elsewhere, you can
visit http://www.packtpub.com/support and register to have the files e-mailed directly to
you.
Search WWH ::




Custom Search