@LaFerrari wrote:
Hello,
I am currently working on making our internal VMware Horizon setup more redundant with the use of HAProxy, Keepalived, and 2 internal connection servers. I am currently able to connect to my horizon VDI with the web browser and use the machine. The issue is when I disconnect the network card from the connection server I am connected to I am unable to immediately reconnect to my VDI. I get 2 errors that I have been disconnected and that I am unable to reconnect. The solution is to refresh and then sign back in. Ideally I would be able to take down a server and have clients automatically connect to the backup server and not have to resign in and not even notice downtime. Here is the configuration of HAproxy, Logs of me disconnect the network interface of INTCONNECT2 and connecting to the backup of INTCONNECT1, and what I see on the web browser. Is there a way to make the fail over seamless?
#---------------------------------------------------------------------
Global settings
#---------------------------------------------------------------------
global
tune.ssl.default-dh-param 2048
log 10.10.200.22 local2
chroot /var/lib/haproxy
pidfile /var/run/haproxy.pid
maxconn 4000
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats#---------------------------------------------------------------------
common defaults that all the ‘listen’ and ‘backend’ sections will
use if not designated in their block
#---------------------------------------------------------------------
defaults
mode http
log global
option httplog
option dontlognull
option http-server-close
option forwardfor except 127.0.0.0/8
option redispatch
retries 3
timeout http-request 10s
timeout queue 1m
timeout connect 10s
timeout client 1m
timeout server 1m
timeout http-keep-alive 10s
timeout check 10s
maxconn 3000
stats enable
stats uri /stats
stats realm Haproxy\ Statistics
stats auth Administrator:Pe@cekeeper#---------------------------------------------------------------------
Redirect to secured
#---------------------------------------------------------------------
frontend unsecured
bind 10.50.0.60:80
reqadd X-Forwarded-Proto:\ http
redirect location https://horizonvdi.example.com#---------------------------------------------------------------------
frontend secured
#---------------------------------------------------------------------
frontend secured
bind 10.50.0.60:443 ssl crt /etc/haproxy/markbrilman.pem
mode http
reqadd X-Forwarded-Proto:\ https
default_backend view#blast
frontend inbound-blast
mode http
bind 10.50.0.60:8443 ssl crt /etc/haproxy/markbrilman.pem
reqadd X-Forwarded-Proto:\ https
default_backend view_blast#pcoip
frontend inbound-pcoip
mode http
bind 10.50.0.60:4172 ssl crt /etc/haproxy/markbrilman.pem
reqadd X-Forwarded-Proto:\ https
default_backend view_pcoip#---------------------------------------------------------------------
balancing between the various backends
#---------------------------------------------------------------------
backend view
mode http
balance source
stick on src
stick-table type ip size 10240k expire 30m
cookie SERVERID insert indirect nocache
server INTCONNECT1 10.50.0.63:443 cookie INTCONNECT1 id 1 weight 1 check ssl verify none check port 443 inter 2000 rise 2 fall 5
server INTCONNECT2 10.50.0.64:443 cookie INTCONNECT2 id 2 weight 1 check ssl verify none check port 443 inter 2000 rise 2 fall 5backend view_blast
mode http
balance source
stick-table type ip size 10240k expire 30m
stick on src
cookie SERVERID insert nocache indirect
server INTCONNECT1 10.50.0.63:8443 cookie INTCONNECT1 id 1 weight 1 check ssl verify none check port 8443 inter 2000 rise 2 fall 5
server INTCONNECT2 10.50.0.64:8443 cookie INTCONNECT2 id 2 weight 1 check ssl verify none check port 8443 inter 2000 rise 2 fall 5backend view_pcoip
mode http
balance source
stick on src
stick-table type ip size 10240k expire 30m
cookie SERVERID insert nocache indirect
server INTCONNECT1 10.50.0.63:4172 cookie INTCONNECT1 id 1 weight 1 check ssl verify none check port 4172 inter 2000 rise 2 fall 5
server INTCONNECT2 10.50.0.64:4172 cookie INTCONNECT2 id 2 weight 1 check ssl verify none check port 4172 inter 2000 rise 2 fall 5Logs:
Posts: 1
Participants: 1