We're in the process of migrating a microservices application to dcos. The current version of the application use nginx as a reverse proxy. In moving to dcos, we'd like to replace nginx with marathon-lb. This is working well, with one exception. Nginx returns the expected Connection:keep-alive
http header, but marathon-lb does not.
We have not changed the default configuration of marathon-lb in any way, and as far as I can tell haproxy has the expected defaults. Specifically, the http-server-close
option. Here is a snippet from the config.
defaults
load-server-state-from-file global
log global
retries 3
backlog 10000
maxconn 10000
timeout connect 3s
timeout client 30s
timeout server 30s
timeout tunnel 3600s
timeout http-keep-alive 1s
timeout http-request 15s
timeout queue 30s
timeout tarpit 60s
option dontlognull
option http-server-close
option redispatch
My services have labels with the following format:
"labels": {
"HAPROXY_0_PATH": "-i /alerts",
"HAPROXY_0_HTTP_BACKEND_PROXYPASS_PATH": "/alerts",
"HAPROXY_0_VHOST": "foo.bar.com",
"HAPROXY_GROUP": "external"
}
What am I doing wrong?