All Products
Document Center


Last Updated: Sep 25, 2018

What is the difference between GTM and SLB?

From the perspective of working principle, GTM uses DNS to resolve a domain name to multiple IP addresses. It also enables different users to access different IP addresses, to realize traffic allocation of an application service. Besides, GTM dynamically updates the DNS resolved IP address list through health check to realize fault isolation and Failover. The access traffic of the final user is directly connected to the IP address of the service, without passing the GTM instance.

SLB serves as a proxy for the user access requests and distributes the requests to different servers in real time. The access traffic of the final user must pass through the SLB instance. Comparison between the two is listed below:

Comparison item Network layer Backend address Weighted round robin Cross-region difficulty Fault isolation time Session persistence
GTM Layer-3 Domain name and IP address Supported Simple In minutes Not supported
SLB Layer-4 and layer-7 IP address Supported Difficult In seconds Supported

Generally, SLB is used for load balancing if the addresses are in the same region, and GTM is used for load balancing if multiple SLB addresses are in different regions.

What is the difference among GTM, DNS, and global load balancing?

GTM integrates the smart resolution function of DNS and the application service monitoring function of CloudMonitor. It also provides the DNS’s nearby access capability, application service health check capability, and failover switch capability.

Upgraded from the global load balancing function of DNS, GTM offers more monitoring methods, more advanced IP address management functions, and more stable and faster monitoring feedback experience.

If you are using the DNS global load balancing function, migrate your business to a GTM instance as soon as possible. The network monitoring and global load balancing functions of DNS will be deprecated gradually.

Can the domain name of a GTM instance be directly accessed from an URL?

You cannot use the CNAME domain name of the GTM instance as the final access URL. Same for CDN and other products, the CNAME domain name of the GTM instance can only be used for service access mapping and not as the final access URL.

How does GTM determine whether a service has a fault?

GTM integrates the application service monitoring function. GTM can monitor the application service in any of ping, TCP, and HTTP modes to detect whether the application service has a fault.

  • ping-based monitoring: GTM verifies whether the application service has a fault based on the packet loss rate and response time.
  • TCP-based monitoring: GTM verifies whether the application service has a fault based on the response time of the TCP port.
  • HTTP-based monitoring: GTM verifies whether the application service has a fault based on the response time of the HTTP request and the returned code and message.

By default, GTM provides seven monitoring points to monitor the application service. It uses the combined alarm rules of multiple monitoring points as the overall condition for service exception judgment.

How long does GTM failover take effect?

According to results of multiple tests, after the service application has a fault, GTM can switch about 90% traffic of the application service in five minutes.

GTM failover effective time = Fault detection time + DNS switch synchronization time

  • Default detection time: Currently, the health check configuration can detect the fault in about three minutes after a fault occurs by default.
  • DNS switch synchronization time: Currently, the GTM’s CNAME access domain name TTL is set to 60s. Theoretically, synchronization is performed in 60s after domain name switch, but the actual time depends on the cache setting of the carrier.

Can the GTM address pool use a domain name?

Yes. You can enter an IP address or a domain name in a GTM address pool, but one address pool cannot contain IP addresses and domain names at the same time.

When an address pool has multiple domain names, the address pool performs round robin load balancing for the domain names by default.

Can GTM realize smart DNS access?

Yes. GTM integrates the smart DNS resolution function. Currently, it can be used to perform smart DNS resolution for users of four major Chinese telecom carriers in seven regions and six continents outside Asia. Users in different regions can access the proxy access point nearest to the regions where the users reside.

Does GTM support session persistence?

No. GTM runs at the DNS level. GTM uses DNS to return the specific service IP address to the user, and then the user at the client directly connects to this address. The client is directly connected to the IP address of the application service and the access traffic does not pass GTM. Therefore, the HTTP traffic between the client and the server is invisible at GTM and thus GTM cannot realize session persistence.