The DynamoDB documentation recommends implementing client-side retries with exponential backoff when a ProvisionedThroughputExceededException
is received. My team
has already implemented this as a wrapper around Vogels, but we'd love to push this feature down into Vogels if you're open to the contribution.
The model definition might be good place to enable this feature. For example:
var Account = vogels.define('Account', {
hashKey : 'email',
timestamps : true,
retries: true,
schema : {
email : Joi.string().email()
}
});
When this flag is defined, the model should automatically retry all reads and writes in the event of a ProvisionedThroughputExceededException
error. It will use full jitter exponential backoff as described by https://www.awsarchitectureblog.com/2015/03/backoff.html.
What do you think?
👍