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

Remove throughput limit for on-demand tables #86

Open
cdhowie opened this issue Jan 8, 2019 · 3 comments
Open

Remove throughput limit for on-demand tables #86

cdhowie opened this issue Jan 8, 2019 · 3 comments

Comments

@cdhowie
Copy link

cdhowie commented Jan 8, 2019

DynamoDB has a new on demand pricing model, where you pay per request and do not provision any capacity. Since the cost is only per-request and not based on requests per second, it does not make sense to throttle reads from those tables.

An on-demand table has provisioned capacity values of 0:

"ProvisionedThroughput": {
  "NumberOfDecreasesToday": 0,
  "WriteCapacityUnits": 0,
  "ReadCapacityUnits": 0,
  "LastDecreaseDateTime": 1546977951.249
}
@majindageta
Copy link

majindageta commented Jul 10, 2019

Hello,
I had the same issue and managed to modify the code adding this:
this.onDemandReadCapacity = options.onDemandReadCapacity || 25;
to the dynamo-backup.js

and in the same file, in the _copyTable function i've added:
var limit = Math.max((data.Table.ProvisionedThroughput.ReadCapacityUnits * readPercentage) | 0, 1); if (data.Table.BillingModeSummary.BillingMode === 'PAY_PER_REQUEST') { limit = self.onDemandReadCapacity; }

When creating the instance of DynamoBackup just add a property like:
onDemandReadCapacity: 400

Thinking about doing a pull requests but the repo seems quite dead

@shanebdavis
Copy link

shanebdavis commented Apr 4, 2020

@majindageta I'd love for you to do a pull-request - or a fork if it isn't accepted. On-demand really is the better option for most people these days.

@majindageta
Copy link

Hello @shanebdavis, this is the pull-request #92
and you can find the change in my fork https://github.com/majindageta/dynamo-backup-to-s3

Have a good day!

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

3 participants