GitXplorerGitXplorer
r

haproxy-healthcheck-lua

public
2 stars
0 forks
3 issues

Commits

List of commits on branch main.
Verified
91ddb3d7638bab0a88181f54e32aa1bc754370ca

whitespace & vim modelines

rrobbat2 committed 4 years ago
Verified
1eeba9c1521c26d9a4e5419f313b8586707d5af9

haproxy.cfg: fix comment

rrobbat2 committed 4 years ago
Verified
b09bdefa5bcf313c66b57144cf1a399fdd3b5ce7

Real initial commit

rrobbat2 committed 4 years ago
Verified
a64ceb387b140f78d4a89135ba6b270a0a0bd5bb

Initial commit

rrobbat2 committed 4 years ago

README

The README file for this repository.

agent-check of HAProxy

This code & HAProxy example configuration provides a way to expose the health of HAProxy itself.

It should NOT be confused with the agent-check functionality that HAProxy can use to check backend servers.

The output is formatted to be similar to the agent-check TCP check used by HAProxy, but sent via HTTP rather than TCP.

The exampe configuration uses two files which can be used to set the output into MAINT or DRAIN states. The files are haproxy_maint.acl, haproxy_drain.acl respectively.

One example usage might be checking the state of HAProxy from a seperate L4 load balancer layer [#L4LB].

  • If HAProxy is up AND ready, new connections should be delivered to HAProxy.
  • If HAProxy is up, but going down soon, no new connections should be accepted, but it may be desirable to let long-running connections continue (e.g. in-flight uploads/downloads)

Beware that if you naively connect the DOWN/DRAIN/MAINT states to some BGP announcement, but have in-flight active connections, the BGP route being withdrawn may then cause the connections to break.

TODO:

  • Implement weight output
  • Implement maxconn output

References:

agent-check

L4 load balancer (L4LB)

License & Copyright.

This code is licensed under BSD 2-Clause "Simplified" License, (SPDX:BSD-2-Clause). Copyright (c) 2020, Robin H. Johnson rjohnson@digitalocean.com & DigitalOcean.