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.


# this config needs haproxy-1.1.28 or haproxy-1.2.1

log local0
log local1 notice
#log loghost local0 info
maxconn 4096
#chroot /usr/share/haproxy
user haproxy
group haproxy
stats socket /tmp/haproxy

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 check port 3389
server castor check port 3389
server pollux check port 3389
server artemis check port 3389
server athena check port 3389
  • 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

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.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.