HaProxy Multiplexing
-
Hi, I wonder is there a way to duplicate tcp traffic from specific port to a remote server using haProxy or any other way..
Im receiving tcp traffic to port 14000…
Then I want to duplicate this traffic to local port 14001 and to remote server port 14000..I successfully can do that but haproxy will split traffic to two servers using the balance options supported by it... (roundrobin, static-rr, source, etc)..
So I get more traffic to one of the servers than the other..
What I really need is to receive a copy of the incoming 14000 port in the remote server in the same port 14000..
Is there a way to do this??
Here's my current config (the one that splts in half the traffic)
global
maxconn 100000
user root
group root
daemondefaults
mode tcp
option dontlognull
retries 3
option redispatch
contimeout 5000
clitimeout 50000
srvtimeout 50000listen localhost 0.0.0.0:14000
mode tcp
balance static-rr
maxconn 100000server remote 99.99.99.99:14000 check
server local 127.0.0.1:14001 checkAny help would be very appreciated..
Thanks in advance
-
haproxy is not designed to duplicate/copy traffic to a secondary server. without modifications to the program it will not be possible with that.
(it has been asked for on the haproxy mailinglist.. but i cant find the thread currently..) -
I finally solved it using "agnoster duplicator"…
It does exactly as i wanted.. :Dhttps://github.com/agnoster/duplicator