The main purpose of a connection broker is to reconnect a user to a disconnected session. All session information are stored in a database.

You can use the configuration below when HAProxy Enterprise is deployed in an MS Terminal Services architecture where a connection broker is used to dispatch sessions between TS servers.

To install a connection broker, follow the instructions from MS Technet.


When deploying the service, you must deselect the option called "Use IP Address Redirection", for the configuration to work.

frontend ft_rdp
  mode tcp
  bind name rdp
  timeout client 1h
  log global
  option tcplog
  tcp-request inspect-delay 2s
  tcp-request content accept if RDP_COOKIE
  default_backend bk_rdp

backend bk_rdp
  mode tcp
  balance leastconn
  persist rdp-cookie
  timeout server 1h
  timeout connect 4s
  log global
  option tcplog
  option tcp-check
  tcp-check connect port 3389 ssl
  default-server inter 3s rise 2 fall 3
  server srv01 weight 10 check
  server srv02 weight 10 check