> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloud.aptranet.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Health checks and failover

> Monitor endpoints and exclude unhealthy Cloud DNS answers from eligible routing results.

A record set can include failover health-check metadata. Health state is combined with routing selection so unavailable resource records can leave the eligible result set.

## Check settings

| Field | Description |
| - | - |
| Protocol | `HTTP`, `TCP`, `UDP`, or `ICMP` |
| Port | Endpoint port |
| Frequency | Interval between checks |
| Timeout | Maximum wait for a check result |
| Method / URL | HTTP request behavior where applicable |
| TLS | Whether the probe uses TLS where applicable |
| Regular expression | Optional response-content expectation |
| HTTP status | Expected HTTP status code |
| Host | Host header or probe hostname where applicable |
| Command | Protocol-specific probe content where applicable |

## Design failover

**1. Define health precisely**

Probe a path or port that reflects whether the endpoint can serve real traffic, not merely whether a process accepts a socket.

**2. Mark primary and backup records**

Set per-record backup metadata and use a picker chain that prefers eligible primary values.

**3. Choose TTL and timing**

Resolver caches can retain a previously healthy answer until its TTL expires. Set TTL, frequency, and timeout from the recovery objective and expected transient failures.

**4. Test failure and recovery**

Fail a staging endpoint, query multiple times through a resolver, and confirm it leaves and later rejoins the eligible set.

> [!WARNING]
>
> Decide the all-endpoints-down behavior before production. DNS cannot create a healthy destination; an overly strict configuration can produce no eligible answer.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.