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

Service Config, RPC retry policy, load balancing and custom name resolution in v1.x #2107

Open
maniak-dobrii opened this issue Nov 7, 2024 · 0 comments
Labels

Comments

@maniak-dobrii
Copy link

What are you trying to achieve?

For grpc-swift 1.x (or v1, can use 1.24.1, the latest at the moment for reference)

  1. Is there a way to apply GRPCChannel configuration based on Service Config?

  2. Is there a load balancing and custom name resolution implementation? Maybe, available as a separate package?

What have you tried so far?

Based on my understanding after reading the documentation, examples and (shallow) investigating v1 and v2 code, all the implementations in question are only available in v2 and not in v1:

  • a Service Config based configuration (via CallOptions and ServiceConfig etc.),
  • load balancing (via PickFirstLoadBalancer etc.),
  • and custom name resolution (via NameResolver etc.) implementations.

The only options to achieve Service Config configuration in v1 are:

  • a custom implementation,
    • e.g. a retry policy custom client interceptor implementation,
    • or a custom GRPCChannel implementation,
  • using pre-release grpc-swift v2.

Thank you.

Code examples

While creating the channel via ClientConnection:

let channel = ClientConnection
    ...
    .connect(host: host, port: port)

or a GRPCChannelPool:

let channel = try GRPCChannelPool.with(
    target: .host(host, port: port)
    ...
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant