KoteiIto / node-athena

a nodejs simple aws athena client
MIT License
105 stars 73 forks source link

Feature/linear poll #3

Closed break-pointer closed 6 years ago

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.01%) to 97.222% when pulling 2eb078d4089df3f8f6ff68ab64a29a9276885bfb on nuviad:feature/linear_poll into 280d37efad3e854fb9e243dfb2a31a342249feb9 on KoteiIto:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.01%) to 97.222% when pulling 2eb078d4089df3f8f6ff68ab64a29a9276885bfb on nuviad:feature/linear_poll into 280d37efad3e854fb9e243dfb2a31a342249feb9 on KoteiIto:master.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.01%) to 97.222% when pulling 2eb078d4089df3f8f6ff68ab64a29a9276885bfb on nuviad:feature/linear_poll into 280d37efad3e854fb9e243dfb2a31a342249feb9 on KoteiIto:master.

KoteiIto commented 7 years ago

Exponential backoff is recommended according to the following documents. https://docs.aws.amazon.com/general/latest/gr/api-retries.html

break-pointer commented 7 years ago

Thank you for the link!

We tried exponential backoff and it performed extremely bad for us. Because we couldn't come up with optimal parameters of exponent and current implementation lacks limiting max wait timeout.

I guess it's reasonable to implement two options to choose from and improve current implementation of exponential backoff by adding max time to wait config setting.

KoteiIto commented 7 years ago

Setting a maximum waiting time is a good idea. I implemented it with the following pull request. https://github.com/KoteiIto/node-athena/pull/5 There seems to be a bug in exponential backoff logic.