Global traffic scheduling method, device and equipment based on DNS (Domain Name Server) and medium
By regularly obtaining and scoring the service quality data of the backend service nodes and making decisions in combination with the target scheduling strategy, the problem of the existing system lacking real-time perception and comprehensive evaluation in global traffic scheduling is solved, and intelligent traffic scheduling and better service quality are achieved.
Patent Information
- Application Number
- CN202411891483.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-20
- Publication Date
- 2025-03-28
AI Technical Summary
The existing DNS-based global load balancing system lacks real-time perception and comprehensive evaluation capabilities in global traffic scheduling, which leads to the inability to achieve optimal traffic scheduling in complex network environments, affecting the user's access experience.
By regularly obtaining the service quality data of the back-end service nodes, quantitatively scoring according to the preset scoring rules, and making decisions based on the target scheduling strategy and service quality scores, we can achieve intelligent traffic scheduling.
It overcomes the problem that traditional systems lack real-time perception and comprehensive evaluation capabilities, realizes intelligent traffic scheduling based on real-time state, improves the effect and service quality of global load balancing, and ensures that user requests are forwarded to the best service nodes.
Smart Images

Figure CN119728569A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer network technology, and in particular to a global traffic scheduling method, device, equipment and medium based on DNS. Background Art
[0002] As an Internet infrastructure, the core function of the Domain Name System (DNS) is to convert domain names into IP addresses. With the development of Internet services, the traditional DNS system can no longer meet the needs of large-scale distributed services. Although a global server load balancing system (GSLB) based on DNS has been developed, it still has obvious shortcomings in global traffic scheduling.
[0003] Although the existing GSLB system has introduced some intelligent analysis functions, which can return analysis results based on factors such as user geographic location and network conditions, its scheduling decisions are often based on static configuration or simple load balancing algorithms, lacking the ability to perceive and comprehensively evaluate the overall network conditions in real time. This results in the inability to achieve optimal traffic scheduling in a complex network environment, affecting the user access experience. Summary of the invention
[0004] The main purpose of the present invention is to provide a global traffic scheduling method, device, equipment and medium based on DNS to solve the above technical problems.
[0005] In a first aspect, the present invention provides a global traffic scheduling method based on DNS, the global traffic scheduling method is applied to a global traffic scheduling system, and the method includes:
[0006] Obtaining service quality data of multiple backend service nodes according to a preset detection period;
[0007] For each backend service node, determine the service quality score of the backend service node according to the corresponding service quality data and a preset scoring rule;
[0008] When receiving a domain name resolution request sent by a target terminal, determining a target service node from a plurality of the backend service nodes according to a preset target scheduling strategy and a service quality score of each of the backend service nodes;
[0009] Generate a resolution result corresponding to the domain name resolution request according to the IP address corresponding to the target service node;
[0010] The parsing result is returned to the target terminal.
[0011] The global traffic scheduling system includes a link quality detection subsystem, and the link quality detection subsystem includes a plurality of detection points respectively deployed in each of the backend service nodes; the acquisition of service quality data of the plurality of backend service nodes according to a preset detection period includes:
[0012] According to the detection period, the service quality data of each backend service node is respectively obtained through the detection points in each backend service node.
[0013] The service quality data includes network performance indicator data and load status indicator data, and the scoring rule includes a first scoring rule and a second scoring rule; and determining the service quality score of the backend service node according to the corresponding service quality data and the preset scoring rule includes:
[0014] Determine a first score corresponding to the network performance indicator data according to the first scoring rule;
[0015] Determine a second score corresponding to the load status indicator data according to the second scoring rule;
[0016] The service quality score is determined according to the first score, a first weight corresponding to the first score, the second score, and a second weight corresponding to the second score.
[0017] The step of determining a target service node from a plurality of the backend service nodes according to a preset target scheduling strategy and a service quality score of each of the backend service nodes includes:
[0018] Acquire the target location information corresponding to the target terminal according to the source IP address in the domain name resolution request;
[0019] Determine the location score corresponding to each backend service node according to the target location information and the location attribute information of each backend service node;
[0020] Determine a target score for each of the backend service nodes according to the corresponding service quality score and the corresponding location score;
[0021] The target service node is determined from the plurality of backend service nodes according to the target scheduling strategy and the target score of each backend service node.
[0022] The global traffic scheduling system is preset with a plurality of scheduling strategies corresponding to different user type identifiers; before determining the target service node from the plurality of backend service nodes according to the preset target scheduling strategy and the service quality scores of each backend service node, the method further includes:
[0023] Acquire a user identifier corresponding to the target terminal according to the source IP address in the domain name resolution request;
[0024] A corresponding user type identifier is determined according to the user identifier, and a scheduling policy corresponding to the user type identifier is determined as the target scheduling policy from a plurality of preset scheduling policies.
[0025] Among them, the service quality data includes network performance indicator data and load status indicator data; the network performance indicator data includes at least one of network delay, packet loss rate and network jitter; the load status indicator data includes at least one of node bandwidth utilization, service capacity value and service availability.
[0026] After obtaining the service quality data of multiple backend service nodes according to the preset detection period, the method further includes:
[0027] Detecting whether there is an abnormal service node among the plurality of backend service nodes according to the service quality data of each backend service node and a preset abnormality detection rule;
[0028] If the abnormal service node is detected, the IP pool corresponding to the abnormal service node is replaced with the IP pool of the target backup service node in the IP pool maintained by the global traffic scheduling system, and the target backup service node is the backup node corresponding to the abnormal service node.
[0029] In a second aspect, the present invention further provides a global traffic scheduling device based on DNS, comprising:
[0030] A service quality data acquisition module is used to acquire service quality data of multiple backend service nodes according to a preset detection period;
[0031] A service quality score determination module, used to determine the service quality score of each backend service node according to the corresponding service quality data and a preset scoring rule;
[0032] A target service node determination module, configured to determine a target service node from a plurality of backend service nodes according to a preset target scheduling strategy and a service quality score of each backend service node when receiving a domain name resolution request sent by a target terminal;
[0033] A resolution result generating module, used to generate a resolution result corresponding to the domain name resolution request according to the IP address corresponding to the target service node;
[0034] The result returning module is used to return the parsing result to the target terminal.
[0035] In a third aspect, the present invention further provides a computer device, comprising: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the DNS-based global traffic scheduling method as described in the first aspect is implemented.
[0036] In a fourth aspect, the present invention further provides a storage medium, which includes a stored computer program, and when the computer program is running, controls the device where the storage medium is located to execute the DNS-based global traffic scheduling method as described in the first aspect.
[0037] Beneficial technical effects of the present invention: The present invention converts static configuration into dynamic perception by regularly acquiring service quality data and performing quantitative scoring, and makes decisions based on target scheduling strategies and service quality scores during DNS resolution, thereby overcoming the problem that traditional systems lack real-time perception and comprehensive evaluation capabilities, and realizing intelligent traffic scheduling based on real-time status. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying any creative work.
[0039] Figure 1 A schematic diagram of a global traffic scheduling method based on DNS provided in an embodiment of the present invention;
[0040] Figure 2 A schematic diagram of the steps for determining a quality of service score of a global traffic scheduling method based on DNS provided in an embodiment of the present invention;
[0041] Figure 3 A schematic diagram of the steps of determining a target service node in a global traffic scheduling method based on DNS provided in an embodiment of the present invention;
[0042] Figure 4 A schematic diagram of the steps of determining target scheduling strategies for different users in a global traffic scheduling method based on DNS provided in an embodiment of the present invention;
[0043] Figure 5 A schematic diagram of the steps of replacing a standby service node in a global traffic scheduling method based on DNS provided in an embodiment of the present invention;
[0044] Figure 6 A schematic diagram of a global traffic scheduling device based on DNS provided in an embodiment of the present invention;
[0045] Figure 7 A schematic diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0046] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0047] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.
[0048] It should also be understood that the terms used in this specification of the present invention are only for the purpose of describing specific embodiments and are not intended to limit the present invention. As used in the specification of the present invention and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0049] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
[0050] Please also refer to Figure 1-Figure 5 ,in Figure 1 A schematic diagram of a global traffic scheduling method based on DNS provided in an embodiment of the present invention; Figure 2 A schematic diagram of the steps for determining a quality of service score of a global traffic scheduling method based on DNS provided in an embodiment of the present invention; Figure 3 A schematic diagram of the steps of determining a target service node in a global traffic scheduling method based on DNS provided in an embodiment of the present invention; Figure 4 A schematic diagram of the steps of determining target scheduling strategies for different users in a global traffic scheduling method based on DNS provided in an embodiment of the present invention; Figure 5 A schematic diagram of the steps of replacing a standby service node in a global traffic scheduling method based on DNS provided in an embodiment of the present invention. An embodiment of the present invention provides a global traffic scheduling method based on DNS, which is applied to a global traffic scheduling system, and realizes intelligent traffic scheduling by comprehensively monitoring and evaluating the service quality of backend service nodes.
[0051] like Figure 1As shown, the method includes the following steps S100-S500:
[0052] S100: Acquire service quality data of multiple backend service nodes according to a preset detection period.
[0053] In this embodiment, in order to grasp the service status of each backend service node in real time, the service quality data of each backend service node is automatically obtained according to a preset detection period (for example, every 30 seconds). The service quality data includes network performance index data and load status index data. Among them: the network performance index data includes indicators such as network delay, packet loss rate and network jitter; the load status index data includes indicators such as node bandwidth utilization, service capacity value and service availability.
[0054] S200: For each backend service node, determine a service quality score of the backend service node according to corresponding service quality data and a preset scoring rule.
[0055] In this embodiment, a unified scoring rule is used to score each backend service node. Taking network delay as an example, the preset scoring rule is: delay <50ms: 10 points, indicating excellent network transmission quality; 50ms≤delay<100ms: 8 points, indicating good network performance; 100ms≤delay<200ms: 6 points, indicating average network performance; delay≥200ms: 4 points, indicating poor network performance. A similar scoring mechanism is also used for other indicators such as node bandwidth utilization. Finally, the service quality score of each backend service node is calculated based on the scores of each indicator and its weight.
[0056] S300: When a domain name resolution request sent by a target terminal is received, a target service node is determined from multiple backend service nodes according to a preset target scheduling strategy and the service quality scores of each backend service node.
[0057] In this embodiment, a comprehensive decision is made based on multiple preset scheduling strategies and the service quality scores of the service nodes. The preset target scheduling strategies include: scheduling based on preset priorities; scheduling based on preset weights; scheduling based on geographic location; scheduling based on real-time server load. In actual applications, the global traffic scheduling system selects the appropriate scheduling strategy according to the actual scenario requirements to determine the optimal target service node.
[0058] S400: Generate a resolution result corresponding to the domain name resolution request according to the IP address corresponding to the target service node.
[0059] In this embodiment, the IP address of the selected target service node is used as the DNS resolution result.
[0060] S500: Return the parsing result to the target terminal.
[0061] In this embodiment, the generated resolution result is returned to the target terminal that initiated the DNS request, completing a complete scheduling process. This solution can accurately perceive the status of the service node and make timely scheduling responses, effectively improving the effect of global load balancing and service quality, ensuring that user requests are forwarded to the best service node, thereby providing a better service experience.
[0062] In one embodiment, the global traffic scheduling system includes a link quality detection subsystem, which includes multiple detection points respectively deployed in each back-end service node; the service quality data of multiple back-end service nodes are obtained according to a preset detection period, including: according to the detection period, the service quality data of each back-end service node is respectively obtained through the detection points in each back-end service node.
[0063] In this embodiment, the link quality detection subsystem adopts a distributed deployment architecture, including multiple detection points, which are respectively deployed in different back-end service nodes for collecting service quality data nearby. The design of this distributed deployment solution follows the principle of nearby detection, that is, each detection point is responsible for collecting service quality data of the node and surrounding nodes, thereby ensuring the accuracy and timeliness of the data.
[0064] In the specific implementation, the deployment of detection points needs to consider the business scale and geographical distribution. Deploy a sufficient number of detection points in different backend service nodes to form a complete detection network. Each detection point is configured with a complete detection task, including three main aspects: local resource monitoring, network quality monitoring, and service status monitoring. Among them, local resource monitoring mainly detects system indicators such as CPU utilization, memory utilization, and disk I / O of this node; network quality monitoring is responsible for testing network indicators such as network delay, packet loss rate, and bandwidth utilization of this node; service status monitoring mainly checks the availability and response time of various services provided by this node.
[0065] For data collection, the detection point mainly obtains data through three ways: first, directly reading the performance indicators of the node through the system interface, second, obtaining network performance data by sending detection messages, and third, testing service availability and responsiveness by simulating service requests. The detection point will collect this data regularly according to the preset detection cycle (for example, every 30 seconds).
[0066] This distributed detection solution based on the link quality detection subsystem has significant advantages: first, since the detection point conducts local detection, it can accurately reflect the actual service status of the node, ensuring the accuracy of the data; then, the detection point and the detected node are located in the same network environment, and performance fluctuations can be discovered and reported in a timely manner, ensuring the real-time nature of the data; finally, due to the use of a distributed architecture, the failure of a single detection point will not affect the operation of the entire detection network, and it has good fault tolerance.
[0067] Through this detection scheme, the link quality detection subsystem can obtain the service quality data of each backend service node comprehensively, accurately and in real time. These data cover multiple dimensions such as node performance, network status and service availability, providing reliable data support for subsequent service quality scoring and scheduling decisions, thereby better realizing the intelligent scheduling of global traffic.
[0068] In one embodiment, the service quality data includes network performance index data and load status index data, and the scoring rules include a first scoring rule and a second scoring rule; Figure 2 As shown, in step S200, the service quality score of the back-end service node is determined according to the corresponding service quality data and a preset scoring rule, including: S201, determining a first score corresponding to the network performance indicator data according to a first scoring rule; S202, determining a second score corresponding to the load status indicator data according to a second scoring rule; S203, determining the service quality score according to the first score, a first weight corresponding to the first score, the second score, and a second weight corresponding to the second score.
[0069] In this embodiment, in terms of network performance indicator data, the main focus is on key indicators such as network delay, packet loss rate and network jitter. For these indicators, the first scoring rule stipulates detailed scoring criteria. Taking network delay as an example, the scoring criteria are: 10 points when the delay is less than 50ms, indicating that the network transmission quality is excellent; 8 points when the delay is between 50ms and 100ms, indicating that the network performance is good; 6 points when the delay is between 100ms and 200ms, indicating that the network performance is average; 4 points when the delay exceeds 200ms, indicating that the network performance is poor. For the packet loss rate, the scoring criteria are: 10 points when the packet loss rate is less than 0.1%, 8 points between 0.1% and 0.5%, 6 points between 0.5% and 1%, and 4 points when it exceeds 1%. The scoring of network jitter adopts a similar grading method.
[0070] In terms of load status indicator data, the focus is on indicators such as node bandwidth utilization, service capacity value and service availability. The second scoring rule has formulated corresponding scoring standards for these indicators. Taking node bandwidth utilization as an example, the scoring standard is: 10 points when the utilization is less than 30%, indicating that the resources are sufficient; 8 points when the utilization is between 30% and 60%, indicating that the resource status is good; 6 points when the utilization is between 60% and 80%, indicating that the resource usage is relatively tight; 4 points when the utilization exceeds 80%, indicating that the resources are close to saturation. The scoring standard for service availability is: 10 points when the availability reaches more than 99.99%, 8 points between 99.9% and 99.99%, 6 points between 99% and 99.9%, and 4 points below 99%.
[0071] When determining the service quality score, the first score of the network performance indicator data is first calculated according to the first scoring rule. In this process, the scores of various indicators such as network delay, packet loss rate and network jitter are comprehensively considered, and weighted calculations are performed according to the preset sub-weights to obtain the final first score. At the same time, the second score of the load status indicator is calculated according to the second scoring rule, and the scores of indicators such as node bandwidth utilization, service capacity value and service availability are weighted according to the corresponding sub-weights to obtain the final second score.
[0072] Finally, the first weight and the second weight are set according to the characteristics of the service to balance the importance of network performance and load status in the final score. For example, for a live video service with high real-time requirements, a higher first weight (such as 0.6) may be set to emphasize the importance of network performance; while for a compute-intensive service, a higher second weight (such as 0.7) may be set to highlight the impact of the load status. Multiply the first score by the first weight, the second score by the second weight, and then add the two together to get the final service quality score. The first weight and the second weight here range from 0 to 1, respectively.
[0073] This multi-dimensional scoring mechanism is highly flexible and adaptable. By adjusting the scoring rules and weight ratios of different indicators, the global traffic scheduling system can accurately evaluate the comprehensive service capabilities of backend service nodes according to the needs of different business scenarios. At the same time, this scoring method is also easy to adjust dynamically, and the scoring rules and weight settings can be continuously optimized based on operational experience, thereby better supporting global traffic scheduling decisions.
[0074] In one embodiment, if Figure 3As shown, in step S300, a target service node is determined from multiple backend service nodes according to a preset target scheduling strategy and a service quality score of each backend service node, including: S301, obtaining target location information corresponding to the target terminal according to the source IP address in the domain name resolution request; S302, determining the location score corresponding to each backend service node according to the target location information and the location attribute information of each backend service node; S303, determining the target score of each backend service node according to the corresponding service quality score and the corresponding location score; S304, determining the target service node from multiple backend service nodes according to the target scheduling strategy and the target score of each backend service node.
[0075] In this embodiment, in order to achieve more accurate traffic scheduling, when selecting service nodes, not only the service quality factor is considered, but also the geographical location factor is fully considered. Specifically, the global traffic scheduling system (hereinafter referred to as the system) first extracts the source IP address from the domain name resolution request, and converts it into the geographical location information of the target terminal through the IP address library, including multi-level positioning information such as country, region, and city. This location resolution solution based on the source IP can accurately identify the geographical source of the user request, providing a basis for the subsequent proximity evaluation.
[0076] The system maintains detailed location attribute information for each backend service node, including physical location coordinates, region, network coverage, etc. When calculating the location score, the following dimensions are mainly considered: first, geographical distance, by calculating the physical distance between the target terminal and the service node; second, network distance, considering network hops and transmission delays; finally, the matching degree between the operator network where the node is located and the user network must be considered. The system calculates these factors based on the preset location scoring rules to derive the location score of each backend service node. For example, 10 points are given to nodes with a physical distance of less than 100 kilometers, 8 points for 100-300 kilometers, 6 points for 300-800 kilometers, and 4 points for more than 800 kilometers; at the same time, if the node is in the same operator network as the user, an additional 2 points are added.
[0077] When determining the target score, the system uses a weighted calculation method to reasonably combine the service quality score and the location score. Specifically, assuming that the service quality weight is set to 0.6 and the location score weight is set to 0.4, the target score calculation formula is: target score = 0.6 × service quality score + 0.4 × location score. This weight configuration can be adjusted according to business needs. For example, for delay-sensitive businesses, the weight of the location score can be appropriately increased; for compute-intensive businesses, the weight of the service quality score can be increased.
[0078] Finally, the system will make the final scheduling decision based on the preset target scheduling strategy and the target score of each node. The target scheduling strategy here can be diverse. For example, you can simply select the node with the highest target score; you can also select the top N nodes with the target score for load balancing; you can also set a threshold and only select nodes with a target score of a certain level. In actual deployment, these strategies can be flexibly configured according to specific scenarios. For example, in the live video broadcast scenario, the system will give priority to nodes with higher target scores and lower network latency; in the large file download scenario, it will consider the node's bandwidth capacity and continuous service capabilities more.
[0079] Through this multi-dimensional scoring mechanism and flexible scheduling strategy, the system can select the best service node for each user request based on comprehensive consideration of service quality and geographical location. This not only improves service response speed, but also improves the user's access experience. At the same time, because the scheduling decision fully considers multiple influencing factors, the system also has better fault tolerance and load balancing effect.
[0080] In one embodiment, the global traffic scheduling system is preset with multiple scheduling strategies corresponding to different user type identifiers; Figure 4 As shown, in step S300, before determining the target service node from multiple back-end service nodes according to the preset target scheduling strategy and the service quality scores of each back-end service node, the method also includes: S310, obtaining the user identifier corresponding to the target terminal according to the source IP address in the domain name resolution request; S320, determining the corresponding user type identifier according to the user identifier, and determining the scheduling policy corresponding to the user type identifier as the target scheduling policy from the preset multiple scheduling strategies.
[0081] In this embodiment, in order to achieve differentiated traffic scheduling services, the global traffic scheduling system will maintain corresponding scheduling strategies for different types of users (such as live broadcast websites, shopping websites, news websites, etc.) in advance. This differentiated scheduling solution based on user type can better meet the service needs of different types of websites and provide more accurate traffic scheduling services.
[0082] In the global traffic scheduling system, the mapping relationship between user type identification and scheduling strategy is first established. For example, the system can classify users into different types such as live broadcast websites, e-commerce websites, news and information websites, and each user type has its own specific identification. Correspondingly, the system will preset a special scheduling strategy for each user type. For example, for live broadcast websites, a scheduling strategy that prioritizes low latency may be adopted; for e-commerce websites, a scheduling strategy that prioritizes high availability may be adopted; and for news and information websites, a scheduling strategy that prioritizes nearby access may be adopted.
[0083] In the specific execution process, when the system receives a domain name resolution request, it first needs to identify the type of website from which the request comes. The system extracts the source IP address from the domain name resolution request and obtains the user ID associated with the IP address by querying the mapping database maintained by the system. This user ID can directly reflect the type attribute of the website.
[0084] After obtaining the user ID, the system will further query the type mapping table to determine the user type ID corresponding to the user ID. For example, the system maintains a mapping relationship table that records the correspondence between different website domain names and their business types. Through this mapping table, the system can quickly determine which business type a website belongs to. After determining the user type ID, the system will select the scheduling policy corresponding to the user type ID from the pre-configured multiple scheduling policies as the target scheduling policy for this request.
[0085] Taking several typical website types as examples, the system's differentiated scheduling strategies are as follows:
[0086] For live streaming websites, the scheduling strategy adopted by the system will pay special attention to network stability and low latency. The characteristics of this type of website are that they have extremely high real-time requirements, and any delay and jitter will affect the personal user experience. Therefore, the scheduling strategy will give priority to nodes with the best network quality, monitor the network status in real time, and switch in time once performance degradation is found. The system will reserve sufficient bandwidth resources for such websites and set a lower switching threshold to ensure the stable transmission of live streaming. The scheduling strategy here sets a higher network performance weight, such as setting the weight of indicators such as network delay and jitter to 70%.
[0087] For e-commerce websites, the system will adopt a scheduling strategy that prioritizes high availability. The characteristic of this type of website is that it needs to ensure the continuous availability of services, especially during promotional activities. The scheduling strategy will comprehensively consider factors such as the load status and historical availability of the node to select the most reliable service node. At the same time, the system will prepare multiple backup nodes for e-commerce websites, which can be quickly switched when the main node is abnormal to avoid business interruption. The scheduling strategy here gives priority to ensuring service availability, such as setting the weight of the service availability indicator to 60%, and automatically adjusting traffic distribution according to the real-time load status, while selecting closer nodes on the premise of ensuring availability.
[0088] For news and information websites, the system adopts a scheduling strategy that focuses on nearby access. The characteristics of this type of website are that the traffic is large but the real-time requirements are relatively low, so they pay more attention to improving access speed and saving bandwidth costs. The scheduling strategy will give priority to the node closest to the user's geographical location, and schedule it based on the node's load, to achieve access acceleration while ensuring good service quality. The scheduling strategy here gives priority to the node closest to the user's geographical location and ensures that the node load is basically balanced.
[0089] Through this differentiated scheduling mechanism based on website type, the system can better meet the specific needs of different types of websites, ensuring service quality and optimizing resource utilization. At the same time, another important feature of this scheduling mechanism is its dynamic adaptability. The system not only supports static policy configuration, but also can dynamically adjust the mapping rules and scheduling strategies of user types according to operational needs, so as to quickly respond to business changes.
[0090] In one embodiment, the quality of service data includes network performance indicator data and load status indicator data; the network performance indicator data includes at least one of network delay, packet loss rate and network jitter; the load status indicator includes at least one of node bandwidth utilization, service capacity value and service availability.
[0091] In this embodiment, in order to comprehensively evaluate the service quality of the backend service node, the system will collect and analyze performance indicators of multiple dimensions. These indicators are mainly divided into two categories: network performance indicator data and load status indicators, each of which contains multiple specific evaluation parameters.
[0092] In terms of network performance indicator data, the system focuses on three core indicators: network delay, packet loss rate and network jitter. Network delay reflects the time required for a data packet to be transmitted in the network. It is usually calculated by measuring the round-trip time (RTT) from the request being sent to the response being received. For example, the ideal network delay set by the system should be less than 50ms. The packet loss rate indicates the proportion of data packets lost during network transmission. The system obtains it by continuously sending multiple detection packets and counting the reception status. Generally, the packet loss rate is required to be controlled below 1%. Network jitter is used to measure the fluctuation of network delay. It reflects the stability of the network. It is measured by calculating the standard deviation of the network delay obtained by multiple detections. Larger network jitter values may lead to a significant decline in service quality.
[0093] In terms of load status indicators, the system focuses on monitoring three key indicators: node bandwidth utilization, service capacity value, and service availability. Node bandwidth utilization reflects the current usage of the node's network resources. It is calculated by real-time monitoring of the node's inbound and outbound traffic. The system usually uses 80% as the warning line for bandwidth utilization. Exceeding this threshold may affect the quality of service. The service capacity value is a quantitative representation of the node's overall processing power. It takes into account multiple system-level indicators such as CPU utilization, memory usage, disk I / O, and obtains a comprehensive score of 0-100 through weighted calculation. Service availability reflects the node's ability to provide stable services. It is measured by regularly sending service detection requests and counting the success rate. Usually, service availability is required to reach more than 99.9%.
[0094] The collection of these indicators follows specific calculation methods and evaluation standards. Taking network latency as an example, the system will continuously send multiple ICMP probe packets in each detection cycle, and obtain more accurate latency data by calculating the average round-trip time of these probe packets. For service availability, the system will simulate real user requests, continuously send HTTP or HTTPS requests at preset time intervals, and evaluate the service availability based on the server's response.
[0095] In order to adapt to the needs of different business scenarios, the system supports flexible configuration of specific indicator combinations that need to be monitored. In some business scenarios with high real-time requirements, more attention may be paid to network delay and network jitter indicators; while in large-scale data processing scenarios, more attention is paid to node bandwidth utilization and service capacity value. Through this flexible indicator configuration mechanism, the monitoring needs of different business scenarios can be better met.
[0096] During actual operation, the system will collect and update these indicator data in real time and use them as an important basis for evaluating the service quality of the node. When an indicator is abnormal, such as a sudden increase in network delay or a decrease in service availability, the system will promptly adjust the service quality score of the node, thereby affecting subsequent traffic scheduling decisions. This dynamic evaluation mechanism based on multi-dimensional indicators can help the system perceive the node status more accurately and make more reasonable scheduling decisions.
[0097] By comprehensively analyzing these indicator data, the system can comprehensively and accurately evaluate the service capabilities and network status of each backend service node, providing a reliable decision-making basis for achieving accurate global traffic scheduling.
[0098] In one embodiment, if Figure 5 As shown, in step S100, after obtaining the service quality data of multiple back-end service nodes according to a preset detection period, the method also includes: S110, detecting whether there are abnormal service nodes among the multiple back-end service nodes according to the service quality data of each back-end service node and a preset anomaly detection rule; S120, if an abnormal service node is detected, then in the IP pool maintained by the global traffic scheduling system, the IP pool corresponding to the abnormal service node is replaced with the IP pool of the target backup service node, and the target backup service node is the backup node corresponding to the abnormal service node.
[0099] In this embodiment, in order to ensure the stability and availability of system services, after obtaining the service quality data of the backend service nodes, it is necessary to perform anomaly detection analysis on these data. The system sets up a complete set of anomaly detection mechanisms, which uses preset anomaly detection rules to identify service nodes that may have problems and handle them in a timely manner.
[0100] Specifically, the system sets multi-dimensional anomaly detection rules for the service quality data of each backend service node. These rules mainly include the following aspects: first, the performance indicator anomaly rule. For example, when the CPU usage of the node exceeds 90%, the memory usage exceeds 85%, or the disk usage exceeds 95%, it is judged as a resource performance anomaly; second, the network indicator anomaly rule. If the node's network delay exceeds 200ms, the packet loss rate exceeds 1%, or the bandwidth utilization exceeds 80%, it is considered that there is a network anomaly; third, the service status anomaly rule. When the service availability of the node is less than 99.9%, or three consecutive health checks fail, it is judged as a service anomaly.
[0101] When performing anomaly detection, the system adopts a multi-level threshold judgment mechanism. Taking network delay as an example, the system sets two levels: warning threshold (150ms) and critical threshold (200ms). When it is detected that the network delay of a node exceeds the warning threshold, the system will issue an early warning message; if it exceeds the critical threshold, it will be directly judged as an abnormal node. At the same time, the system will also analyze it in combination with the time dimension. For example, the node replacement process will be triggered only when the duration of an abnormal state exceeds the preset time (such as 5 minutes).
[0102] Once an abnormal service node is detected, the system will immediately start the node replacement process. The system maintains a dynamic IP pool that contains all available service node IP addresses and classifies and manages them according to functions, geographic locations, network regions, and other dimensions. Each serving node is configured with a corresponding standby node, which is normally on standby and ready to take over business traffic at any time.
[0103] The node replacement process adopts a smooth switching strategy, which mainly includes the following steps: First, the system will reduce the scheduling weight of the abnormal node to zero and stop scheduling new requests to the node; then, it will select a most suitable backup node from the backup node pool. The selection process will consider factors such as geographical proximity and network environment similarity; then, the system will preheat the backup node to ensure that its service status is normal; finally, the backup node is added to the active IP pool to complete the node replacement.
[0104] This method can effectively ensure service continuity and availability by timely discovering and isolating abnormal nodes, combined with intelligent backup node switching strategies.
[0105] In one embodiment, after determining the service quality score of the backend service node according to the corresponding service quality data and a preset scoring rule, the method further includes: storing the service quality score in a database in time sequence.
[0106] In this embodiment, in order to facilitate subsequent scheduling decisions and historical data analysis, the service quality score determined according to the first score, the first weight corresponding to the first score, the second score, and the second weight corresponding to the second score will be stored in the database in chronological order. Before the data is stored, the system first standardizes the scoring data. Each scoring record contains complete scoring components, including: node identification (in the format of "region_dc_nodeip", such as "cn-east-1_dc01_10.0.0.1"), scoring timestamp (accurate to milliseconds), first score (network performance score), first weight value, second score (load status score), second weight value, and the final service quality score.
[0107] Reference Figure 6 , Figure 6 A schematic diagram of a global traffic scheduling device based on DNS provided in an embodiment of the present invention. Corresponding to the above global traffic scheduling method based on DNS, an embodiment of the present invention also provides a global traffic scheduling device based on DNS. The device includes: a service quality data acquisition module 10, which is used to acquire the service quality data of multiple back-end service nodes according to a preset detection period; a service quality score determination module 20, which is used to determine the service quality score of the back-end service node according to the corresponding service quality data and the preset scoring rules for each back-end service node; a target service node determination module 30, which is used to determine the target service node from multiple back-end service nodes according to the preset target scheduling strategy and the service quality scores of each back-end service node when receiving a domain name resolution request sent by a target terminal; a resolution result generation module 40, which is used to generate a resolution result corresponding to the domain name resolution request according to the IP address corresponding to the target service node; a result return module 50, which is used to return the resolution result to the target terminal.
[0108] In this embodiment, the service quality data acquisition module 10 is responsible for acquiring the service quality data of multiple back-end service nodes according to a preset detection cycle. The module automatically collects the performance indicators of each back-end service node at a pre-configured time interval (for example, every 30 seconds) through a timing trigger mechanism. The collected data mainly includes two categories: one is network performance indicator data, covering parameters such as network delay, packet loss rate, and network jitter; the other is load status indicator data, including node bandwidth utilization, service capacity value, service availability and other information. These data fully reflect the operating status of each back-end service node.
[0109] The service quality score determination module 20 receives the original data collected by the service quality data acquisition module 10, and scores each backend service node according to the preset scoring rules. This module maintains a complete set of scoring criteria and adopts different scoring strategies for different types of indicators. For example, for the network delay indicator, the following scoring rules may be adopted: 10 points for a delay below 50ms, 8 points for 50-100ms, 6 points for 100-200ms, and 4 points for more than 200ms. The module will quantitatively evaluate all indicators and obtain the final service quality score of each node through weighted calculation.
[0110] The target service node determination module 30 plays a core decision-making role when receiving a domain name resolution request. This module comprehensively considers two key factors: one is the preset target scheduling strategy, and the other is the service quality score of each backend service node. The preset scheduling strategy may include priority-based scheduling, weight-based scheduling, geographic location-based proximity scheduling, or real-time load-based scheduling. The module will select a suitable strategy combination according to the actual scenario requirements, combined with the service quality score, and finally determine the target service node that is most suitable for processing the current request.
[0111] The resolution result generation module 40 is responsible for constructing the DNS resolution response. This module receives the decision result of the target service node determination module 30, obtains the IP address information corresponding to the target node, and formats it into a standard DNS resolution result format. If the target node has multiple IP addresses, this module also needs to select a suitable address or determine the order of returning addresses according to the configuration policy.
[0112] The result return module 50 is the last processing link of the device, which is mainly responsible for sending the resolution result back to the requested target terminal. This module ensures that the resolution result is correctly encapsulated and transmitted according to the DNS protocol specification, and performs corresponding log records when necessary for subsequent statistical analysis and troubleshooting.
[0113] This design supports flexible configuration adjustments. The operation team can modify the operating parameters of each module according to actual needs, such as detection cycle, scoring rules, scheduling strategy, etc., so as to achieve refined control of global traffic scheduling.
[0114] Through this modular device design, the system can realize intelligent processing of DNS resolution requests, ensuring that user requests are forwarded to the most appropriate service node, thereby providing a better service experience. At the same time, this design also provides a good foundation for subsequent function expansion and performance optimization.
[0115] Reference Figure 7 , Figure 7A schematic diagram of a computer device provided in an embodiment of the present invention. Corresponding to the above DNS-based global traffic scheduling method, an embodiment of the present invention further provides a computer device. The device includes: a processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, and when the processor executes the computer program, the DNS-based global traffic scheduling method as in any of the above embodiments is implemented.
[0116] In this embodiment, the memory of the computer device can be any one or a combination of various media that can store computer programs, such as random access memory (RAM), read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), registers, hard disks, mobile hard disks, solid-state drives (SSDs), etc. Among them, the memory stores various program codes and data required to implement the global traffic scheduling function, and these codes and data are organized and stored according to functional modules.
[0117] The processor of the computer device may be at least one of a central processing unit (CPU), a graphics processing unit (GPU), a field programmable gate array (FPGA), an application specific integrated circuit (ASIC), etc. The processor is connected to the memory via a bus and is used to execute the computer program stored in the memory. When the computer device is running, the processor will load and execute the corresponding program code from the memory, thereby realizing the following functions:
[0118] According to the preset detection cycle, the link quality detection subsystem is controlled to obtain the service quality data of the backend service node. The processor will trigger the data collection task regularly and is responsible for processing and managing the collected data.
[0119] The service quality data of each backend service node is scored and calculated according to the preset scoring rules. The processor will execute the scoring algorithm to quantitatively evaluate data such as network performance indicators and load status indicators to obtain a service quality score.
[0120] When responding to a DNS resolution request, the processor executes a node selection algorithm to determine the optimal target service node based on the current scheduling strategy and the service quality scores of each node.
[0121] Generate DNS resolution results and return them to the requesting terminal through the network interface. The processor will encapsulate the IP address of the selected node into a standard DNS response message.
[0122] In order to improve processing performance, the computer device can adopt a multi-core processor architecture to improve data processing efficiency through parallel processing. At the same time, the processor can also quickly respond to abnormal situations through an interrupt mechanism to ensure the stable operation of the system.
[0123] In the computer device, the processor and the memory are connected and communicated through a standard system bus. The system bus may include a data bus, an address bus, and a control bus. In addition, the computer device may also include a network interface for data communication with other devices. All these hardware components work together to implement the various functions of the global traffic scheduling method when the processor executes the program code in the memory.
[0124] Through this implementation method based on general computing hardware, the embodiments of the present invention can be flexibly deployed on various server platforms, with good adaptability and portability. At the same time, due to the use of a programmed implementation method, the system functions are also easy to upgrade and expand, and can adapt to changes in business needs in a timely manner.
[0125] Corresponding to the above DNS-based global traffic scheduling method, an embodiment of the present invention also provides a storage medium, which includes a stored computer program, and when the computer program is running, controls the device where the storage medium is located to execute the DNS-based global traffic scheduling method as in any of the above embodiments.
[0126] In this embodiment, the storage medium is used to store a computer program for implementing a global traffic scheduling method based on DNS. The storage medium can be a computer-readable storage medium such as ROM, RAM, disk, CD, USB flash drive, SD card, etc. that can store program codes.
[0127] Specifically, the computer program stored in the storage medium includes a plurality of program modules, and when these program modules are loaded and executed by a computer device, the computer device can execute the aforementioned global traffic scheduling method.
[0128] When the storage medium is installed in a computer device and loaded and run by a processor, the stored program code will enable the computer device to execute each step of the global traffic scheduling method, and realize intelligent processing and traffic scheduling of DNS resolution requests. In this way, the embodiments of the present invention can be conveniently deployed and used on various computer devices, and have good portability and practicality.
[0129] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0130] In the several embodiments provided by the present invention, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division of the global traffic scheduling method based on DNS, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed.
[0131] The steps in the method of the embodiment of the present invention can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present invention can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0132] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention.
[0133] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.
Claims
1. A global traffic scheduling method based on DNS, characterized in that: The global traffic scheduling method is applied to a global traffic scheduling system, and the method includes: Obtaining service quality data of multiple backend service nodes according to a preset detection period; For each backend service node, determine the service quality score of the backend service node according to the corresponding service quality data and a preset scoring rule; When receiving a domain name resolution request sent by a target terminal, determining a target service node from a plurality of the backend service nodes according to a preset target scheduling strategy and a service quality score of each of the backend service nodes; Generate a resolution result corresponding to the domain name resolution request according to the IP address corresponding to the target service node; The parsing result is returned to the target terminal.
2. The method according to claim 1, characterized in that The global traffic scheduling system includes a link quality detection subsystem, and the link quality detection subsystem includes a plurality of detection points respectively deployed in each of the backend service nodes; the acquisition of service quality data of the plurality of backend service nodes according to a preset detection period includes: According to the detection period, the service quality data of each backend service node is respectively obtained through the detection points in each backend service node.
3. The method according to claim 1, characterized in that The service quality data includes network performance indicator data and load status indicator data, and the scoring rule includes a first scoring rule and a second scoring rule; and determining the service quality score of the backend service node according to the corresponding service quality data and the preset scoring rule includes: Determine a first score corresponding to the network performance indicator data according to the first scoring rule; Determine a second score corresponding to the load status indicator data according to the second scoring rule; The service quality score is determined according to the first score, a first weight corresponding to the first score, the second score, and a second weight corresponding to the second score.
4. The method according to claim 1, characterized in that: The determining of a target service node from a plurality of the backend service nodes according to a preset target scheduling strategy and a service quality score of each of the backend service nodes includes: Acquire the target location information corresponding to the target terminal according to the source IP address in the domain name resolution request; Determine the location score corresponding to each backend service node according to the target location information and the location attribute information of each backend service node; Determine a target score for each of the backend service nodes according to the corresponding service quality score and the corresponding location score; The target service node is determined from the plurality of backend service nodes according to the target scheduling strategy and the target score of each backend service node.
5. The method according to claim 1, characterized in that: The global traffic scheduling system is preset with a plurality of scheduling strategies corresponding to different user type identifiers; before determining the target service node from the plurality of backend service nodes according to the preset target scheduling strategy and the service quality scores of each backend service node, the method further includes: Acquire a user identifier corresponding to the target terminal according to the source IP address in the domain name resolution request; A corresponding user type identifier is determined according to the user identifier, and a scheduling policy corresponding to the user type identifier is determined as the target scheduling policy from a plurality of preset scheduling policies.
6. The method according to claim 1, characterized in that The service quality data includes network performance indicator data and load status indicator data; the network performance indicator data includes at least one of network delay, packet loss rate and network jitter; the load status indicator data includes at least one of node bandwidth utilization, service capability value and service availability.
7. The method according to claim 1, characterized in that After obtaining the service quality data of multiple backend service nodes according to the preset detection period, the method further includes: Detecting whether there is an abnormal service node among the plurality of backend service nodes according to the service quality data of each backend service node and a preset abnormality detection rule; If the abnormal service node is detected, the IP pool corresponding to the abnormal service node is replaced with the IP pool of the target backup service node in the IP pool maintained by the global traffic scheduling system, and the target backup service node is the backup node corresponding to the abnormal service node.
8. A global traffic scheduling device based on DNS, characterized in that: include: A service quality data acquisition module is used to acquire service quality data of multiple backend service nodes according to a preset detection period; A service quality score determination module, used to determine the service quality score of each backend service node according to the corresponding service quality data and a preset scoring rule; A target service node determination module, configured to determine a target service node from a plurality of backend service nodes according to a preset target scheduling strategy and a service quality score of each backend service node when receiving a domain name resolution request sent by a target terminal; A resolution result generating module, used to generate a resolution result corresponding to the domain name resolution request according to the IP address corresponding to the target service node; The result returning module is used to return the parsing result to the target terminal.
9. A computer device, characterized in that: include: A processor, a memory, and a computer program stored in the memory and configured to be executed by the processor, wherein when the processor executes the computer program, the DNS-based global traffic scheduling method according to any one of claims 1 to 7 is implemented.
10. A storage medium comprising a stored computer program, characterized in that: When the computer program is running, the device where the storage medium is located is controlled to execute the DNS-based global traffic scheduling method as described in any one of claims 1 to 7.
Citation Information
Cited By
Traffic scheduling method, traffic scheduling device, electronic equipment and storage medium
CN121217667A