Connecting Agents to Controllers in an HA Scenario
Under normal conditions, the App Agents and Machine Agents communicate with the primary Controller. If the primary Controller becomes unavailable, the agents need to communicate with the secondary Controller instead.
We recommend that traffic routing be handled by a reverse proxy between the agents and Controllers, as shown in the figure above. This removes the necessity of changing agent configurations in the event of a failover or the delay imposed by using DNS mechanisms to switch the traffic at the agent.
If using a proxy, set the value of the Controller host connection in the agent configuration to the virtual IP or virtual hostname for the Controller at the proxy, as in the following example of the setting for the Java Agent in the controller-info.xml file:
<controller-host>controller.company.com</controller-host>
config.xml. See .NET Agent Configuration Properties.If you set up automation for the routing rules at the proxy, the proxy can monitor the Controller at the following address:
http://<controller>:<port>/controller/rest/serverstatus
An active node returns an HTTP 200 response to GET requests to this URL, with <available>true</available> in the response body. A passive node returns 503, Service Unavailable, with a body of <available>false</available>.
For more information, see Use a Reverse Proxy.