How are GTM and the Load Balancer used together?
Short answer
In the most common setup, Load Balancer - ADC in each data center serves the same service with a vService; the vService address in each data center is written into the GTM record. For a DNS query, GTM returns the vService address of the healthy and suitable data center; the client connects there, and the Load Balancer in that data center distributes the request to the Backend Services. GTM factors the status and metrics of the vServices into its decision with health checks of the Datacenter HC type and with the Service Based data center selection in the Datacenter mode. The TR7s in the other data centers are defined on the Remote Devices (Data Centers) screen.
How Does It Work?
- The vService of the service is set up on the TR7 in each data center.
- Each data center is defined on the other with Remote Devices; GTM collects the access status, resource metrics and vService information from the remote TR7.
- A health scenario that monitors the vService or the data center is bound to the HC condition of each address in the record.
- The answer is given according to the domain's mode: in Disaster Recovery, the address of the Main DC, and the address of the DR DC once the switchover condition occurs; in Datacenter, the addresses of the data centers sorted according to the selected criterion.
The outline of the setup steps: Can I use Load Balancer and GTM together?
In TR7
| In GTM | Connection to the Load Balancer |
|---|---|
| Address in the record | Usually the address of a vService; an address outside TR7 can also be written |
| Datacenter HC | Measures the status or a metric of the vService in a data center (e.g. vService Status, vService Connections) |
| DC Selection → Service Based | Sorts the data centers according to the metric of the vService written in the Service Name field (e.g. Requests, Connections, Healthy Backends) |
| DNS Service | Works together with the vServices on the same TR7; the same Frontend IP and port cannot be given to both |
Common Misconceptions
- "GTM recognizes the vService independently of its name." In the Service Based selection, the vService is matched by the name written in the Service Name field; the vServices that provide the same service must have the same name in each data center.
- "GTM uses the Load Balancer's health check results automatically." GTM's decision is made with the scenarios bound to the HC condition in the record; the vService Status must be added to a scenario with a Datacenter HC.
- "When there is a Load Balancer cluster, GTM is unnecessary." A cluster is device redundancy within a data center; switchover between data centers is done with GTM (For redundancy across data centers, should I use Load Balancer or GTM?).
How it is done in the documentation
