# Configuring Agent Relay Failover

To configure agent relay failover specify two or more target servers for the agent relay to connect to. If a server fails the agent relay switches to another server from the list.

When the agent relay starts, it connects to the master server defined in the `agentrelay.jms_proxy.server_host` parameter. If that server fails, the agent relay selects a failover server from the list. The agent relay continues to use the server until it fails, even if the previous or master server becomes available again.

Example with two failover servers:

``` agentrelay.jms_proxy.failover_hosts_with_ports=failover_da_server1:7918,failover_da_server2:7918```

Separate each server definition with a comma.

Note: If a large number of agents are configured to use failover, reconnecting can take a while.

To configure agent relay failover:

1. Open the agent relay properties file: `\conf\agentrelay.properties`

2. In the``` agentrelay.jms_proxy.failover_hosts_with_ports``` parameter enter a list of failover server locations in this format: `<IP address or hostname>:JMS_port`