Haproxy backend servers on different interfaces


I have a haproxy server which gets limited to some 60k connections. I think it is because of ephemeral port limit as I have 1:1 connection mapping, so all my outgoing connections go to the same server.

Here is what I think could help me: I can add a new network interface (eth1) with a new IP. I would then add a duplicate backend server definition and I believe the new destination will get a new ephemeral port limit as long as it uses a different interface. This should let my connection counts grow.

However, I can't seem to find a way to force haproxy to use eth0 for one backend server definition and eth1 for another. Is it possible to do that, or are there other ways of achieving what I need?

The system in question is running Debian and haproxy 1.4.8 (default on Debian).

Best Answer

From HAProxy manual, section 5:

The "source" parameter sets the source address which will be used when connecting to the server. It follows the exact same parameters and principle as the backend "source" keyword, except that it only applies to the server referencing it. Please consult the "source" keyword for details.

Related Topic