GSLB dynamic scheduling method and system based on proximity water line
By introducing proximity water level line and weight polling modules in GSLB dynamic scheduling, the problems of waste of resources and poor user experience in delayed similar scenarios are solved, and more refined flow control and resource optimization are achieved.
Patent Information
- Application Number
- CN202411705269.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
AI Technical Summary
The existing GSLB dynamic scheduling method based on delay is difficult to perform refined control in scenarios with similar delays, resulting in waste of server resources and poor user experience.
A proximity water level line and weight polling module are introduced. By analyzing DNS requests, detecting delay time, determining the water level line interval and adjusting the weight ratio of the load balancer, selecting the most suitable data center service address for GSLB dynamic scheduling.
It realizes more refined traffic control based on application types and network conditions, optimizes resource utilization, reduces server load, and improves user experience.
Smart Images

Figure CN119652897A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information technology, and in particular to a GSLB dynamic scheduling method and system based on a proximity waterline. Background Art
[0002] In a multi-data center scenario, a DNS-based GSLB product will return the server address closest to the user's location based on the physical location and the operator's line. The indicator for measuring proximity to the user's location is generally the average delay from the data center to LocalDNS. When the data center Datacenter-A receives a DNS request, the DNS device in Dataceter-A will perform reverse detection of protocols such as icmp, udpecho, and dns to LocalDNS (source IP) to obtain the delay time. After obtaining the delay time, it will smooth the delay time with the old delay time to obtain a new delay time. At the same time, the DNS device in the data center Datacenter-A will also notify the devices in other data centers to perform reverse detection in other data centers. After all data centers obtain the new delay time, they will synchronize the delay results with each other. Datacenter-A will select the data center with the smallest delay time based on the delay results of each data center and return its server address.
[0003] Latency-based GSLB dynamic scheduling is suitable for scenarios with large latency differences, such as 10ms and 100ms. It is reasonable to choose the data center server address with a latency of 10ms. When the latency difference is small, such as 10ms and 11ms, it is not reasonable to choose 10ms. In actual scenarios, choosing a server address in either data center will not affect the user experience.
[0004] Latency-based GSLB dynamic scheduling is not suitable for fine-grained control based on application types. In scenarios with 10ms or 100ms, if the user application can accept a 100ms delay, then returning the 10ms data center server address will not only increase the server traffic load, but also cause a waste of server resources. When the data center delay is very high, such as 300ms or 200ms, the user application can no longer accept it, and it is unreasonable to continue returning the 200ms server address. Summary of the invention
[0005] Based on this, an embodiment of the present application provides a GSLB dynamic scheduling method and system based on the proximity waterline. The purpose of this method is to solve two scenarios of similar delays and fine-grained control based on application type based on the GSLB dynamic scheduling method of the proximity waterline, so as to make GSLB dynamic scheduling more reliable.
[0006] In a first aspect, a GSLB dynamic scheduling method based on a proximity waterline is provided, the method comprising:
[0007] The resolution module obtains the DNS request from the receiving local DNS and starts the detection process according to the DNS request;
[0008] When the detection module receives the instruction to start the detection process, it initiates a ping-type reverse detection request to the local DNS, waits for a reply to calculate the delay time, and notifies the detection modules of other data centers to perform the same detection to collect the delay data of all relevant data centers, calculate the new delay time and feed it back to the resolution module;
[0009] When the parsing module receives the new delay time, the proximity watermark module determines the watermark interval to which the data center service address belongs based on the new delay time, and adjusts the weight ratio structure of the weighted load balancer accordingly;
[0010] The weighted polling module selects the data center service address with the smallest new delay time as the GSLB dynamic scheduling result based on the determined watermark interval and load ratio.
[0011] Optionally, after receiving the instruction to start the detection process, a reverse detection request of the ping type is initiated to the local DNS, and a reply is waited for to calculate the delay time, specifically including:
[0012] The current delay time rtt is calculated based on the request sending time and the reply receiving time, and the new delay time new_rtt is calculated using the current rtt and the smoothing factor; where new_rtt = 3 / 4*rtt + 1 / 4*old_rtt.
[0013] Optionally, when the parsing module receives the new delay time, the proximity watermark module determines the watermark interval to which the data center service address belongs according to the new delay time, and adjusts the weight ratio structure of the weighted load balancer accordingly, specifically including:
[0014] When the proximity watermark function is enabled, a matching interval is searched in the preset proximity watermark interval set, and the weight ratio structure of the weighted load balancer is adjusted accordingly;
[0015] When the proximity watermark function is not enabled, the service address with the smallest delay will be directly selected for response.
[0016] Optionally, the weighted polling module selects the most appropriate data center service address according to the determined waterline interval and load ratio, specifically including:
[0017] When a watermark interval is associated with service addresses of multiple data centers, polling is performed among the service addresses of multiple data centers to select the address that is ultimately replied to the DNS.
[0018] Optionally, after receiving the instruction to start the detection process, the detection module initiates a reverse detection request of the ping type to the local DNS and waits for a reply to calculate the delay time, further comprising:
[0019] Determine whether the detection has timed out. If the detection has timed out, set the new delay time to NA, which means infinite delay.
[0020] When the detection has not timed out, wait for the reply to be made, and when the reply is received, calculate the delay time;
[0021] And determine whether the new delay time hits the range. If it does not hit, add the service address in the data center to the dead letter watermark interval.
[0022] Optionally, when the detection module receives the instruction to start the detection process, it initiates a reverse detection request of the ping type to the local DNS, and further includes:
[0023] Determine whether the request is sent by the local DNS for the first time. If so, record the local DNS IP and domain name of this DNS request, set the retention time, and then notify the detection module to perform reverse detection;
[0024] After the hold time expires, the local DNS IP and domain name information related to the DNS request will be cleared. If the same domain name is received from the same local DNS later, the detection module will be notified again to perform reverse detection.
[0025] In a second aspect, a GSLB dynamic scheduling system based on a proximity waterline is provided, the system comprising:
[0026] The parsing module is used to obtain the DNS request from the receiving local DNS and start the detection process according to the DNS request;
[0027] The detection module is used to initiate a ping-type reverse detection request to the local DNS after receiving the instruction to start the detection process, and wait for a reply to calculate the delay time, and notify the detection modules of other data centers to perform the same detection to collect the delay data of all relevant data centers, calculate the new delay time and feed it back to the resolution module;
[0028] The proximity watermark module is used to determine the watermark interval to which the data center service address belongs according to the new delay time after the resolution module receives the new delay time, and adjust the weight ratio structure of the weighted load balancer accordingly;
[0029] The weighted polling module is used to select the data center service address with the smallest new delay time as the GSLB dynamic scheduling result based on the determined waterline interval and load ratio.
[0030] In a third aspect, an electronic device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the GSLB dynamic scheduling method described in any one of the first aspects is implemented.
[0031] In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the GSLB dynamic scheduling method described in any one of the first aspects is implemented.
[0032] In a fifth aspect, a computer program product is provided, including a computer program / instruction, which, when executed by a processor, implements the GSLB dynamic scheduling method described in any one of the first aspects.
[0033] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0034] (1) By introducing the proximity watermark and weighted polling modules, more refined traffic control can be performed based on application type and network conditions. By setting different watermark intervals and load ratios, the system can more reasonably allocate traffic to different data centers, thereby optimizing resource utilization, reducing unnecessary server load, and improving resource utilization efficiency.
[0035] (2) By dynamically adjusting the load distribution of data center service addresses, the solution can ensure that user requests are routed to the best data center, even when network conditions change or data center loads are uneven. This can reduce user waiting time and provide faster response speeds, thereby significantly improving the end-user network experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] In order to more clearly illustrate the implementation methods of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for the implementation methods or the description of the prior art. Obviously, the drawings in the following description are only exemplary, and for ordinary technicians in this field, other implementation drawings can be derived from the provided drawings without creative work.
[0037] Figure 1 A flowchart of the steps of a GSLB dynamic scheduling method based on a proximity waterline provided in an embodiment of the present application;
[0038] Figure 2 A flow chart of the detection module provided in the embodiment of the present application;
[0039] Figure 3 A flowchart of the analysis module provided in an embodiment of the present application. DETAILED DESCRIPTION
[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0041] In the description of the present invention, the terms "comprises", "has" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or apparatus comprising a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may also include other steps or units that are not explicitly listed but are inherent to these processes, methods, products or apparatuses, or steps or units added based on further optimization schemes conceived by the present invention.
[0042] The purpose of the present invention is to solve the two scenarios of similar delays and refined control according to application types based on the GSLB dynamic scheduling method of the proximity waterline, so as to make GSLB dynamic scheduling more reliable.
[0043] The invention discloses a GSLB dynamic scheduling method based on proximity waterline. The overall mechanism is to add proximity waterline module and weight polling module on the basis of the original dynamic scheduling scheme.
[0044] The resolution module obtains the DNS request from the receiving local DNS and starts the detection process according to the DNS request.
[0045] When the detection module receives the instruction to start the detection process, it initiates a ping-type reverse detection request to the local DNS, waits for a reply to calculate the delay time, and notifies the detection modules of other data centers to perform the same detection to collect the delay data of all relevant data centers, calculate the new delay time and feed it back to the resolution module;
[0046] When the parsing module receives the new delay time, the proximity watermark module determines the watermark interval to which the data center service address belongs based on the new delay time, and adjusts the weight ratio structure of the weighted load balancer accordingly;
[0047] The weighted polling module selects the data center service address with the smallest new delay time as the GSLB dynamic scheduling result based on the determined watermark interval and load ratio.
[0048] The user turns on the watermark function, sets the watermark interval and the interval load ratio. The watermark interval is set as a time range in milliseconds, and the intervals cannot overlap. The load ratio is the set weight value, ranging from 0 to 10, where 0 means no resolution is returned. Note that the watermark interval set has a default dead letter watermark interval with an ID of 0. When the delay does not hit the watermark interval set by the user, the data center service address is added to the dead letter watermark interval. The dead letter watermark interval load ratio is 0, which means it will not be resolved and returned. See Table 1 for the watermark correspondence table.
[0049] Table 1 Water level correspondence table
[0050] Water level interval ID Water level range Load ratio 0 None 0 1 1ms-10ms 5 2 11ms-50ms 3 3 50ms-100ms 2 4 >100ms 0
[0051] Specifically, the GSLB scheduling process of this application is as follows:
[0052] ①The Datacenter ADNS device receives the DNS request from LocalDNS.
[0053] ②The analysis module notifies the detection module to perform reverse detection.
[0054] In an optional embodiment of this step, the resolution module determines whether the DNS request is sent by LocalDNS for the first time. If so, it records the LocalDNS IP and domain name of this DNS request, sets a retention time, and then notifies the detection module to perform reverse detection. After the retention time expires, the resolution module will clear the LocalDNS ip and domain name information related to the DNS request. If the resolution module receives the same domain name from the same LocalDNS later, it will notify the detection module to perform reverse detection again.
[0055] ③The detection module initiates a ping-type reverse detection to LocalDNS, and at the same time notifies the detection modules of other data centers such as DatacenterB to perform reverse detection.
[0056] ④ The detection module receives the ping reply, calculates the current delay time rtt based on the request sending time and the reply receiving time, and uses the current rtt and the smoothing factor to calculate the new rtt time, such as new_rtt=3 / 4*rtt+1 / 4*old_rtt.
[0057] ⑤Notify the parsing module of new_rtt. Other data centers, such as DatacenterB, will execute the same calculation process and synchronize the calculation results to DatacenterA.
[0058] ⑥ After the parsing module receives new_rtt, if the proximity watermark function is enabled, it searches the proximity watermark interval set based on new_rtt to obtain the hit watermark interval. Based on this, we know which watermark space the service address in the data center DatacenterA hits. If new_rtt is 5ms, it hits proximity watermark interval 1. If the watermark interval of the service address changes this time, then the service address is added to the new watermark interval and the weight ratio structure of the weighted load balancer is adjusted. If the proximity watermark function is not enabled, nothing needs to be done. The logic of new_rtt received from other data centers is consistent.
[0059] ⑦ If the proximity watermark function is enabled, the weighted polling module executes the weighted load algorithm and selects the watermark interval according to the load ratio. If the watermark interval is associated with multiple data center service addresses, it will poll the addresses in the selected watermark interval again and reply to the DNS after obtaining the address. If the proximity watermark function is not enabled, the service address with the smallest delay will be selected.
[0060] In an embodiment of the present application, the resolution module is responsible for processing DNS requests from LocalDNS and starting the detection process based on these requests. When the detection module returns a new delay time (new_rtt), the resolution module will decide the next operation based on whether the proximity watermark function is enabled. If the proximity watermark function is enabled, the resolution module will search for a matching interval in the preset proximity watermark interval set, and adjust the weight ratio structure of the weighted load balancer accordingly. If the proximity watermark function is not enabled, the resolution module will directly select the service address with the smallest delay to respond. In addition, determine whether the detection has timed out. When the detection times out, set the new delay time to NA, where NA indicates infinite delay. When the detection has not timed out, make a wait for reply judgment, and calculate the delay time when a reply is received. Specifically, if Figure 2 The flow chart of the detection module is given; Figure 3 The flow chart of the parsing module is given.
[0061] The detection module is responsible for measuring the network delay between the data center and the user. After receiving the instruction from the resolution module, the detection module will initiate a ping-type reverse detection request to LocalDNS and wait for a reply to calculate the delay time (rtt). The detection module will also notify the detection modules of other data centers to perform the same detection to collect the delay data of all relevant data centers. After calculating the new delay time, the detection module will pass this information to the resolution module for subsequent decision-making.
[0062] The proximity watermark module allows users to set different watermark intervals and corresponding load ratios based on network delay time. This module works closely with the resolution module. When the resolution module receives a new delay time, the proximity watermark module determines the watermark interval to which the data center service address belongs based on these time values, and adjusts the weight ratio structure of the weighted load balancer accordingly. Among them, when the proximity watermark function is turned on, the matching interval is searched in the preset proximity watermark interval set, and the weight ratio structure of the weighted load balancer is adjusted accordingly; when the proximity watermark function is not turned on, the service address with the smallest delay will be directly selected for response.
[0063] The weighted round-robin module is responsible for executing the weighted load algorithm based on the set load ratio when the proximity watermark function is enabled. This module selects the most appropriate data center service address based on the watermark interval and load ratio determined by the proximity watermark module. If a watermark interval is associated with service addresses of multiple data centers, the weighted round-robin module polls among these addresses to select the address that is ultimately replied to the DNS.
[0064] The embodiment of the present application also provides a block diagram of a GSLB dynamic scheduling system based on a proximity waterline. The system may include:
[0065] The parsing module is used to obtain the DNS request from the receiving local DNS and start the detection process according to the DNS request;
[0066] The detection module is used to initiate a ping-type reverse detection request to the local DNS after receiving the instruction to start the detection process, and wait for a reply to calculate the delay time, and notify the detection modules of other data centers to perform the same detection to collect the delay data of all relevant data centers, calculate the new delay time and feed it back to the resolution module;
[0067] The proximity watermark module is used to determine the watermark interval to which the data center service address belongs according to the new delay time after the resolution module receives the new delay time, and adjust the weight ratio structure of the weighted load balancer accordingly;
[0068] The weighted polling module is used to select the data center service address with the smallest new delay time as the GSLB dynamic scheduling result based on the determined waterline interval and load ratio.
[0069] For the specific limitations of the GSLB dynamic scheduling system based on the proximity waterline, please refer to the limitations of the GSLB dynamic scheduling method based on the proximity waterline above, which will not be repeated here. Each module in the above-mentioned GSLB dynamic scheduling system based on the proximity waterline can be implemented in whole or in part through software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0070] In one embodiment, an electronic device is provided, which may be a computer. The electronic device includes a processor, a memory, and a network interface connected via a system bus. The processor of the device is used to provide computing and control capabilities. The memory of the device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used for GSLB dynamic scheduling data based on the proximity waterline. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a GSLB dynamic scheduling method based on the proximity waterline is implemented.
[0071] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which involves all or part of the processes in the above-mentioned embodiment method.
[0072] In one embodiment, a computer program product is also provided, including a computer program / instruction, which involves all or part of the process in the above embodiment method.
[0073] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing related hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in M forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (SyMchliMk) DRAM (SLDRAM), memory bus (RaMbus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0074] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0075] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the patent application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent application shall be subject to the attached claims.
Claims
1. A GSLB dynamic scheduling method based on proximity waterline, characterized in that: The method comprises: The resolution module obtains the DNS request from the receiving local DNS and starts the detection process according to the DNS request; When the detection module receives the instruction to start the detection process, it initiates a ping-type reverse detection request to the local DNS, waits for a reply to calculate the delay time, and notifies the detection modules of other data centers to perform the same detection to collect the delay data of all relevant data centers, calculate the new delay time and feed it back to the resolution module; When the parsing module receives the new delay time, the proximity watermark module determines the watermark interval to which the data center service address belongs based on the new delay time, and adjusts the weight ratio structure of the weighted load balancer accordingly; The weighted polling module selects the data center service address with the smallest new delay time as the GSLB dynamic scheduling result based on the determined watermark interval and load ratio.
2. The GSLB dynamic scheduling method according to claim 1, characterized in that: After receiving the start detection process instruction, a ping type reverse detection request is sent to the local DNS and a reply is waited for to calculate the delay time, including: The current delay time rtt is calculated based on the request sending time and the reply receiving time, and the new delay time new_rtt is calculated using the current rtt and the smoothing factor; where new_rtt = 3 / 4*rtt + 1 / 4*old_rtt.
3. The GSLB dynamic scheduling method according to claim 1, characterized in that: When the parsing module receives the new delay time, the proximity watermark module determines the watermark interval to which the data center service address belongs based on the new delay time, and adjusts the weight ratio structure of the weighted load balancer accordingly, including: When the proximity watermark function is enabled, a matching interval is searched in the preset proximity watermark interval set, and the weight ratio structure of the weighted load balancer is adjusted accordingly; When the proximity watermark function is not enabled, the service address with the smallest delay will be directly selected for response.
4. The GSLB dynamic scheduling method according to claim 1, characterized in that: The weighted polling module selects the most appropriate data center service address based on the determined waterline interval and load ratio, including: When a watermark interval is associated with service addresses of multiple data centers, polling is performed among the service addresses of multiple data centers to select the address that is ultimately replied to the DNS.
5. The GSLB dynamic scheduling method according to claim 1, characterized in that: When the detection module receives the instruction to start the detection process, it initiates a reverse detection request of the ping type to the local DNS and waits for a reply to calculate the delay time, which also includes: Determine whether the detection has timed out. If the detection has timed out, set the new delay time to NA, which means infinite delay. When the detection has not timed out, wait for the reply to be made, and when the reply is received, calculate the delay time; And determine whether the new delay time hits the range. If it does not hit, add the service address in the data center to the dead letter watermark interval.
6. The GSLB dynamic scheduling method according to claim 1, characterized in that: When the detection module receives the instruction to start the detection process, it initiates a reverse detection request of the ping type to the local DNS, which also includes: Determine whether the request is sent by the local DNS for the first time. If so, record the local DNS DNS IP and domain name of this DNS request, set the retention time, and then notify the detection module to perform reverse detection; After the retention time expires, the local DNSip and domain name information related to the DNS request will be cleared. If the same domain name is received from the same local DNS later, the detection module will be notified again to perform reverse detection.
7. A GSLB dynamic scheduling system based on proximity waterline, characterized in that: The system comprises: The parsing module is used to obtain the DNS request from the receiving local DNS and start the detection process according to the DNS request; The detection module is used to initiate a ping-type reverse detection request to the local DNS after receiving the instruction to start the detection process, and wait for a reply to calculate the delay time, and notify the detection modules of other data centers to perform the same detection to collect the delay data of all relevant data centers, calculate the new delay time and feed it back to the resolution module; The proximity watermark module is used to determine the watermark interval to which the data center service address belongs according to the new delay time after the resolution module receives the new delay time, and adjust the weight ratio structure of the weighted load balancer accordingly; The weighted polling module is used to select the data center service address with the smallest new delay time as the GSLB dynamic scheduling result based on the determined waterline interval and load ratio.
8. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and when the computer program is executed by the processor, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium, characterized in that: A computer program is stored thereon, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program / instructions, characterized in that When the computer program / instructions are executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Cited By
Flow scheduling method and device based on machine room multi-index real-time prediction
CN121098800A