Skip to content

Conversation

@jkylling
Copy link

@jkylling jkylling commented Sep 30, 2025

This change sets origin on Endpoints, such that the LoadBalancedChannel can be used with proxies which route to backend services based on origin.

My use case is to be able to use the same grpc client for both DNS based load balancing, and for accessing internal gRPC services through proxies (this is useful for testing).


Note

Set the origin on gRPC endpoints (HTTP/HTTPS) derived from service authority to support SNI/proxy-based routing.

  • gRPC Endpoint Construction:
    • Set origin on tonic::transport::Endpoint in ginepro/src/service_probe.rs.
    • Add origin: http::uri::Uri to GrpcServiceProbe; initialize from ServiceDefinition.authority() and switch scheme to HTTPS in with_tls.
    • Add helper create_origin(...) to build the origin URI.
  • Service Definition:
    • Add authority: http::uri::Authority to ServiceDefinition; compute in from_parts and expose authority() accessor.
  • Changelog:
    • Note endpoint construction now sets origin for SNI-based servers.

Written by Cursor Bugbot for commit 6503202. This will update automatically on new commits. Configure here.

This change sets origin on Endpoints, such that the
LoadBalancedChannel can be used with proxies which route to backend
services based on origin.

My use case is to be able to use the same grpc client for both DNS
based load balancing, and for accessing internal gRPC services through
proxies (this is useful for testing).
@jkylling jkylling requested a review from a team as a code owner September 30, 2025 15:44
@jkylling
Copy link
Author

This PR resolves the same issue as #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant