1
1
This is a rather specific question, but it is one I haven't been able to find an answer to. I'm running a set of services on an LXC container in Ubuntu 16.04 LTS, specifically game servers. However, this service is known to fail, and so has its wrapper. So in order to maintain uptime and load balance where services are hanging or unresponsive, I need to be able to redirect both UDP and TCP traffic based on whether a service or services are responsive or not.
To better explain the scenario, I have an LXC container exposed to a public IP, with another LXC container nested with iptables redirecting traffic on port 21025 to the nested container. Inside that container, if the services that accept the traffic (called ServiceWrapper
and ServiceMain
) are unresponsive, the traffic must go to another service on another port which we'll call ServiceFallback
. Otherwise, the traffic goes as expected to ServiceWrapper which then sends the traffic to ServiceMain
.
My current attempt to implement this sort of routing has been to use HAProxy to loadbalance between ServiceWrapper
and ServiceFallback
, however at first glance it appears HAProxy does not detect or allow the redirection of additional ports based on how it is loadbalancing ServiceWrapper
and ServiceFallback
. You see, ServiceMain
accepts UDP traffic on another port to facilitate server queries such as version, hostname, etc etc. And as far as I can tell, HAProxy will not route or detect UDP traffic.
I'm semi-desperate to get this to work. I know it is possible because the exact setup I'm attempting to perform has worked for one of my direct competitors, however they seem reluctant to share with me even the packages they used to do it (reasonable, but eh).
I feel you need NGINX – Garr Godfrey – 2018-03-09T17:48:55.013