LXD Proxy service, listen on all cluster nodes?


I’ve just started an experiment with the LXD reverse proxy feature (late to the party I know) and I was trying to get all the cluster nodes to listen and relay traffic on a specific port to a container with eth0 on a fan overlay bridge.

The idea was that I could balance using round robin DNS on the “outside” and it wouldn’t matter which LXD host the traffic went to, it would forward it inside to the correct container via the overlay.

However, it seems that the proxy server is only listening on the LXD cluster host where the container is currently residing.

Is there a way to over-ride this behavior and have it so that all the cluster hosts can listen on that port and relay requests inbound? If I migrate/move the container I see the proxy service then spins up at the new host, I want all the hosts to participate in being able to proxy if its possible.

As a comparison, have used metalLB in kubernetes and you can send a request to any kubernetes host on the outside (as its using ECMP) and it will forward it internally via the overlay to the correct container .


So the proxy device is tied to the instance rather than the network so it moves with the instance and can only exist where the instance is running. As the cluster doesn’t allow an instance to exist in multiple places at once, then this extends to all of its devices too (including proxy).

However depending on what sort of traffic you are trying forward, you could setup something like haproxy on each cluster node that listens on a particular port on the host’s external IP and then forwards connections to the instance’s cluster IP as you intended. This would give you the behaviour you describe.

1 Like

OK that makes sense. My plan B was to use HAproxy.