einaregilsson / beanstalk-deploy

GitHub action (and command line script) to deploy apps to Elastic Beanstalk
MIT License
624 stars 136 forks source link

Make maximum exponential back-off retries configurable #76

Closed n-hebert closed 2 years ago

n-hebert commented 2 years ago

Hello! :wave:

The new version works great! We do have a few environments that still fail due to heavy load, so I came up with a small change to fix that.

This will allow users to back off to arbitrary lengths, if they have heavy load environments.

n-hebert commented 2 years ago

I'm also thinking that the jitter of 500ms is too small since the rate limit "bucket" probably refills at 20 calls per second and 500ms leaves all of the envs in a matrix fairly close together.

A 2000ms or even higher would help ungroup the calls. (e.g. https://github.com/rewindio/beanstalk-deploy/tree/hotfix/increase-jitter)

n-hebert commented 2 years ago

Some AWS blog reading on this shows that we may want to look into "Decorrelated" or "Full" jitter alternatives to the current impl. https://aws.amazon.com/blogs/architecture/exponential-backoff-and-jitter/

einaregilsson commented 2 years ago

Sorry, haven't had time to look at this, will do so when I get back to Iceland in a few weeks.

n-hebert commented 2 years ago

No worries! We've taken it the changes submitted here for a test drive and they work.

Implementing the jitter properly to the spec linked above should simply speed it up :smile:

n-hebert commented 2 years ago

Hi @n-hebert - I'm sorry to report that Einar passed away earlier this year.

My name is Gissur and I have assumed stewardship over Einar's GitHub account on behalf of his widow.

On to the PR

This looks good to me, mostly.

Just some minor cleanup, which you can see in the comments.

Hi @gzur ,

Thanks for letting me know. I'm very sorry to hear. I send my condolences to his family and friends.


Regarding the PR, I'll patch those things up shortly.

n-hebert commented 2 years ago

Replaced by #96 since I don't have write-access to Rewind's fork