Skip to content

Instantly share code, notes, and snippets.

@vindir
Created November 14, 2016 20:42
Show Gist options
  • Save vindir/d5802f811dd63064aa96e68ccd593159 to your computer and use it in GitHub Desktop.
Save vindir/d5802f811dd63064aa96e68ccd593159 to your computer and use it in GitHub Desktop.
HaProxy circuit-breaker-like setup
frontend my_frontend
bind *:443
acl is_my_frontend hdr(host) -i my_frontend.company.com
use_backend my_backend_cluster if is_my_frontend
backend my_frontend_cluster
balance roundrobin
option httpchk GET /health
default-server error-limit 3 on-error mark-down
server 192.168.10.1 weight 1 observe layer7
server 192.168.10.2 weight 1 observe layer7
server 192.168.10.3 weight 1 observe layer7
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment