Database Reference
In-Depth Information
Error retry and exponential back off
Whenever any of the previously mentioned errors or exceptions occur, the REST client will
not retry (irrespective of whether the error can be resolved by retrying) automatically. But
in the case of the SDK, it will automatically retry. So it is our responsibility to program it in
such a way that it retries until what we feel is the end. But there should be some reasonable
delay between the retries, and this delay should increase exponentially.
Amazon recommends that we increase this delay value (starting with 50 ms) exponentially
in each stage. This value can be increased until it reaches a minute. After this, we have to
make this transaction fail. But it is completely in the programmer's hands. If the program-
mer needs to disable this retry, then he can set maxErrorRetry to 0.
In the case of a batch operation ( BatchGetItem and BatchWriteItem ), the frame-
work will not retry the entire batch because a single batch operation can operate on mul-
tiple tables at a time. In the case of the BatchGetItem request, the tables and primary
keys in BatchGetItemrequests are returned in the UnprocessedKeys parameter
of the request. For BatchWriteItem , the tables and primary keys in the
BatchWriteItem requests are returned in UnprocessedItems . With the help of
these two parameters, we can easily retry only the failed requests.
Search WWH ::




Custom Search