-
Notifications
You must be signed in to change notification settings - Fork 202
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
Will there be support for load balancing? #268
Comments
I'd love to see support for this! @tikue tonic provides a basic load balancing feature but there is much much more that can be done https://docs.rs/tonic/0.1.0-alpha.1/tonic/transport/struct.Channel.html#method.balance_list. Happy to collab! |
I most certainly am open to contributions of this sort! Load balancing would be a hugely beneficial feature to offer users. Would it be possible to have a load balancing client implement the Client trait? If so, it should even be possible to develop such a feature out of tree. That'd be a great way to test proof of concept. |
@tikue I think we could probably adapt the |
@LucioFranco I think the path of least resistance may be a 3rd crate that provides a shim over tonic to impl tarpc's traits. I definitely am interested to explore unifying traits, I just wouldn't want that conversation to discourage someone from taking on this work if they're interested sooner! |
I was thinking utilising https://github.com/tower-rs/tower/ would be interesting. They have discovery service and 2 load-balancing strategies as well as other interesting features. I'm not sure how simple it would be |
@tikue Yeah, I don't think using tonic directly right now is the best idea. Mostly, the transport is a good reference implementation for using tower and hyper as a transport for an rpc. @ronniec95 yup, this is what we use in tonic internally. I am very happy to help see how these could be used. We have a |
Yeah reusing existing libraries is definitely my preference. I personally am not an expert at load balancing and very much doubt I could do a better job than whatever tower has already done :) I think the novel work here will be more or less integrating those libraries with tarpc's APIs. If we get something hooked up, we can then spend time making it nicer to use directly from tarpc. |
@tikue You've got the best person here who understands tower and yourself for tarpc. I'm not sure I can contribute much unless you can direct me. |
I would love to personally work on this but probably won't have much time to devote to it in the coming weeks. I'm more than happy to provide guidance if you or anyone else would like to contribute, but no pressure at all -- getting started on contributing to tarpc is not as easy as it could be. |
Title says it all. It would be great to have multiple instances of a service and a client can send requests to them all. I imagine it would need to be coupled with exponential backoff and some kind of dynamic discovery.
Are you open to funding to implement this?
The text was updated successfully, but these errors were encountered: