Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
To ensure the reliability and scalability of your Remote Desktop Services infrastructure, you can configure the Remote Desktop Connection Broker for high availability. This article shows you how to set up a highly available Connection Broker cluster, including prerequisites, database configuration, load balancing, and final deployment steps. By following these instructions, you can minimize downtime and optimize performance for your remote desktop environment.
Prerequisites
Before you begin, you need to meet the following prerequisites:
Set up a server to act as a second RD Connection Broker. This server can be either a physical server or a VM.
Set up a database for the Connection Broker. You can use Azure SQL Database instance or SQL Server in your local environment. We give an example using Azure SQL, but the steps still apply to SQL Server. You need to find the connection string for the database and make sure you have the correct ODBC driver.
Configure the database for the Connection Broker
Find the connection string for the database you created - you need it both to identify the version of ODBC driver you need and later, when you're configuring the Connection Broker itself (step 3), so save the string somewhere you can reference it easily. Here's how you find the connection string for Azure SQL:
In the Azure portal, select Browse > Resource groups and select the resource group for the deployment.
Select the SQL database you created (for example, CB-DB1).
Select Settings > Properties > Show database connection strings.
Copy the connection string for ODBC (includes Node.js), which should look like this. Replace the
<values>
with your values. You use this entire string, with your included password, when connecting to the database.Driver={ODBC Driver 13 for SQL Server};Server=tcp:<YourHost>,<HostPort>;Database=<DatabaseName>;Uid=<UserID>;Pwd=<Password>;Encrypt=yes;TrustServerCertificate=no;Connection Timeout=30;
Install the ODBC driver on the new Connection Broker:
If you're using a VM for the Connection Broker, create a public IP address for the first RD Connection Broker. (You only have to do this step if the RDMS virtual machine doesn't already have a public IP address to allow RDP connections.)
- In the Azure portal, select Browse > Resource groups, select the resource group for the deployment, and then select the first RD Connection Broker virtual machine (for example, Contoso-Cb1).
- Select Settings > Network interfaces, and then select the corresponding network interface.
- Select Settings > IP address.
- For Public IP address, select Enabled, and then select IP address.
- If you have an existing public IP address you want to use, select it from the list. Otherwise, select Create new, enter a name, and then select OK and then Save.
Connect to the first RD Connection Broker:
- In the Azure portal, select Browse > Resource groups, select the resource group for the deployment, and then select the first RD Connection Broker virtual machine (for example, Contoso-Cb1).
- Select Connect > Open to open the Remote Desktop client.
- In the client, select Connect, and then select Use another user account. Enter the user name and password for a domain administrator account.
- Select Yes when warned about the certificate.
Download the ODBC driver for SQL Server that matches the version in the ODBC connection string. For the example string, we need to install the version 13 ODBC driver.
Copy the
sqlincli.msi
file to the first RD Connection Broker server.Open the
sqlincli.msi
file and install the native client.Repeat steps 1-5 for each RD Connection Brokers (for example, Contoso-Cb2).
Install the ODBC driver on each server that runs the connection broker.
Configure load balancing on the RD Connection Brokers
You can use a load balancer, such as Azure load balancer; if not, you can set up DNS round-robin.
Create a load balancer
Create an Azure Load Balancer
- In the Azure portal, select Browse > Load balancers > Add.
- Enter a name for the new load balancer (for example,
hacb
). - Select Internal for the Scheme, Virtual Network for your deployment (for example, Contoso-VNet), and the Subnet with all of your resources (for example, default).
- Select Static for the IP address assignment and enter a Private IP address that isn't currently in use (for example, 10.0.0.32).
- Select the appropriate Subscription, the Resource group with all of your resources, and the appropriate Location.
- Select Create.
Create a probe to monitor which servers are active:
- In Azure portal, select Browse > Load Balancers, and then select the load balancer you created, for example,
CBLB
. Select Settings. - Select Probes > Add.
- Enter a name for the probe (for example, RDP), select TCP as the Protocol, enter 3389 for the Port, and then select OK.
- In Azure portal, select Browse > Load Balancers, and then select the load balancer you created, for example,
Create the backend pool of the Connection Brokers:
- In Settings, select Backend address pools > Add.
- Enter a name (for example, CBBackendPool), then select Add a virtual machine.
- Choose an availability set (for example, CbAvSet), and then select OK.
- Select Choose the virtual machines, select each virtual machine, and then select Select > OK > OK.
Create the RDP load balancing rule:
- In Settings, select Load balancing rules, and then select Add.
- Enter a name (for example, RDP), select TCP for the Protocol, enter 3389 for both Port and Backend port, and select OK.
Add a DNS record for the Load Balancer:
- Connect to the RDMS server virtual machine (for example, Contoso-CB1). Check out the Prepare the RD Connection Broker VM article for steps on how you connect to the VM.
- In Server Manager, select Tools > DNS.
- In the left-hand pane, expand DNS, select the DNS machine, select Forward Lookup Zones, and then select your domain name (for example, Contoso.com). (It might take a few seconds to process the query to the DNS server for the information.)
- Select Action > New Host (A or AAAA).
- Enter the name (for example,
hacb
) and the IP address specified earlier (for example, 10.0.0.32).
Configure DNS round-robin
The following steps are an alternative to creating an Azure Internal Load Balancer.
Connect to the RDMS server in the Azure portal. using Remote Desktop Connection client
Create DNS records:
- In Server Manager, select Tools > DNS.
- In the left-hand pane, expand DNS, select the DNS machine, select Forward Lookup Zones, and then select your domain name (for example, Contoso.com). (It might take a few seconds to process the query to the DNS server for the information.)
- Select Action and New Host (A or AAAA).
- Enter the DNS Name for the RD Connection Broker cluster (for example,
hacb
), and then enter the IP address of the first RD Connection Broker. - Repeat steps 3-4 for each RD Connection Broker, providing each unique IP address for each record.
For example, if the IP addresses for the two RD Connection Broker virtual machines are 10.0.0.8 and 10.0.0.9, you would create two DNS host records:
- Host name:
hacb.contoso.com
, IP address:10.0.0.8
- Host name:
hacb.contoso.com
, IP address:10.0.0.9
Configure the Connection Brokers for high availability
Add the new RD Connection Broker server to Server Manager:
- In Server Manager, select Manage > Add Servers.
- Select Find Now.
- Select the newly created RD Connection Broker server (for example, Contoso-Cb2) and select OK.
Configure high availability for the RD Connection Broker:
- In Server Manager, select Remote Desktop Services > Overview.
- Right-click RD Connection Broker, and then select Configure High Availability.
- Page through the wizard until you get to the Configuration type section. Select Shared database server, and then select Next.
- Enter the DNS name for the RD Connection Broker cluster.
- Enter the connection string for the SQL DB, and then page through the wizard to establish high availability.
Add the new RD Connection Broker to the deployment
- In Server Manager, select Remote Desktop Services > Overview.
- Right-click the RD Connection Broker, and then select Add RD Connection Broker Server.
- Page through wizard until you get to Server Selection, then select the newly created RD Connection Broker server (for example, Contoso-CB2).
- Complete the wizard, accepting the default values.
Configure trusted certificates on RD Connection Broker servers and clients.