# Secondary Connection Brokers

A secondary Connection Broker is added to a Site for redundancy. This way if the primary Connection Broker fails, the secondary Connection Broker is still available to handle the requests. Connection Brokers work in active/active manner to ensure high availability. In case of a Connection Broker failure, the remaining Connection Brokers are available to handle the load.

When you have one more secondary Connection Broker installed, the runtime data is replicated on each agent, so if any service fails, the downtime is reduced to a minimum. In addition, any active Connection Broker is used for authentication purposes.

The primary Connection Broker performs the same tasks as secondary Connection Brokers but has additional responsibilities. It manages certain processes that must be managed by a single Connection Broker.

The following table lists processes managed by the primary Connection Broker and Secondary Connection Brokers:

<table><thead><tr><th valign="top">Process</th><th valign="top">Primary Connection Broker</th><th valign="top">Secondary Connection Broker</th></tr></thead><tbody><tr><td valign="top">Handles administration sessions</td><td valign="top">Yes (Primary Site Connection Broker)</td><td valign="top">no</td></tr><tr><td valign="top">Manages system settings</td><td valign="top">yes</td><td valign="top">no</td></tr><tr><td valign="top">Replicates RAS settings changes</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Keeps RAS settings change audit</td><td valign="top">yes</td><td valign="top">optional</td></tr><tr><td valign="top">Monitor Performance counters of Site VMs</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Monitor Runtime Sessions</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Monitor Runtime Applications / Processes</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Manages Application package states</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Send Licensing information &#x26; heartbeat</td><td valign="top">yes (Primary site Connection Broker)</td><td valign="top">no</td></tr><tr><td valign="top">Monitors other Site states</td><td valign="top">yes</td><td valign="top">no</td></tr><tr><td valign="top">Process and send CEP information</td><td valign="top">yes</td><td valign="top">no</td></tr><tr><td valign="top">Send information to reporting server</td><td valign="top">yes</td><td valign="top">no</td></tr><tr><td valign="top">Manages Schedulers</td><td valign="top">yes</td><td valign="top">no</td></tr><tr><td valign="top">Device Manager Shadowing</td><td valign="top">yes Primary site Connection Broker )</td><td valign="top">no</td></tr><tr><td valign="top">Send System alert email notifications</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">TOTP - registration</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Email OTP - registration</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Manages templates versioning and distribution</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Clone hosts from templates</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Host pool auto scaling</td><td valign="top">yes Primary site Connection Broker)</td><td valign="top">no</td></tr><tr><td valign="top">Manages Web authentication</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Manages Credentials authentication</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Manages Smart card authentication</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Validates Policies</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Provides configuration to HALB devices</td><td valign="top">yes</td><td valign="top">yes</td></tr><tr><td valign="top">Distributes configuration changes to other roles &#x26; agents</td><td valign="top">yes</td><td valign="top">yes</td></tr></tbody></table>

&#x20;Due to the additional load on the Primary Connection Broker, agent connection load will not be distributed equally. The following system is used:

<table><thead><tr><th valign="top">Number of CBs</th><th valign="top">Primary CB agent connections</th><th valign="top">Secondary CB agent connections</th></tr></thead><tbody><tr><td valign="top">1</td><td valign="top">100%</td><td valign="top"> </td></tr><tr><td valign="top">2</td><td valign="top">40%</td><td valign="top">60%</td></tr><tr><td valign="top">3</td><td valign="top">20%</td><td valign="top">40% each</td></tr><tr><td valign="top">4</td><td valign="top">10%</td><td valign="top">30% each</td></tr><tr><td valign="top">5 or more</td><td valign="top">0%</td><td valign="top">100 / number of secondary PAs</td></tr></tbody></table>

However, if you specify that an agent is managed by a specific Connection Broker, this will be preferred.

### Planning for secondary Connection Brokers

RAS Connection Brokers running on the same Site communicate with each other and share the load. The amount of data being transmitted from one agent to another is quite large, so a reliable high-speed communication channel must be ensured (e.g. a subnetwork can be configured for Connection Broker communications).

When adding a secondary Connection Broker to a Site, you specify an IP address for it. Make sure that the IP addresses of all agents belong to the same network segment. The port that Connection Brokers use to communicate with each other is TCP `20030`.

In general, the N+1 redundancy approach should be used per Site. Note that for auto-promotion you should have at least three Connection Brokers (auto-promotion is described later in this section). There's no physical limit to how many Connection Brokers you can add to a Site. However, the best results are achieved with only two-three agents present. The three-agent scenario is highly recommended, especially when you have Providers and want to enable [high availability for VDI](/landing/ras-admin-guide/parallels-ras-21-administrators-guide/virtual-desktop-infrastructure-vdi/enabling-high-availability-for-vdi.md).

Adding more than two secondary Connection Brokers to a Site may have an adverse effect and actually degrade the system performance due to the data replication taking place. Note that this does not apply to secondary Connection Brokers in standby mode, which is explained in [**Configuring RAS Connection Brokers**](/landing/ras-admin-guide/parallels-ras-21-administrators-guide/ras-connection-broker/configuring-ras-connection-brokers.md).

### **Adding a secondary RAS Connection Broker to a Site**

To add a secondary Connection Broker:

1. In the RAS console, navigate to **Farm** > \<Site> > **Connection Brokers**.
2. Click the **Tasks** drop-down list and choose **Add** to launch the **Add RAS Connection Broker** wizard.
3. The **Server** field specifies the FDQN or IP address of the server that hosts the RAS Connection Broker. To automatically resolve IP address to FQDN, enable the global **Name Resolution** option. For details, see [**Host Name Resolution**](/landing/ras-admin-guide/parallels-ras-21-administrators-guide/common-management-tasks/host-name-resolution.md)**.**
4. The **IP** field specifies the server IP address. Click the **Resolve** button to obtain the IP address automatically using the FQDN specified in the **Server** field.
5. The **Alternative IPs** field specifies one or more alternative IP addresses, separated by a semicolon. These addresses will be used if RAS Secure Gateways fail to connect to the RAS Connection Broker using its FQDN or the address specified in the **IP** field. This can happen, for example, if Secure Gateways are connecting from a different network, which is not joined to Active Directory.
6. Select the **Install a Secure Gateway with a Connection Broker** option if you also want to install a RAS Secure Gateway on the specified server. If you select this option, you may also select the **Enable HTML5 Gateway** option (for more info, see [**Configure User Portal**](/landing/ras-admin-guide/parallels-ras-21-administrators-guide/ras-secure-gateway/configuring-a-ras-secure-gateway/configure-user-portal.md)**)**.
7. Select the **Add Firewall Rules** option to automatically configure the firewall on the server. See **Port Reference** for details.
8. Click **Next**.
9. On the next page, click **Install** to install the RAS Connection Broker on the server. The **Installing RAS Redundancy Service** dialog opens.
10. Select the server on which the RAS Connection Broker is to be installed and click **Install**.
11. Click **Done**.
12. Click **OK** to add the server to the Farm.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.parallels.com/landing/ras-admin-guide/parallels-ras-21-administrators-guide/ras-connection-broker/secondary-connection-brokers.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
