Resolver/Balancer API
See original GitHub issueGrpc Implementations generally favor or at least support Client-Side-Loadbalancing. In Go you go
chan, err := grpc.Dial("my-custom-resolver://some-string-that-has-meaning/some-other-string-with-meaning")
which will basically call a previously registered resolver (my-custom-resolver
) with the URL. This resolver then has the job to return 0 or more IP Addresses to finally connect to. It might query SRV records from a DNS resolver, or ask something like etcd, zookeeper, consul, etc…
There is also the old API where you pass grpc.WithBalancer(myBalancer)
to grpc.Dial
. I suspect this fits C# better.
How will this be achieved in grpc-dotnet?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:36 (16 by maintainers)
Top Results From Across the Web
proposal/L9-go-resolver-balancer-API.md at master
This document contains the v1 implementation of balancer in gRPC-go, the issues that cannot be solved with the v1 set of APIs, and...
Read more >balancer.go
// BalancerGetOptions configures a Get call. // This is the EXPERIMENTAL API and may be changed or extended in the future. type BalancerGetOptions...
Read more >credentials
Package xds provides a transport credentials implementation where the security configuration is pushed by a management server using xDS APIs.
Read more >gRPC-Go Engineering Practices
Our goal is to maintain full backward compatibility except in limited circumstances, including experimental APIs and mitigating security risks ( ...
Read more >Deep Dive: gRPC - Yuxuan Li, Google - YouTube
... Dive: gRPC - Yuxuan Li, Google gRPC-Go is a native implementation of gRPC spec in Go language, with rich features and flexible...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hello, I would like to share the results of my work. Let me share draft version of the proposal.
grpc-dotnet load balancing support proposal (and related proposals).pdf (proposal starts at page 3)
After having initial review I would like to make pull request into official gRFC proposals repo.
Fork with the code is shared here: https://github.com/wicharypawel/grpc-dotnet/tree/load-balancing-v0.7.0 (commit hash: efd5eda4633acf97380146677ab8b985fa9abf9e) Example usage of this new feature is shared here: https://github.com/wicharypawel/net-core-grpc-load-balance/tree/load-balancing-proposal-examples (commit hash: f0628b80c469fb21502d527b8ccc85b005fe9ed2 )
Hi, I think I have something interesting to share. The last few days I’ve been working on a better understanding of load balancing in grpc. I have expanded the capabilities of grpc dotnet with full support for load balancing.
I think it’s something of a worth looking at. I prepared two repositories:
The first repository contains fork of grpc-dotnet repository with extension of grpc.net.client capabilities (most of my work was squashed to erase some wrong ideas of mine 😄 )
link: https://github.com/wicharypawel/grpc-dotnet/commits/load-balancing-for-dotnet
Extensions include: (documentation links below)
_grpc_config.my-service
_grpclb._tcp.my-service
my-service
Grpc.Net.Client.LoadBalancing.Tests
project)Grpc.Net.ClientFactory
was verifiedWork in progress
The second repository is an example of using this implementation and ton’s of other examples and snippets
link: https://github.com/wicharypawel/net-core-grpc-load-balance
Samples include:
How to start: I think best way is to pull second repository and initialize submodule (which includes first repository). Continue with Readme, in case of problems let me know here.
Kudos to @jtattermusch for his presentation about grpclb available here: https://github.com/jtattermusch/grpc-loadbalancing-kubernetes-examples
Related documentation:
Hope you find this helpful, I would be glad to help if you find that interesting to pull request.