How to Configure Windows Server 2016 Remote Desktop Connection Broker
Remote Desktop Connection Broker (RD Connection Broker) is the intelligence layer in a Windows Server 2016 Remote Desktop Services deployment. It manages session reconnection, load balancing across multiple RD Session Host servers, and publishing of RemoteApp programs and virtual desktops from a centralised collection. Without an RD Connection Broker, a user who disconnects from session host A and reconnects may be directed to session host B, losing their previous session. Connection Broker solves this by maintaining session state and routing reconnections correctly. This tutorial covers installing, configuring, and managing RD Connection Broker in a multi-server RDS farm.
RD Connection Broker Architecture
In a standard RDS deployment, the RD Connection Broker sits logically between the clients (or the RD Gateway / RD Web Access) and the pool of RDSH servers. When a user initiates a new connection, the Broker evaluates the load across all RDSH servers in the collection and directs the client to the least-loaded server. When a user reconnects, the Broker checks its session database, finds the existing session, and routes the reconnection to the correct RDSH server regardless of how many servers are in the farm.
Step 1: Install the RD Connection Broker Role Service
Install the RD Connection Broker role on the designated broker server using PowerShell:
Install-WindowsFeature -Name RDS-Connection-Broker -IncludeManagementTools
The RD Connection Broker requires the server to be domain-joined. The server must have a static IP address and a stable FQDN. No restart is typically required.
Step 2: Deploy a Full RDS Infrastructure Using Server Manager
The recommended approach for a multi-server RDS deployment is to use the Server Manager RDS deployment wizard. Open Server Manager and select Remote Desktop Services from the left pane. Click Session-based desktop deployment on the Overview page. On the Select deployment type page, choose Standard deployment (as opposed to Quick Start). On the subsequent pages, assign servers to each role: select the server for RD Connection Broker, the server for RD Web Access, and one or more servers for RD Session Host. Review the selections and click Deploy.
Server Manager installs all required role services and wires them together automatically. After deployment, the Deployment Overview page shows all components with green status indicators when configured correctly.
Step 3: Add RD Session Host Servers to the Collection
After the initial deployment, add additional RDSH servers to the session collection to scale out the farm. In Server Manager > Remote Desktop Services > Collections, right-click your collection and select Add RD Session Host Servers. Select the additional RDSH servers from the list and click Add. The Connection Broker will now include these servers in its load-balancing pool.
Add-RDServer -Server "rdsh02.domain.local" -Role RDS-RD-Server -ConnectionBroker "rdbroker.domain.local"
Add-RDSessionHost -CollectionName "DesktopCollection" -SessionHost "rdsh02.domain.local" -ConnectionBroker "rdbroker.domain.local"
Step 4: Configure Load Balancing
The RD Connection Broker supports two load-balancing modes. Equal load balancing distributes new connections evenly across all RDSH servers. Weighted load balancing allows you to assign a relative weight to each server so that more powerful servers receive proportionally more sessions. Configure load balancing in Server Manager by right-clicking the collection and selecting Edit Properties > Session Load Balancing. Set the session load balancing mode and relative weights per server.
Set-RDSessionCollectionConfiguration -CollectionName "DesktopCollection" -ConnectionBroker "rdbroker.domain.local" -LoadBalancingMode "Weighted"
To set per-server weights (higher weight = more sessions directed to that server):
Set-RDSessionHost -CollectionName "DesktopCollection" -SessionHost "rdsh01.domain.local" -NewSessionLimit 1000 -ConnectionBroker "rdbroker.domain.local"
Step 5: Configure High Availability for the Connection Broker
A single Connection Broker is a single point of failure. For production environments, configure Connection Broker High Availability by adding a second broker server and pointing both to a shared SQL Server database. In Server Manager, navigate to Remote Desktop Services > Tasks > Edit Deployment Properties > RD Connection Broker > Configure High Availability. Enter the DNS round robin name (a single DNS A record pointing to all broker IPs), the SQL Server connection string, and the database name. Both broker servers must have the same software installed.
Set-RDConnectionBrokerHighAvailability -DatabaseFilePath "\sqlservershareRDCBDatabase" -DatabaseSecondaryFilePath "\sqlservershareRDCBDatabase_log" -ClientAccessName "rdbroker.domain.local" -ConnectionBroker "rdbroker01.domain.local"
Step 6: Configure the Client Access Name (DNS Round Robin)
For HA deployments, create a DNS A record named rdbroker.domain.local (your Client Access Name) with entries for both broker servers. Configure the Client Access Name in the Connection Broker properties so that all clients connect via the shared name rather than individual server names.
Add-DnsServerResourceRecordA -ZoneName "domain.local" -Name "rdbroker" -IPv4Address "10.0.0.21"
Add-DnsServerResourceRecordA -ZoneName "domain.local" -Name "rdbroker" -IPv4Address "10.0.0.22"
Step 7: Monitor the Connection Broker
Monitor RD Connection Broker activity using the Remote Desktop Connection Broker Client event log and Performance Monitor counters. Key counters include RD Connection Broker Connections Active, RD Connection Broker Connections Succeeded, and RD Connection Broker Reconnections Succeeded.
Get-RDSessionCollection -ConnectionBroker "rdbroker.domain.local" | ForEach-Object {
Get-RDSessionCollectionConfiguration -CollectionName $_.CollectionName -ConnectionBroker "rdbroker.domain.local"
}
To see all active user sessions across the farm:
Get-RDUserSession -ConnectionBroker "rdbroker.domain.local" | Format-Table UserName, HostServer, SessionState, IdleTime -AutoSize
Step 8: Drain an RDSH Server for Maintenance
To take an RDSH server out of the load-balancing pool for maintenance without disconnecting existing sessions, set it to drain mode. In drain mode, the Connection Broker directs no new sessions to the server, allowing existing sessions to end naturally:
Set-RDSessionHost -SessionHost "rdsh01.domain.local" -NewConnectionAllowed NotUntilReboot -ConnectionBroker "rdbroker.domain.local"
Re-enable the server after maintenance:
Set-RDSessionHost -SessionHost "rdsh01.domain.local" -NewConnectionAllowed Yes -ConnectionBroker "rdbroker.domain.local"
The RD Connection Broker is the cornerstone of a scalable and resilient RDS deployment. Properly configured, it ensures users always reconnect to their sessions, workloads are distributed evenly, and individual server failures do not prevent users from accessing their desktops and applications.