go-zero
go-zero copied to clipboard
would it possible to add client grpc health check ?
Is your feature request related to a problem? Please describe. when i port forward k8s svc ,it is reasonable to fail when stoping the port fowarding. But port forward k8s svc again in the same port, the conn is still bad.It only works after restarting the service.
Describe the solution you'd like
hope to add sequent settings.
svcCfg := fmt.Sprintf(`{"loadBalancingPolicy":"%s","healthCheckConfig": {
"serviceName": ""
}}`, p2c.Name)
this is just like what grpc-go does. And I know go-zero already achieved rpc health check in the server end
Additional context Hope to get yr early reply! @kevin0527
We have load balancer to actively detect the server status by requests. Any benefits to have this kind of client side health check?
it does not help too much when already having the load balancer. But i guess it will help a little when rpc server stops because client will receive the stream immediately to mark the connection state Close. And the k8s endpoint will still be alive in the short rpc server closing time.
By the way, is it possible to improve performance in a large big loop if at the same time checking the connectity state in p2cPicker.
This issue is stale because it has been open for 30 days with no activity.
This issue was closed because it has been inactive for 14 days since being marked as stale.