What is request hedging in gRPC and how does it differ from retries?
Last updated
Hedging sends the same request multiple times in parallel (staggered by
hedgingDelay), uses the first success, and cancels the rest to cut tail latency.Retries are reactive (wait for a failure, then resend). Hedging is proactive and targets slow but not failed servers.
Both amplify load and suit only idempotent methods. A method uses either a retry policy or a hedging policy, never both.
- https://grpc.io/docs/guides/request-hedging/
- https://github.com/grpc/grpc-java/discussions/12396
- https://learn.microsoft.com/en-us/aspnet/core/grpc/retries?view=aspnetcore-10.0
- https://dev.to/gabrielanhaia/request-hedging-the-tail-at-scale-technique-most-teams-skip-2j37
- https://github.com/grpc/grpc-go/issues/2823
- https://grpc.io/docs/guides/retry/
- https://github.com/grpc/proposal/blob/master/A44-xds-retry.md
- https://grpc.io/docs/guides/