> For the complete documentation index, see [llms.txt](https://docs.cennso.com/components/rpr/3.0/llms.txt) (all documentation: [llms.txt](https://docs.cennso.com/llms.txt)). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cennso.com/components/rpr/3.0/configuration/failover-servers.md).

# RADIUS servers for failover scenarios

In addition to usual RADIUS relay servers, RADIUS Proxy supports secondary RADIUS servers that you can use in failover scenarios.

For example:

```yaml
auth:
  proxy_auth_1:
    listen: 0.0.0.0
    ports:
      - 1812
    sources:
      - secret: "secret"
        source: 0.0.0.0
        nas_id: PGW1
    allow_attrs: []
    relays:
      - address: "radius-server-1-host:1812"
        secret: "secret"
        timeout: 5000
        retries: 3
        failover_server_pool: auth_pool
```

In the example above, the specification of the RADIUS Authentication server forwards all the incoming requests to the default `radius-server-1-host:1812` relay. If RADIUS Proxy cannot receive a response more than 3 times (specified in the `retries` parameter), the request is forwarded to a server(s) specified in `auth_pool`. All the secondary server pools referenced by the relay configuration must be specified in the `pool` configuration:

```yaml
pool:
  auth_pool:
    - address: 127.0.0.1
      port: 1815
      secret: "secret"
      retries: 3
      timeout: 1000
    - address: 127.0.0.1
      port: 1816
      secret: "secret"
      retries: 1
      timeout: 1000
```

A secondary RADIUS server remains active until it exceeds the number of failed requests specified in `pool.{POOL_NAME}.{SECONDARY_RADIUS_SERVER}.retries`. A request fails if no response is received within `pool.{POOL_NAME}.{SECONDARY_RADIUS_SERVER}.timeout` milliseconds.

RADIUS Proxy doesn't use inactive RADIUS servers to forward RADIUS requests for time specified in the `radius.unreachable_timeout` configuration option. This timeout, in milliseconds, defines how long a RADIUS server is marked as inactive. After the timeout expires, the server is returned to the list of active servers and RADIUS Proxy continues to send requests there.
