Add high availability to the RD Web and Gateway web front
You can deploy a Remote Desktop Web Access (RD Web Access) and Remote Desktop Gateway (RD Gateway) farm to improve the availability and scale of a Windows Server Remote Desktop Services (RDS) deployment
Use the following steps to add an RD Web and Gateway server to an existing Remote Desktop Services basic deployment.
Pre-requisites
Set up a server to act as an additional RD Web and RD Gateway - this can be either a physical server or VM. This includes joining the server to the domain and enabling remote management.
Step 1: Configure the new server to be part of the RDS environment
- Connect to the RDMS server in the Azure portal, using Remote Desktop Connection client.
- Add the new RD Web and Gateway server to Server Manager:
- Launch Server Manager, click Manage > Add Servers.
- In the Add Servers dialog, click Find Now.
- Select the newly created RD Web and Gateway server (for example, Contoso-WebGw2) and click OK.
- Add RD Web and Gateway servers to the deployment
- Launch Server Manager .
- Click Remote Desktop Services > Overview > Deployment Servers > Tasks > Add RD Web Access Servers.
- Select the newly created server (for example, Contoso-WebGw2), and then click Next.
- On the Confirmation page, select Restart remote computers as needed, and then click Add.
- Repeat these steps to add the RD Gateway server, but choose RD Gateway Servers in step b.
- Re-install certificates for the RD Gateway servers:
- In Server Manager on the RDMS server, click Remote Desktop Services > Overview > Tasks > Edit Deployment Properties.
- Expand Certificates.
- Scroll down to the table. Click RD Gateway Role Service > Select existing certificate.
- Click Choose a different certificate and then browse to the certificate location. For example, \Contoso-CB1\Certificates). Select the certificate file for the RD Web and Gateway server created during the prerequisites (e.g. ContosoRdGwCert), and then click Open.
- Enter the password for the certificate, select Allow the certificate to be added to the Trusted Root Certificate Authorities certificate store on the destination computers, and then click OK.
- Click Apply.
Note
You may need to manually restart the TSGateway service running on each RD Gateway server, either through Server Manager or Task Manager.
- Repeat steps a through f for the RD Web Access Role Service.
Step 2: Configure RD Web and RD Gateway properties on the new server
- Configure the server to be part of an RD Gateway farm:
- In Server Manager on the RDMS server, click All Servers. Right-click one of the RD Gateway servers, and then click Remote Desktop Connection.
- Sign into to the RD Gateway server using a domain admin account.
- In Server Manager on the RD Gateway server, click Tools > Remote Desktop Services > RD Gateway Manager.
- In the navigation pane, click the local computer (e.g. Contoso-WebGw1).
- Click Add RD Gateway Server Farm members.
- On the Server Farm tab, enter the name of each RD Gateway server, then click Add and Apply.
- Repeat steps a through f on each RD Gateway server so that they recognize each other as RD Gateway servers in a farm. Do not be alarmed if there are warnings, as it might take time for DNS settings to propagate.
- Configure the server to be part of an RD Web Access farm. The steps below configure the Validation and Decryption Machine Keys to be the same on both RDWeb sites.
- In Server Manager on the RDMS server, click All Servers. Right-click the first RD Web Access server (e.g. Contoso-WebGw1) and then click Remote Desktop Connection.
- Sign into the RD Web Access server using a domain admin account.
- In Server Manager on the RD Web Access server, click Tools > Internet Information Services (IIS) Manager.
- In the left pane of IIS Manager, expand the Server (e.g. Contoso-WebGw1) > Sites > Default Web Site, and then click RDWeb.
- Right-click Machine Key, and then click Open Feature.
- On the Machine Key page, in the Actions pane, select Generate Keys, and then click Apply.
- Copy the validation key (you can right-click the key and then click Copy.)
- In IIS Manager, under Default Web Site, select Feed, FeedLogon and Pages in turn.
- For each:
- Right-click Machine Key, and then click Open Feature.
- For the Validation Key, clear Automatically generate at runtime, and then paste the key you copied in step g.
- Minimize the RD Connection window to this RD Web server.
- Repeat steps b through e for the second RD Web Access server, ending on the feature view of Machine Key.
- For the Validation Key, clear Automatically generate at runtime, and then paste the key you copied in step g.
- Click Apply.
- Complete this process for the RDWeb, Feed, FeedLogon and Pages pages.
- Minimize the RD Connection window to the second RD Web Access server, and then maximize the RD Connection window to the first RD Web Access server.
- Repeat steps g through n to copy over the Decryption Key.
- When validation keys and decryption keys are identical on both RD Web Access servers for the RDWeb, Feed, FeedLogon and Pages pages, sign out of all RD Connection windows.
Step 3: Configure load balancing for the RD Web and RD Gateway servers
If you are using Azure infrastructure, you can create an external Azure load balancer; if not, you can set up a separate hardware or software load balancer. Load balancing is key so that traffic will be evenly distributed the long-lived connections from Remote Desktop clients, through the RD Gateway, to the servers that users will be running their workloads.
Note
If your previous server running RD Web and RD Gateway was already set up behind an external load balancer, skip ahead to step 4, select the existing backend pool, and add the new server to the pool.
- Create an Azure Load Balancer:
- In the Azure portal click Browse > Load balancers > Add.
- Enter a name, for example WebGwLB.
- Select Public for the Scheme.
- Under Public IP address, select Choose a public IP address, and then pick an existing public IP address or create a new one.
- Select the appropriate Subscription, Resource Group, and Location.
- Click Create.
- Create a probe to monitor which servers are alive:
- In the Azure portal, select Browse > Load Balancers, and then choose the load balancer that you created in the previous step.
- Select All settings > Probes > Add.
- Enter a name, for example, HTTPS, for the probe. Select TCP as the Protocol, and enter 443 for the Port, then click OK.
- Create the HTTPS and UDP load balancing rules:
- In Settings, click Load balancing rules.
- Select Add for the HTTPS rule.
- Enter a name for the rule, for example, HTTPS, and select TCP for the Protocol. Enter 443 for both Port and Backend port, and click OK.
- In Load balancing rules, click Add for the UDP rule.
- Enter a name for the rule, for example, UDP, and select UDP for the Protocol. Enter 3391 for both Port and Backend port, and click OK.
- Create the backend pool for the RD Web and RD Gateway servers:
- In Settings, click Backend address pools > Add.
- Enter a name (for example, WebGwBackendPool), then click Add a virtual machine.
- Choose an availability set (for example, WebGwAvSet), and then click OK.
- Click Choose the virtual machines, select each virtual machine, and then click Select > OK > OK.