-
-
Save jredville/523de951d5ab6b60a0d345516bcf46d4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
global | |
nbproc 1 | |
maxconn 65536 | |
pidfile /run/haproxy.pid | |
defaults | |
mode http | |
balance roundrobin | |
option redispatch | |
option forwardfor | |
monitor-uri /health_check | |
timeout connect 5s | |
timeout queue 5s | |
timeout client 50s | |
timeout server 50s | |
option httplog | |
log 127.0.0.1 local0 | |
frontend http-in | |
bind *:80 | |
capture request header X-Forwarded-For len 500 | |
capture response header X-Query-Result len 100 | |
timeout client 1h | |
capture request header Authorization len 1024 | |
default_backend boomerang_www | |
listen stats | |
bind *:9000 | |
timeout client 5s | |
mode http | |
stats enable # Enable stats page | |
stats hide-version # Hide HAProxy version | |
stats realm Haproxy\ Statistics # Title text for popup window | |
stats uri /monitor | |
stats auth user:pass | |
stats show-legends | |
resolvers awsdns | |
nameserver dns0 "10.0.0.2:53" # configured at startup | |
accepted_payload_size 1280 | |
hold obsolete 1m | |
hold valid 1m | |
backend boomerang_www | |
balance leastconn | |
http-check expect status 404 #temporary | |
option httpchk GET /health/ping | |
option log-health-checks | |
stick-table type string len 100 size 3M expire 10m #peers haproxy_peers | |
stick on hdr(Authorization) | |
#server-template foo 5 "_foo._tcp.${SERVICE_DISCOVERY_DOMAIN_NAME}" check resolvers awsdns resolve-prefer ipv4 | |
server foo1 "_foo._tcp.${SERVICE_DISCOVERY_DOMAIN_NAME}" check resolvers awsdns resolve-prefer ipv4 | |
server foo2 "_foo._tcp.${SERVICE_DISCOVERY_DOMAIN_NAME}" check resolvers awsdns resolve-prefer ipv4 | |
server foo3 "_foo._tcp.${SERVICE_DISCOVERY_DOMAIN_NAME}" check resolvers awsdns resolve-prefer ipv4 | |
server foo4 "_foo._tcp.${SERVICE_DISCOVERY_DOMAIN_NAME}" check resolvers awsdns resolve-prefer ipv4 | |
server foo5 "_foo._tcp.${SERVICE_DISCOVERY_DOMAIN_NAME}" check resolvers awsdns resolve-prefer ipv4 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment