In an environment where servers are distributed in Korea (KR) and US (US) sites (data centers), the left side shows a round-robin based DNS method and the right side shows a GSLB based method.
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
1.Disaster Recovery
[DNS Method] Because DNS server does not know the health status of the application server (live or dead), 50% of users (because of Round-Robin DNS) are down servers even if the US site server is down as shown in the figure. While making a connection request,
[GSLB Method] The GSLB server can monitor the health status of application servers periodically to prevent users from connecting to down servers.
2. Site Load Balancing
[DNS Method] Since the DNS server cannot know the load status of the application server, 50% of the users will make a connection request to the overloaded server even if the load on the Korean site server exceeds the threshold as shown in the figure. On the other hand,
[GSLB Method] The GSLB server can check the load status of the application server periodically to prevent users from connecting to the overloaded server.
▶ Translator Note : It is not exactly checking the application server load but rather the status of SLB load (currently available sessions, network usage, etc.).
3. Network Proximity
[DNS] DNS server cannot measure round trip time (RTT) of network section between user and application server, so it is impossible to select server considering current network status.
[GSLB Method] The GSLB server allows users to connect to a server with a fast response (good network condition) through RTT measurement of the network segment between the user and the application server.
▶ Translator Note : It is not precisely measuring the RTT between the user and the application server, but the RTT between the local DNS server (the DNS server configured in the user terminal) and the SLB (described in the next section).
4. Geographic Proximity
[DNS Method] DNS server cannot select application server considering user’s geographic location, but user in Korea may be connected to US site server.
[GSLB Method] The GSLB server can select an application server considering the user’s geographical location so that the user can connect to the server that is geographically closest.
▶ Note: In general, because the RTT is small when geographically close, the results of times 3 and 4 are often the same, but in the case of Network Failure / Congestion, different results may be obtained.
In this geographically dispersed server environment, GSLB provides the following benefits:
(1) Service Availability (Disaster Recovery)
(2) Server / Site Load Balancing
(3) Low Latency by Network Proximity
(4) Nearest Access (Nearest by Geographic Proximity)
GSLB service logic, 这个图很详细
Global Server Load Balancing (GSLB) is an evolution of Server Load Balancing (SLB) .If an SLB provided L4 switching within a site, it provided server health checks (dead or live?) And load balancing. GSLB extends this concept geographically to provide the same functionality across multiple sites.
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
■ Configuration
Of the four www.example.com web servers, two are located in Korea (KR) and two in the US (US)
SLB is located in front of each site’s web server so that users can request access to the SLB’s Virtual IP address (1.1.1.1, 2.2.2.2), not the www.example.com web server’s IP address (10.1.1.10 ~ 13). , SLB translates the destination IP address and forwards it to the web server
GSLB and example.com DNS server are located at the Korean site
■ Service Logic
The user sends a DNS Query to the local DNS server to access www.example.com. The local DNS server passes through the root DNS and .com DNS servers.
Send a DNS Query for www.example.com to GSLB.
GSLB acts as a DNS proxy, thus forwarding this DNS query to the example.com DNS server.
The example.com DNS server is pre-registered with the 1.1.1.1 and 2.2.2.2 IP addresses for the www.example.com (SLB’s Virtual IP), and forwards the values to GSLB. Assume that the TTL is 300 seconds on delivery.
GSLB has its own policy (described later) to determine the best site for users during 1.1.1.1 and 2.2.2.2, and also change the TTL to a small value (eg 10 seconds). Changing the TTL value is intended to cause the Local DNS server to cache binding information (IP address for www.example.com) for a minimum of time.
Web server IP 1.1.1.1 determined by GSLB Policy (or changed the order of IP address list to 1.1.1.1, 2.2.2.2) and changed TTL value are transferred to Local DNS.
Local DNS sends the value to the user’s device.
The user now sends an HTTP GET to the Korean site SLB1 with the IP address 1.1.1.1 of www.example.com, and SLB1 again applies its own policy (considering server health / load, etc.) Forwards an HTTP GET message.
GSLB’s Server / Site Selection Policy
GSLB’s site / server selection policy is shown below. Today I will show you a picture and explain it next time.
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
GSLB Policy
5.SLB Connection Load
If you did not select a site in the last 4 lessons (Selecting a Geographic Proximity-based site), select a site with a low connection load on the SLB . SLB Connection Load means “average number of new connections per second on the site, over a given number of intervals). For example, if the SLB period is set to 5 seconds, and each second has 100, 110, 120, 130, 140 new connections, the SLB Connection Load is (100 + 110 + 120 + 130 + 140 ) / 5 seconds = 120.
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
SLB1 and SLB2 periodically report their current connection load to GSLB on Korean and US sites.
When a user sends a DNS Query to a local DNS server
Local DNS server forwards DNS Query to GSLB (omit DNS Proxy for convenience of explanation),
GSLB selects a site based on the current Connection Load of SLB1 and SLB2. For this purpose, a threshold for Connection Load is set in SLB / GSLB. The current connection load of the Korean site SLB1 is 120, beyond the threshold = 100, while the US site SLB2 is 80. Therefore, GSLB responds with a 2.2.2.2 address (Virtual IP) 2.2.2.2 from the US site SLB2, which does not exceed the threshold.
Local DNS server that receives the DNS response delivers the value to the user.
The user makes an HTTP GET request to SLB2.
Upon receiving it, SLB2 chooses between Servers 3 and 4 and forwards the HTTP GET to that server, depending on the policy (considering server health / load status, etc.).
6. Site Preference
If both sites’ SLBs do not exceed the Connection Load threshold and fail to select a site in Step 5 (select a site based on SLB Connection Load), the site is selected by the Site Preference value (site affinity) set by the operator . The operator sets a preference value for each site (by SLB) in GSLB, and GSLB always chooses a site with a large value.
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
When a user sends a DNS Query to a local DNS server
Local DNS server forwards DNS Query to GSLB (omit DNS Proxy for convenience of explanation),
GSLB refers to site-specific preferences set by the operator. The operator set the Preference value of the US site to 255 during the time when the service was not available due to the expansion of the server / network at the Korea site. Therefore, GSLB responds by putting the 2.2.2.2 address (Virtual IP) 2.2.2.2 of the US site with large Preference value in DNS Response.
Local DNS server that receives the DNS response delivers the value to the user.
The user makes an HTTP GET request to SLB2.
Upon receiving it, SLB2 chooses between Servers 3 and 4 and forwards the HTTP GET to that server, depending on the policy (considering server health / load status, etc.).
7. Least Selected
If both sites are set to the same Preference and no site selection is made in Step 6 (site preference based site selection), select the least selected site as a way to balance the site load .
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
When a user sends a DNS Query to a local DNS server
Local DNS server forwards DNS Query to GSLB (omit DNS Proxy for convenience of explanation),
GSLB refers to the selection ratios of Korean and US sites. So far, we have chosen 40% Korean sites and 60% US sites for all user requests. Therefore, GSLB responds by putting the 1.1.1.1 address (Virtual IP) of the Korean site SLB1, which had few site selections, in the DNS Response.
Local DNS server that receives the DNS response delivers the value to the user.
The user makes an HTTP GET request to SLB1.
Upon receiving it, SLB1 chooses either Server 1 or 2 to forward HTTP GETs to that server, depending on the policy (considering server health / load status, etc.).
8. Static Load Balancing
Steps 7 and 8 are the final choices in which only one of them can be used. Step 8 selects the site by Round-Robin or Weighted Round-Robin method . In case of Round-Robin, select the site in the order of Korea-> USA-> Korea-> USA … In case of Weighted Round-Robin method, if the ratio of weight value between Korea and USA is 2: 1, Korea- > South Korea-> United States-> Korea-> Korea-> United States … in order to select twice as many sites. (E.g. more servers in Korea)
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
When a user sends a DNS Query to a local DNS server
Local DNS server forwards DNS Query to GSLB (omit DNS Proxy for convenience of explanation),
GSLB selects sites in round-robin or weighted round-robin mode. In this example, GSLB selects the US site and responds with the DNS response with the 2.2B address (Virtual IP) 2.2.2.2 from SLB2.
Local DNS server that receives the DNS response delivers the value to the user.
The user makes an HTTP GET request to SLB2.
Upon receiving it, SLB2 chooses between Servers 3 and 4 and forwards the HTTP GET to that server, depending on the policy (considering server health / load status, etc.).
Summary
The table below is a comparison table for “GSLB + SLB method”, “GSLB only method” and “DNS method”. GSLB + SLB method supports all 8 policies described so far, but GSLB only method does not know site load or Network Proximity because there is no SLB at site. Finally, in case of DNS method, Round-Robin based Static Load Only supports Balancing.
GTM(Global Traffic Manager)和GSLB(Global Server Load Balancing)服务介绍「建议收藏」
So far, we have learned about GSLB in four episodes.
The advantages of the GSLB solution can be summarized into three major categories:
(1) site redundancy
(2) site load balancing
(3) provide users with the best site (faster or closer to responding)
GSLB solutions are applicable to global companies, Internet portals / Internet content providers (CSPs), cloud service providers, and CDN service providers that serve their customers worldwide.