I'm using haproxy in tcp mode. I have a single frontend that listens to several ports:
frontend front mode tcp bind *:20000 bind *:20001 ... default_backend back
And a single backend that forwards these requests without changing ports:
backend back server myserver server.host.com check port 20000 server anotherServer another.host.com check port 20000 server mybackup backup.host backup.host.com check port 20000 backup # some other useful backend logic, like logging # which I don't want to repeat a bunch of times
Because we are supporting some legacy APIs, we need to accept some old, lower level ports and remap them. For example, I want to accept port
200 and remap it to
I was hoping for a frontend directive to change port like you might do for a header in http mode, but I can't find one. Will have have to abandon my nice clean single backend?