How does a Health Check result affect the DNS answer?
Short answer
A Health Check result affects the DNS answer not directly but through the Health Scenario that uses it. In the HC field of each address in a record, Static (default, always in the answer), Disabled (in no answer) or HC Scenario is selected; an address with HC Scenario selected enters the answer only while the scenario is active. In Disaster Recovery mode, Disaster Recovery Condition is also decisive: while the selected scenario is active, or, with the default Automatic (when no healthy primary records left) setting, when no healthy address remains in the Main DC, the answers are given from the addresses of the DR DC. The remaining healthy addresses are turned into the answer with Balance Algorithm; if no address remains, Fail-Safe Records are returned if they are defined; clients receive the new answer when the TTL of the old answer in their resolvers expires.
How Does It Work?
- Health check: After Required Failures consecutive failures, it becomes Error, and after Required Successes consecutive successes, it becomes OK.
- Scenario: The scenario that uses the check is re-evaluated and becomes active or passive. If a check in the condition is in the Preparing or No Data status and the other checks do not determine the decision, the scenario keeps its last decision; if With Trigger is selected, the transition waits for the verification condition (What is a health scenario; how does it combine several checks?).
- Address filtering: The addresses of the record are filtered according to the HC field; an address whose scenario is passive leaves the candidate list.
- Mode: In Standalone mode, the healthy addresses of the single group are taken; in Disaster Recovery mode, the Main DC or the DR DC group; in Datacenter mode, the data centers that have at least one healthy address, in the DC Selection order and up to the Total DCs to Select from count.
- Answer: The candidates are turned into the answer with Balance Algorithm (and with Topological Selection if it is on); if no candidate remains, Fail-Safe Records are returned. The answer of the record is refreshed within a few seconds.
Details: Record Resolution Logic.
How It Appears in the Record Status
The result is reflected in the Status value of the record in the Records list (Record Status Values):
| Status | Meaning |
|---|---|
| OK | All the addresses in the answer are healthy |
| Partially OK (a record is down) | The answer is given, but at least one address from the group in the answer is unhealthy |
| Partially OK | In Datacenter mode, only some of the data centers have a healthy address |
| DR | In Disaster Recovery mode, the answers are given from the DR DC |
| Fail-safe | No healthy address remains; Fail-Safe Records are returned |
| No healthy records | There is no healthy address and no Fail-safe record (What is fail-safe; what does GTM answer if no address is healthy?) |
On the GTM Logs screen, the following are written as a Record State event: in every mode, the addresses entering and leaving the answer (is enabled / is disabled); in the Standalone and Disaster Recovery modes, the transition to Fail-safe (Fail-safe records are on) and no healthy address remaining (No healthy records left); in Disaster Recovery mode, the DR switchover and the return (DR is on / DR ended).
In TR7
- Address and scenario link: The Record / HC table in the GTM → GTM Services → service → Records → record form. The ready-made Always and Never scenarios are not in the HC Scenario list.
- DR switchover: The Disaster Recovery Condition field of a record in Disaster Recovery mode; Disaster Recovery on No Healthy Records (on by default), which appears while a scenario is selected, switches to the DR DC when no healthy address remains in the Main DC, even if the scenario is not active.
- Current answer: The Active Records row in the record preview shows the addresses that are in the answer at that moment (Preview of the selected record).
- Cluster: Each device calculates the answer of the record with its own health check and scenario results; the answers of the two devices can differ (How does GTM behave in a cluster?).
Common Misconceptions
- "When a health check goes to Error, the address leaves the answer by itself." The address leaves only if a scenario that uses this check is selected in the HC field; a Static address always stays in the answer.
- "A check whose result is unknown removes the address from the answer." In the Preparing or No Data status, if the other checks do not determine the decision, the scenario keeps its last decision; the address stays in its previous state.
- "For the Disaster Recovery condition, a 'data center healthy' scenario is selected." In this field, the answers switch to the DR DC while the scenario is active; the condition is built with UNLESS so that it means "main data center unhealthy".
- "When the answer of GTM changes, all clients go to the new address immediately." Resolvers use the old answer until its TTL expires (What are the limits of DNS-based routing; how do TTL and the resolver cache affect the decision?).
How it is done in the documentation
Related questions
- What is a health check in GTM; how does it differ from a Load Balancer health check?
- What is a health scenario; how does it combine several checks?
- What is fail-safe; what does GTM answer if no address is healthy?
- What does a record's TTL determine; how should it be chosen in GTM?
- What are the Disaster Recovery conditions; is the switchover automatic or manual?
