-
Notifications
You must be signed in to change notification settings - Fork 3
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
Bug: polling health checker will always fail #69
Comments
btw, I wrote a dummy prober with no use of ctx, and it works well. |
Speaking of which, about the wired behavior health when the conn dialing timeout. it should report unhealthy, but in fact it still use the timeout conn. I am still trying to comprehend the code logic of this part, maybe discuss it in another thread. |
This should not be the case. If dialing times out, it will ultimately cause the HTTP request to fail and set the state to unhealthy (link). However, what you might be seeing is that the unhealthy connection is attempted for use until the health check times out. There are currently a few internal constants and TODOs to possibly make them configurable. But the logic is that it tries to create a pool with some minimum size. And if the set of known-healthy connections/backends isn't large enough, it will also include connections/backends whose health state is still unknown. |
We run into some trouble with client conn control, and trying to use the health check. however, the default health checker will always fail with its context deadline exceeded. I think its because the line 332 in
httplb/balancer.go
, should use withtimeout instead of withcancel.here is my test code
the error log
The text was updated successfully, but these errors were encountered: