-
Notifications
You must be signed in to change notification settings - Fork 36
add client-wide retries #498
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
tstirrat15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See comments
| defaultRetryExponentialBackoff = 100 * time.Millisecond | ||
| defaultMaxRetryAttemptDuration = 2 * time.Second | ||
| defaultRetryJitterFraction = 0.5 | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If the upstream is just straight-up unavailable (say you fatfingered your port), will 20 retries + this configuration mean that zed appears to hang for a long time? Should we have a smaller number of retries by default?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can terminate the command manually in that case, but I'm ok changing the default number of retries. What do you think would be a sensible value? I've dialed it down to 10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We chatted on this and 10 retries seems like a sane number.
Introduces gRPC middleware to do client-side retries by default. The only flag introduced to customize this behaviour is the maximum number of attempts, which defaults to 20. The retries are enabled for bot unary and streaming APIs.
tstirrat15
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Introduces gRPC middleware to do client-side retries by default. The only flag introduced to customize this behaviour is the maximum number of attempts, which defaults to 20.
Retries are enabled for both unary and streaming bot APIs.
retries_and_resume_demo.mp4