I have a service which publishes individual services on different ports via consul and fabio. I have a pair of these fabio internal load balancers. They both have the complete set of valid open rules. This will be some subset of 1024-49151. Possibly randomly distributed. I would like for my external LB to forward the incoming port to the internal port on either node. Rewriting the packet as required. Ideally it would detect failure of the internal nodes and ensure traffic only went to nodes that were up. I don't need load balancing as much as I need failover. Since NLB's in AWS wont do ranges and you pay by the number of rules in addition to traffic I feel like I am stuck with HAProxy in a cluster.
External IP HA Proxy 1 -> Fabio Node -> / Nomad Container Cold HA Proxy 2 -> Fabio Node --/
I am guessing I need a health check port on the fabio node or I suppose I could just go with ping.
I know the use case is unusual but we will really have a different service at each port and fully expect to have to go to a second set of ports if things go well.
Would love a recommendation on the HAProxy config. And any opinions as to the validity of this solution.
The other answer would be to attempt to do IP fail over on the fabio node. But I can't find any examples of people doing that at this point.