Non-leader nodes failing to proxy unreachable leader node listening on loopback
Hi,
Firstly, great job with Marathon, you guys at mesosphere, love it so far!
Request: Support to run each Marathon node behind a HTTPS reverse proxy with clustering.
A little context:
I am trying to secure my Marathon HA cluster. Each marathon instance is bound to the loopback interface of its host (127.0.0.0:8085) and exposed to the world using a local HAProxy (leader/non-leader-ip:443). The proxy performs auth and SSL termination for Marathon. I use the loopback for obvious reasons - security. I use the proxy to have more control over monitoring, logging and auth while also keeping key management centralized (proxy layer).
The problem I am facing with this setup is that when I access the UI of non-leader marathon nodes at non-leader-ip:443, the UI is broken. This is because when the non-leader UI makes REST calls (/apps and /deployments) to its local marathon instance through HAProxy (non-leader-ip:443), the marathon instance on the non-leader host proxies them to the leader (as expected in a HA setup) at leader-ip:8085 and BUT NOT at leader-ip:443.
This causes all non-leader UI(s) to fail. I am positive that all non-leader marathon REST APIs (at non-leader-ip:443) are broken with the same reason as well.
I see that this is a special case, but now that Marathon gives its users an option to specify their own network interface (including loopback), I am sure this is a scenario that people might run into sooner or later. I was wondering if anyone else could think of a way to solve this? And if folks at Mesosphere might be willing to provide the right knobs for this to scenario to be supported.
Adding @ConnorDoyle
Thanks!
Hey @TalonOne I understand the problem. The non leader proxies to the leader, while using the configured hostname and port of the leader. Since you use a specific setup, that prevents this logic by intention - it will not work.
Would it be an option to use --disable_http and drop the ha_proxy solution?
Note: This issue has been migrated to https://jira.mesosphere.com/browse/MARATHON-2974. For more information see https://groups.google.com/forum/#!topic/marathon-framework/khtvf-ifnp8.