1

I am currently using Haproxy to load balance a terminal server farm consisting of 5 windows 2003 servers.

The problem is that it doesn't seem to balance the servers properly as I have one server that gets overpopulated and one that is underpopulated. Can somebody please look over my haproxy config file and tell me what enhancements if needed can be done? Thanks.

<<Config>>


# this config needs haproxy-1.1.28 or haproxy-1.2.1

global
log 127.0.0.1 local0
log 127.0.0.1 local1 notice
#log loghost local0 info
maxconn 4096
#chroot /usr/share/haproxy
user haproxy
group haproxy
daemon
#debug
#quiet
stats socket /tmp/haproxy

defaults
log global
mode http
option httplog
option dontlognull
retries 3
option redispatch
maxconn 2000
contimeout 1h
clitimeout 1h
srvtimeout 1h

listen rdp :3389
mode tcp
balance source
option tcpka

server aura 192.168.100.233 check port 3389
server castor 192.168.100.253 check port 3389
server pollux 192.168.100.254 check port 3389
server artemis 192.168.100.249 check port 3389
server athena 192.168.100.251 check port 3389
Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
  • How many clients are you testing with here? Do you clients come from the same source IP? (i.e. behind a corporate firewall or similar). Are all your servers considered healthy by HAProxy, there is a stats web interface you can enable. – James Little Mar 29 '11 at 19:18
  • There are a total of around 55 end users accessing these servers. Yes, the clients are all on the same subnet. I currently do not have the stats page enabled. – Digital Sniper Mar 30 '11 at 14:40

1 Answers1

1

I'm pretty sure that "balance source" is your problem here if you don't have enough clients. Haproxy 1.4 supports other load balancing algorithms which can be combined with cookie-based RDP persistence ("persist rdp-cookie"). I generally suggest using "balance leastconn" when you use rdp-cookie.

Willy Tarreau
  • 3,896
  • 1
  • 20
  • 12