HAProxy RDP load balancing
-
Hi,
I'm looking for the right way to LB 3x Windows 2012R2 RDS (Terminal) Servers through either the built-in Load Balancer or HAPROXY on pfsense. The servers are located on a private NATed network (192.168.1.10-12) and only tcp/3389 is opened in the firewall.
What's most important is session reconnection, eg. if a user disconnects i want them to reconnect to the same server in the pool.
I suppose HAProxy would be better suited for this and was looking for the right settings.
Am i right in assuming i should set the balancing protocol to "source" and then enable Transparent Client IP? Would this let HAProxy "recognize" the clients and reconnect them to the same server?
Apparently RDP cookies are not supported anymore with RDS 2008+, so i'm looking for a an easy and reliable way to achieve this without having to resort to RD Gateway.Anybody tried this before?
Thx
Dennes -
Hi Dennes,
I have not tried to loadbalance RDP.. But here some of my thoughts about the subject.
For haproxy you should only use "Transparent ClientIP" (tproxy) if you absolutely need the client ip on the backend servers for a known purpose. The RDP-TCP connection itself wont need it. And it wont help in getting the same client connect to the same server every time..
-
'Balance Source' would probably work good assuming all servers stay up.. And might have 10 users on server A while 50 users are connected to server B. And even a newly connecting user could be added on server B depending on how the hash ends up..
-
'Least Connections' could be another option to use, together with "Stick-table persistence" on 'source ip', though you will have to think about how long a source-ip is 'remembered'..
You could also try the build-in loadbalancer, and compare if there is any performance difference between the two.?. Though i think you will find it has to few options to accompany the desired stickyness.
My two cents..
PiBa-NL -