0

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.

  • Instead of trying to get HAProxy to play nice with a large range of random port numbers, better to get your applications to use only one fixed port. – Tommiie Jun 27 '19 at 12:23
  • Yes that would be better unfortunately with TCP ports there is no inbound header. We are routing traffic we don't have any guarantees will have information about the destination. So we there for have to assign lots of individual ports. The distribution of the ports is not important just that we don't know the content. We are ingesting it into container and bouncing it back out another channel. – Chris Schafer Jun 28 '19 at 15:28

0 Answers0