What is a health check in GTM; how does it differ from a Load Balancer health check?
Short answer
In GTM, a health check is the object that periodically checks the status of a target or a data center and produces an OK or Error result; it is defined on the GTM → Health Checks screen, without being bound to any record or Backend Service. The health check profile in the Load Balancer checks the Backend Service it is assigned to and, with its result, directly removes that Backend Service from traffic or takes it back. The result of a GTM health check, on the other hand, does not change any DNS answer on its own: it goes into a Health Scenario condition, and the scenario's decision determines the addresses of the records and the Disaster Recovery switchover. The check types and the Period, Timeout, Required Successes and Required Failures fields are common to both sides; specific to GTM are the Datacenter HC type, which evaluates the metrics of a remote data center, and the Automatic Health Checks list, which is created automatically for each data center.
How Does It Work?
- The check is made to the target in the Address field (an IP or a domain name; with a port in the types other than Ping) over the selected Route Table at the Period interval, and it must complete within Timeout. The Expression (JSONata) type sends no network request; it evaluates the expression against the device and time information. Datacenter HC does not send a request either; it is re-evaluated each time the information of the selected data center (the local data center or a remote data center on the Remote Devices screen) is refreshed. A remote data center is queried at the Access Period interval.
- After Required Successes consecutive successes, the status becomes OK, and after Required Failures consecutive failures, it becomes Error. A new check appears as Preparing until its first decision; if Expect Negative Result is on, the result is reversed (Status values).
- When the status changes, the scenarios that use the check are re-evaluated. OK counts as true and Error as false; Preparing and No Data count as "unknown"; if the other checks do not determine the decision, the scenario keeps its last decision.
- The scenario's decision is used in the HC field of an address in the record, in the Disaster Recovery Condition field or in the Internet Access Health Scenario setting of the local data center (How does a Health Check result affect the DNS answer?).
Comparison
| Load Balancer health check | GTM health check | |
|---|---|---|
| Where it is defined | Load Balancer → Profiles → Health Checks; assigned to the Health Check field of a Backend Service or a Backend Group | GTM → Health Checks; not assigned to any object, selected in the scenario's condition |
| Checked target | The address of the Backend Service it is assigned to (or Use Different IP for Health Check) | The Address in the form (an IP or a domain name); in Datacenter HC, the metric of the selected data center |
| Effect of the result | The Backend Service leaves traffic or returns to traffic | No direct effect; it is reflected in the DNS answer through the scenario's decision |
| Types | 15 check types and Scenario, which combines several checks; default HTTP | The same 15 types and Datacenter HC; default Datacenter HC. Combining is done on the Health Scenarios screen |
| Defaults | Period 1 s, Timeout 1 s, Required Successes 3, Required Failures 2 | The same; Datacenter HC has no Period or Timeout |
| Ready-made checks | None | Always, Never and, for each data center, the access, internet and maintenance checks |
GTM Health Check in TR7
- Screen: Health Checks under Configuration Menu → GTM. The upper table lists the user checks, and the lower Automatic Health Checks table lists the ready-made checks that cannot be edited (Always, Never and, for the data centers, WAN, LAN and general access, internet access and maintenance mode).
- Type: The Check Type list offers the Datacenter HC, TCP, TCPS, UDP, Ping, HTTP, HTTPS, DNS, FTP, FTPS, LDAP, LDAPS, SMTP, SMTPS, Oracle and Expression (JSONata) types (Health check types); the type cannot be changed after the check is saved.
- Reading Load Balancer information: The vService Status, Up Services and Down Services metrics in the Datacenter HC Type list of Datacenter HC carry the health status of the vServices in a data center into the GTM decision.
- Monitoring: The status circle in the list, the Log and Used in tabs in the preview panel (Preview of the selected check) and the Health Check Status events on the GTM Logs screen.
- Cluster: Each TR7 device performs the check itself; the status circle is split in two, and each half shows the result of one device (How does GTM behave in a cluster?).
Common Misconceptions
- "GTM uses the health check profiles of the Load Balancer." GTM health checks are defined separately; the health status on the Load Balancer side is read with the vService metrics of Datacenter HC.
- "When a health check goes to Error, the address leaves the DNS answer." The address is affected only if it is bound to a scenario that uses this check; an address whose HC field is Static always stays in the answer.
- "A check in the Preparing or No Data status counts as Error." These statuses count as "unknown"; if the other checks do not determine the decision, the scenario keeps its last decision.
- "Datacenter HC sends a request to the remote data center." It does not; it evaluates the information that the selected data center reports to TR7 (What is a Remote Device; how does GTM monitor a remote data center?).
How it is done in the documentation
