tonic-xds: Add xds retry support #2583
Merged
gu0keno0 merged 6 commits intohyperium:masterfrom Apr 7, 2026
Merged
Conversation
LucioFranco
reviewed
Apr 7, 2026
|
|
||
| /// Check if a request should be retried, either because of a retryable connection error | ||
| /// or because the gRPC response status code is in the retryable set. | ||
| /// TODO: gRPC retriability is based on gRPC status code by default, in practice this may |
Member
There was a problem hiding this comment.
This is safe for now since this is contained within the xds protocol so its a close world of what is idempotent or not?
Collaborator
Author
There was a problem hiding this comment.
It's safe as long as user return unavailable only for idempotent methods.
I did a small poc offline, with something like (tested on Java, Go, Cpp):
handle_rpc() {
side_effect()
abort(...)
}
In this case, client will return unavailable when server panics, even though side effect is already done. Therefore I was thinking, could we build a better way for clients to get clear signal about retriability, and added the TODO there.
LucioFranco
approved these changes
Apr 7, 2026
YutaoMa
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
original issue: #2444
Motivation
As title, add xds retry support to tonix-xds, the implementation is based on https://github.com/grpc/proposal/blob/master/A44-xds-retry.md
Solution
Make the request cloneable and reuse tower::retry layer