Hello everyone,
Please I am beginner with haproxy and i would like to ask and clarify if haproxy is capable manipulate with linux IP addresses (exactly i mean in case of server who has set public IP in ethernet and is not longer exist in lan… then automatically through haproxy asign public IP address to new server)…
Assign public IP address with similar command like this “ifconfig eth0 123.123.123.123”
At the moment i am using some my custom script that checking if we have internet in lan … if not then rewrite IP on all servers and then assign public IP to new server who is on. But it will be great if i could implement this solution directly into haproxy if is possible, because my script has some delay before is evereything sorted out.
Please i have at the moment
1x public IP > 1x switch > 3x haproxy servers with apache (fail over solution)
Also now I am facing problem with websocket that is not go through haproxy (i think but i am not sure)… Please is here anyone who would like help me correctly setup haproxy solution please? I am really lost myself in “frontend, backend, default, global and etc… settings” and now i am facing problem with websocket.
If some expert would help i would be really happy pay some friendly fee. Best regards Pavol
this is working cfg what i have right now
defaults
mode http
option forwardfor
timeout connect 5000
timeout check 5000
timeout client 30000
timeout server 30000
listen stats
bind *:9999
stats enable
stats hide-version
stats uri /stats
stats auth root:asdf
frontend www-http
bind *:80
#reqadd X-Forwarded-Proto:\ http
default_backend www-backend
backend www-backend
balance hdr(host)
#cookie JSESSIONID prefix nocache
#balance hdr(User-Agent)
#balance roundrobin
#option httpchk HEAD /check.txt HTTP/1.0
server 254 10.0.0.254:88 check fall 1 rise 3
server 253 10.0.0.253:88 check backup fall 1 rise 3
server 252 10.0.0.252:88 check backup fall 1 rise 3