Skip to content
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

Request Hedging #891

Closed
alexhcheng opened this issue Sep 27, 2021 · 2 comments
Closed

Request Hedging #891

alexhcheng opened this issue Sep 27, 2021 · 2 comments

Comments

@alexhcheng
Copy link

Is your feature request related to a specific problem? Or an existing feature? Please describe.
Our backend services can have high variance in latency due to various factors (hardware, uneven load, etc) and one way of addressing that is to use the Request Hedging technique. We essentially send the first request, and after n ms (say n is set based on 99 percentile latency), then a second request is sent. Hopefully, one of the 2 requests will return before the ultimate timeout. Take whichever result that comes back first and return to client.

Background Info: Request Hedging

Describe your proposed or preferred solution:
I think one way of handling this is to use the Pessimistic timeout strategy and continue to wait on the first request (onTimeout/onTimeoutAsync) while the retry strategy sends the 2nd request. But I don't see an easy way to bubble the result back.

Describe any alternative options you've considered:

Any additional info?

@martincostello
Copy link
Member

Related to #876.

@alexhcheng
Copy link
Author

thanks. I'll close this and connect on the other thread.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants