-
Notifications
You must be signed in to change notification settings - Fork 300
Home
Brenden Matthews edited this page Apr 12, 2016
·
28 revisions
Welcome to the marathon-lb wiki!
This example adds the Host
header to the health check executed by HAProxy:
{
"id":"app",
"labels":{
"HAPROXY_GROUP":"external",
"HAPROXY_0_BACKEND_HTTP_OPTIONS":"option httpchk GET {healthCheckPath} HTTP/1.1\\r\\nHost: www\n timeout check {healthCheckTimeoutSeconds}s"
}
}
If you're trying to run a TCP service which uses long-lived sockets through HAProxy, such as a MySQL instance, you'll need to set longer timeouts for the backend. Try the following:
{
"id":"app",
"labels":{
"HAPROXY_GROUP":"external",
"HAPROXY_0_BACKEND_HEAD":"backend {backend}\n balance {balance}\n mode {mode}\n timeout server 30m\n timeout client 30m\n"
}
}
The example above will set the client and server timeout to 30 minutes for the specified backend.