-
Notifications
You must be signed in to change notification settings - Fork 167
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
An endpoint to determine whether a node is a raft leader #2582
Comments
Tested it with the following HAproxy config. It works nicely and as intended. HAProxy automatically detects a backend node to direct traffic to using this
|
Overall, seems like a useful thing to have. The only thing to note is that there is an existing health check implementation in controller/health.go. My preference would be to consolidate this functionality in with that code and distinguish between overall health and raft later status with a parameter or path. Thoughts? |
I guess this change would be breaking backward compatibility with this |
Apart from #2586 issue, it suprisingly works well. |
Hello there!
As per thread on the forums[1] I think it might be worth implementing what Hashicorp Vault does with its
/sys/health
endpoint[2] to return200
status code if the node is a raft leader.This would allow for auto-failover when using HAProxy L7 load-balancer to a next node that has become a leader of the raft.
I have gone ahead and hacked together a PR #2581 which adds another webapi component to the controller which allows for determining whether a controller is a raft leader.
However I need a response whether this idea is viable enough to be even considered to be merged upstream.
[1] https://openziti.discourse.group/t/ziti-controller-ha-setup-behind-a-haproxy-load-balancer/3535
[2] https://developer.hashicorp.com/vault/api-docs/system/health
The text was updated successfully, but these errors were encountered: