Skip to content

tonic-xds: Add xds retry support #2583

Merged
gu0keno0 merged 6 commits intohyperium:masterfrom
gu0keno0:retry
Apr 7, 2026
Merged

tonic-xds: Add xds retry support #2583
gu0keno0 merged 6 commits intohyperium:masterfrom
gu0keno0:retry

Conversation

@gu0keno0
Copy link
Copy Markdown
Collaborator

@gu0keno0 gu0keno0 commented Apr 7, 2026

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

@gu0keno0 gu0keno0 marked this pull request as ready for review April 7, 2026 17:09

/// 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
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is safe for now since this is contained within the xds protocol so its a close world of what is idempotent or not?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@gu0keno0 gu0keno0 merged commit c1f07e7 into hyperium:master Apr 7, 2026
21 checks passed
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

Successfully merging this pull request may close these issues.

3 participants