Skip to content

Instantly share code, notes, and snippets.

@mfournier
Last active March 9, 2020 16:37
Show Gist options
  • Save mfournier/b375a4556ad559b7754b99ade37d94b5 to your computer and use it in GitHub Desktop.
Save mfournier/b375a4556ad559b7754b99ade37d94b5 to your computer and use it in GitHub Desktop.
global
[...]
defaults
[...]
resolvers haproxy-dns
nameserver dns-server 8.8.8.8:53
[...]
accepted_payload_size 8192
resolve_retries 3
timeout retry 1s
hold other 30s
hold refused 30s
hold nx 30s
hold timeout 30s
hold valid 10s
backend s3_static
option httpchk HEAD /mybucket/healthcheck.txt HTTP/1.0\r\nHost:\ s3-eu-west-1.amazonaws.com
http-request set-path /mybucket%[path]
http-request set-header Host s3-eu-west-1.amazonaws.com
server s3 s3-eu-west-1.amazonaws.com:80 check inter 15000 fastinter 1000 downinter 1000 rise 1 fall 3 resolvers haproxy-dns init-addr none
backoffice webapp
balance roundrobin
option redispatch
option httpchk HEAD /healthcheck.txt HTTP/1.0\r\n
default-server inter 2000 rise 2 fall 3 maxconn 8
server-template webapp 12 webapp.internal.dns:80 check resolvers haproxy-dns init-addr none
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment