-
Notifications
You must be signed in to change notification settings - Fork 232
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
L9: new balancer and resolver APIs for gRPC-go #30
Conversation
L9-go-resolver-balancer-API.md
Outdated
|
||
## Abstract | ||
|
||
The current balancer API in gRPC-go cannot suport balancer hot switching. There are also other issues related to balancer, resolver and connectivity state. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
typo: s/suport/support
|
||
#### Connection up and down | ||
|
||
gRPC notifies the balancer of addresses to which the connection is established or lost. So balancer can make load balancing decisions based on the connection status. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
how will this interact with health checking? if http2 or customized health checker fails, will the connection change state to lost, and will the balancer get notified?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gRPC notices a connection is lost when it fails to read-from/write-to the connection. (We also have keepalive
package for point-to-point healthcheck, that could force close a transport in some situation).
If there's another custom health checker reporting unhealthy but the connection is actually working, gRPC will not notice that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there's another custom health checker reporting unhealthy but the connection is actually working, gRPC will not notice that.
we probably need a hook for that too. Or we have to manually close that connection somehow.
for quorum based systems, network partitioned server (partitioned from the majority of its peers) is not really usable for some types of RPC although the network between that server and client is OK.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this case, I think it would make more sense for the health checker to communicate to the balancer directly, not through gRPC.
This is what we do in grpclb
. grpclb
connects to a remote balancer, and the remote balancer decides which backends to connect and which to disconnect.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what you suggest is what we are doing right now. but then down (or done) func will have multiple consumers, and i feel it is less cleaner. i will take a look at grpcLB code.
thank you.
The new API will support:
Tracking issue: grpc/grpc-go#1388