bolshakov / stoplight

:traffic_light: Traffic control for code.
http://bolshakov.github.io/stoplight/
MIT License
384 stars 40 forks source link

Should stoplight use exponential backoff? #110

Closed lfv89 closed 6 years ago

lfv89 commented 7 years ago

As I can see, stoplight always wait the same amount of time before switching from red to yellow.

After a few unsuccessful attempts it could wait longer and longer, and so on...

I would be glad to jump into this if it's interesting.

tfausak commented 7 years ago

Thanks for suggesting this! You're right: Stoplight always waits the same amount of time to switch from red to yellow. It is configurable on a per-stoplight basis, but it's always a constant. If this can be added in a way that doesn't over complicate the implementation or the exposed API, I think I'd be in favor of it.

lfv89 commented 7 years ago

Great news, I'm gonna take these factors in consideration and start to build something.

See you soon 😄

tfausak commented 6 years ago

Closing because I would prefer to keep Stoplight's API simple. If you want to open a PR for this, I will happily review it.