gojek / heimdall

An enhanced HTTP client for Go
http://gojek.tech
Apache License 2.0
2.63k stars 214 forks source link

Add jitter for constant backoff #22

Closed pravj closed 6 years ago

pravj commented 6 years ago

As you're answering questions, I've created this small PR for the jitter requirement.

Currently, it's adding a random time (<= MAX) to the given backoff time. We can discuss if you want a different way for this.

pravj commented 6 years ago

cc @rShetty

rShetty commented 6 years ago

@pravj Sorry for the delayed response, will be checking this today

rShetty commented 6 years ago

@pravj Thanks for this PR. Do you also want to add this jitter functionality for exponential backoff ?

rShetty commented 6 years ago

Also we need to the update the documentation of this change, thanks

timusg commented 6 years ago

@rShetty @pravj raised the PR for the Jitter functionality in the exponential backoff.

rShetty commented 6 years ago

@pravj @timusg Merging this. Will be adding documentation separately