saltwaterc / dynamo-backup-streams Goto Github PK
View Code? Open in Web Editor NEWBackup / Restore DynamoDB node.js streams
License: MIT License
Backup / Restore DynamoDB node.js streams
License: MIT License
Hey Stefan,
I have a feature request I would love to discuss with you.
We have steady user traffic on the dynamodb and the capacity percentage option in combination with back pressure/retries helps a lot in not throttling the requests from the user. But that solution does not always scale and you need to be careful setting fitting auto-scaling and capacity percentage values.
Example:
Do you have the same "problem"? How do you handle it?
What about another approach:
Thinking about that, I guess there is still a potential dead zone where backup has no capacity and/or auto-scaling is not kicking in.
Just some starting point for a discussion. The current implementation is working for our use case.
Cheers, Marcel
Hey @SaltwaterC,
fist of all: Your lib is the only one handling retries, back pressure and capacity percentage in a good way! Awesome work! Thank you! ๐
One error I run into is at the end of the restore process:
...
progress: 8834288 / 8834288 bytes - 100%; read items: 172653 - restored items: 170123; max write capacity: 180 - used 184 by 10 threads
Restored items: 170281
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 170923; max write capacity: 180 - used 183 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 171730; max write capacity: 180 - used 180 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172535; max write capacity: 180 - used 185 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
progress: 8834288 / 8834288 bytes - 100%; read items: 172802 - restored items: 172784; max write capacity: 180 - used 161 by 10 threads
restoreStream: Error: Fail: too many retries when writing records
Code is basically:
...
.pipe(gunzip)
.on('error', handleError(`gunzip`))
.pipe(restoreStream)
.on('error', handleError(`restoreStream`))
.on('end', () => {
logger.info('Restored items: %d', restoreStream.processedLines);
});
So as you see
Do you have any idea?
Thx
Marcel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.