For redundancy across data centers, should I use Load Balancer or GTM?
Short answer
GTM is used for redundancy across data centers; the Load Balancer cluster, on the other hand, is for device redundancy within a data center. In an LB cluster, the VIP is moved with VRRP between two TR7s in the same network segment; the two addresses of the VIP Communication pair must be in the same subnet, and a cluster has at most two devices. GTM, on the other hand, works at the DNS layer and directs the client to a healthy data center before the connection is established (difference from local load balancing); in Disaster Recovery mode, automatic active-passive switching between the Main DC and the DR DC is performed, and in Datacenter mode, distribution to multiple data centers. The recommended architecture is to use both together. In GTM, the switching time depends on the TTL value of the DNS record (default 3600 seconds).
Comparison
| Load Balancer cluster | GTM | |
|---|---|---|
| Scope | One data center, two TR7s in the same subnet | Across data centers |
| Layer | Moving the VIP with VRRP (L2/L3) | DNS response |
| Decision moment | After the connection is established (vService) | Before the connection is established |
| Failure protected against | Failure of the TR7 device | The entire data center going out of service |
| Switching time | A few seconds | Until the TTL of the old DNS response expires |
| License | Load Balancer | Separately licensed product |
Which One When?
| Need | Recommended |
|---|---|
| Protection against TR7 device failure in the same data center | LB cluster (HA Clustering & Sync + VIP) |
| Switching to another data center if one goes out of service | GTM, Disaster Recovery mode (Disaster Recovery) |
| Distribution to multiple data centers by load or location | GTM, Datacenter mode |
| Both | An LB cluster in each data center, GTM between the data centers |
When Using GTM
- TTL: The record TTL is 3600 seconds by default; in setups that require fast switching, a short TTL (e.g. 60–300 seconds) is recommended (how it works, TTL).
- Remote data centers: They are defined on the Remote Devices (Data Centers) screen; health checks are created automatically for each of them (Remote Device).
- Return: In Disaster Recovery mode, when the switching condition is cleared, the responses return to the Main DC again.
- Use together: In Datacenter mode, vService metrics (requests, connections, number of healthy Backend Services) can be decision inputs.
Common Misconceptions
- "The TR7s in two data centers can be made a single cluster." The VIP Communication addresses must be in the same subnet; addresses in different subnets are not saved.
- "GTM switching is instant." Clients and DNS servers keep the old response in cache for the duration of the TTL.
- "GTM replaces the LB cluster." GTM selects the data center; the redundancy of the TR7 device within the data center is still provided by the LB cluster.
How it is done in the documentation
