Can I use Load Balancer and GTM together?
Short answer
Yes; the two products complement each other, and this is the most common use. At the DNS query, GTM returns the vService address in the healthy and suitable data center; the client connects to that address, and Load Balancer - ADC in that data center distributes the request to the healthy Backend Services. GTM can also make its decision based on this information by collecting vService statuses and resource metrics from the TR7s in remote data centers introduced as Remote Devices.
How Does It Work?
Client → GTM (DNS) → vService address of the selected data center
Data center 1 · healthy
vService 203.0.113.10
Load Balancer → Backend Services
Data center 2 · unreachable
vService 203.0.113.20
GTM does not give this address in responses
- The client queries the domain name; GTM is the authoritative DNS server for this domain name.
- GTM returns the vService address in the suitable data center according to the health checks and the selected mode.
- The client connects to the vService in that data center.
- Load Balancer distributes the request to the healthy Backend Services in that data center.
Setup Outline
| # | Step | Where |
|---|---|---|
| 1 | A Load Balancer vService is set up in each data center | Load Balancer → Load Balancer vService List |
| 2 | The data centers are introduced to each other; monitoring is set up mutually | GTM → Remote Devices (Data Centers) (details) |
| 3 | A health check that measures the vService status is defined | GTM Health Checks: the Datacenter HC type, bound to a Health Scenario |
| 4 | The vService address of each data center is written to the domain name records, and a scenario is assigned to the record | GTM → GTM Services → service → Records (Record HC) |
| 5 | The domain name is delegated to TR7 (NS delegation) | At the domain name provider, outside TR7 |
In Datacenter mode, the record can select a data center according to vService metrics (Status, Requests, Connections, CPU, Bandwidth, Healthy Backends…) with DC Selection → Service Based.
Common Misconceptions
- "GTM recognizes the vService independently of its name." In Service Based selection, the vService is matched by the name written in the Service Name field. The names of the vServices providing the same service must be the same in each data center.
- "When the data center is put into maintenance, GTM takes it out of rotation on its own." The Maintenance Mode of the Remote Device does not change the routing on its own; the maintenance status must be added to the health scenario as a condition.
- "A GTM record can only point to a TR7 vService." The address in the record is written freely; it can also be a target outside TR7. Monitoring the vService status, however, is possible only for TR7 vServices.
How it is done in the documentation
