HAProxy for VMWare Horizon Connection servers

Hi,
I would like to run the 2 Horizon connection servers behind the LB, but as far as I know, only source balance algorithm will do the job, since I have to authenticate and there is no cluster mode, right?

I’ve tried this:

backend 3dcloudtest_ssl_back
  mode http
  balance source
  option httpchk  HEAD / HTTP/1.1\r\nHost:\ 3dcloudtes
  retries 2
  timeout connect 5s
  timeout server 31s
  server hor-conn01 10.11.5.139:443 check inter 5s fall 4 rise 3 ssl verify none
  server hor-conn02 10.11.5.138:443 check inter 5s fall 4 rise 3 ssl verify none

but if my connection is sent to server hor-conn01 and then it fails, I am redirected to hor-conn02 and I need to reauthenticate, but the problem is also that when hor-conn01 comes back online, I am redirected back to hor-conn01 having to reauthenticate once more. How could I avoid this las redirection?

Thanks.

Hi,

I suppose first thing is… I can’t see why you cannot use a source IP stick table or even cookies to achieve persistence…

In theory, your persistence will move permanently with either method as the stick table/cookie will be updated to reflect the new server.

For source ip persistence add:

stick on src
stick-table type ip size 10240k expire 30m

Or for cookie persistence add this:

cookie SERVERID insert nocache indirect

And this to your real server lines:

cookie hor-conn01

Like so:

  server hor-conn01 10.11.5.139:443 cookie hor-conn01 check inter 5s fall 4 rise 3 ssl verify none
  server hor-conn02 10.11.5.138:443 cookie hor-conn02 check inter 5s fall 4 rise 3 ssl verify none

Give either method a try and see if it helps, balance source is an okay method but is more of a scheduler…