CDN resource scheduling method, device, electronic device and storage medium
By monitoring the number of access requests of CDN edge nodes in real time and performing resource scheduling, the problem of CDN resource scheduling in the prior art slow response in high concurrency and low bandwidth scenarios is solved, and the service quality is improved.
Patent Information
- Application Number
- CN202211665836.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-23
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-12-23
AI Technical Summary
The existing CDN resource scheduling methods cannot achieve timely responses in scenarios where the concurrency of visitor requests is large but the bandwidth occupancy is small, resulting in low customer service quality.
By obtaining the real-time query rate per second (QPS) of each edge node of the CDN, determine the target server group with insufficient QPS, and perform CDN resource scheduling according to the correspondence between the server group and the customer, including replacing or adding servers to improve the server group's QPS capacity.
It realizes timely response when the number of concurrent visitor requests is large, and improves the service quality of customers.
Smart Images

Figure CN116233027B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a CDN resource scheduling method, device, electronic device and storage medium. Background Art
[0002] Content Delivery Network (CDN) is a distributed network built on the existing network to speed up network access. It relies on server clusters deployed at edge nodes around the world. Through load balancing, content publishing, content management and content storage functions, the server clusters at the edge nodes share the pressure of the server clusters at the source site, allowing users to obtain cached access resources nearby, avoiding network congestion and speeding up access.
[0003] As CDN technology continues to mature, more and more traditional customers (such as manufacturing companies, securities companies, news media companies, etc.) and Internet customers (such as video APP companies, game APP companies, social APP companies and some websites, etc.) choose to use CDN vendors' CDN node resources to provide external services. In the existing technology, when CDN vendors schedule CDN resources for customers, they mainly consider increasing the bandwidth capacity of CDN nodes.
[0004] However, for customers with a large number of concurrent visitor access requests but a small amount of bandwidth occupied by the data requested by the visitor access requests, such as health apps, when a large number of users open the health apps to query health information at the same time, the CDN node will receive a large number of visitor access requests. The amount of health information-related data requested by each visitor access request is small. At this time, relying on increasing the CDN node bandwidth for resource scheduling cannot achieve timely response to visitor access requests, resulting in lower service quality for customers. Summary of the invention
[0005] The embodiments of the present application provide a CDN resource scheduling method, device, electronic device and storage medium to achieve timely response to visitor access requests in a scenario where the number of visitor access requests is large but the bandwidth occupancy is not large, thereby improving the service quality of customers.
[0006] According to a first aspect of the present application, a CDN resource scheduling method is disclosed, the method comprising:
[0007] Obtain the real-time query rate per second (QPS) of the server group of each edge node of the CDN;
[0008] Determine a target server group with insufficient QPS according to the real-time QPS and the upper limit QPS of each of the server groups, wherein the upper limit QPS is the maximum QPS supported by the server group;
[0009] According to the correspondence between the server group and the customer, determining the domain name and target acceleration area of the target customer corresponding to the target server group, wherein the acceleration area is obtained based on the geographical location;
[0010] Perform CDN resource scheduling for the target customer in the target acceleration area;
[0011] The CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server to the target server group; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0012] According to a second aspect of the present application, a CDN resource scheduling device is disclosed, the device comprising:
[0013] An acquisition module, used to acquire the real-time QPS of the server group of each edge node of the CDN;
[0014] A first determination module is used to determine a target server group with insufficient QPS according to the real-time QPS and the upper limit QPS of each of the server groups, wherein the upper limit QPS is the maximum QPS supported by the server group;
[0015] A second determination module is used to determine the domain name and target acceleration area of the target customer corresponding to the target server group according to the corresponding relationship between the server group and the customer, wherein the acceleration area is obtained based on the geographical location;
[0016] A scheduling module, used for scheduling CDN resources for the target customer in the target acceleration area;
[0017] The CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server to the target server group; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0018] According to a third aspect of the present application, an electronic device is disclosed, including a memory, a processor, and a computer program stored in the memory, wherein the processor executes the computer program to implement the CDN resource scheduling method as in the first aspect.
[0019] According to a fourth aspect of the present application, a computer-readable storage medium is disclosed, on which a computer program / instruction is stored. When the computer program / instruction is executed by a processor, the CDN resource scheduling method in the first aspect is implemented.
[0020] According to a fifth aspect of the present application, a computer program product is disclosed, including a computer program / instruction, which implements the CDN resource scheduling method in the first aspect when executed by a processor.
[0021] In an embodiment of the present application, the real-time QPS of the server group of each edge node of the CDN is obtained; based on the real-time QPS and the upper limit QPS of each server group, the target server group with insufficient QPS is determined, wherein the upper limit QPS is the maximum QPS supported by the server group; based on the correspondence between the server group and the customer, the domain name and target acceleration area of the target customer corresponding to the target server group are determined, wherein the acceleration area is obtained based on the geographical location; CDN resource scheduling is performed for the target customer in the target acceleration area; wherein the above-mentioned CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server in the target server; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0022] It can be seen that in the embodiments of the present application, when CDN manufacturers schedule CDN resources for customers, they no longer only consider the bandwidth factor of the CDN nodes, but also comprehensively consider the characteristics of the customers. For customers with a large number of concurrent visitor access requests but less obvious bandwidth consumption, the CDN manufacturers monitor the number of visitor access request data of the CDN edge nodes in real time. When a sudden increase in the number of visitor access requests is monitored, for edge nodes with insufficient resources, the CDN manufacturers promptly replace or increase node resources for the customers, so as to achieve timely response to visitor access requests and improve the service quality of the customers. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0024] Figure 1 is a flow chart of a CDN resource scheduling method provided by an embodiment of the present application;
[0025] Figure 2 is a flowchart of an implementation of step 104 provided in an embodiment of the present application;
[0026] Figure 3 is a flowchart of an implementation of step 201 provided in an embodiment of the present application;
[0027] Figure 4 is a flowchart of an implementation of step 203 provided in an embodiment of the present application;
[0028] Figure 5 It is one of the example graphs for constructing a directed acyclic graph based on resource planning information provided in the embodiment of the present application;
[0029] Figure 6 This is the second example diagram of constructing a directed acyclic graph based on resource planning information provided in an embodiment of the present application;
[0030] Figure 7 is a flowchart of an implementation of step 402 provided in an embodiment of the present application;
[0031] Figure 8 It is an example diagram of resource scheduling based on a directed acyclic graph provided in an embodiment of the present application;
[0032] Fig. 9 is an example diagram of a CDN scheduling system provided in an embodiment of the present application;
[0033] Fig.10 It is a structural diagram of a CDN resource scheduling device provided in an embodiment of the present application;
[0034] Fig.11 It is a structural block diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] In order to enable those skilled in the art to better understand the present application, the present application is further described in detail below in conjunction with the accompanying drawings and specific implementation methods. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present application.
[0036] Embodiments of the present application provide a CDN resource scheduling method, device, electronic device, and storage medium.
[0037] To facilitate understanding, some concepts involved in the embodiments of the present application are first introduced below.
[0038] Content Delivery Network (CDN): A distributed network built on the existing network to speed up network access. It relies on server clusters deployed at edge nodes around the world. Through load balancing, content publishing, content management and content storage functions, the server clusters at the edge nodes share the pressure of the server clusters at the source site, allowing users to obtain cached access resources nearby, avoiding network congestion and speeding up access.
[0039] The basic principle of CDN: widely use various cache servers, distribute these cache servers to areas or networks where user access is relatively concentrated, and when users visit the website, use global load technology to direct the user's access to the nearest working cache server, and the cache server directly responds to the user's request.
[0040] Composition of CDN network: Mainly composed of CDN central nodes and CDN edge nodes.
[0041] CDN central node: includes CDN network management center and global load balancing DNS redirection resolution system, responsible for the distribution and management of the entire CDN network.
[0042] CDN edge node: mainly refers to the remote distribution node, which consists of two parts: load balancing equipment and high-speed edge cache server (also referred to as "server").
[0043] The relationship between CDN edge nodes, edge cache servers and server groups: Each CDN edge node usually includes multiple edge cache servers, and multiple edge cache servers constitute a server group.
[0044] CDN vendor: The party that provides CDN equipment and CDN network, also known as the service provider, for example, the current three major operators (China Telecom, China Mobile and China Unicom), some communication companies (Huawei, ZTE, Wangsu, etc.), etc.
[0045] CDN customers: also referred to as "customers", refers to the party that uses the CDN equipment and CDN network provided by CDN manufacturers, also known as the service recipient, such as various APPs (video APPs, game APPs, car APPs, weather APPs, health APPs, shopping APPs, social APPs, news APPs, etc.) Internet companies, websites, traditional companies, enterprises and institutions, etc. CDN customers provide services to users of the customer's APPs through the equipment and network provided by CDN manufacturers. For example, a video company provides streaming media services to users of its video APPs (ordinary users and member users) through the equipment and network provided by CDN manufacturers.
[0046] Visitors: users of CDN customers, such as users of video apps, game apps, car apps, weather apps, health apps, shopping apps, social apps, news apps, etc.
[0047] Acceleration zones for CDN customers: To facilitate management and data distribution, customers divide the area they serve into multiple zones, i.e., acceleration zones, according to geographic location. For example, weather apps are divided into multiple acceleration zones according to provinces, with one province being one acceleration zone; Beijing health apps are divided into multiple acceleration zones according to administrative districts, with one administrative district being one acceleration zone.
[0048] CDN resources: in the embodiment of the present application, refers to the edge cache server of CDN.
[0049] Directed Acyclic Graph (DAG): If a directed graph cannot start from a vertex and return to the vertex through several edges, then the graph is a directed acyclic graph.
[0050] Queries-Per-Second (QPS): is a measure of the amount of traffic processed by a specific query server within a specified time. The QPS in the embodiment of the present application refers to the number of visitor access requests per second.
[0051] CDN resource scheduling method in the prior art: When CDN manufacturers schedule CDN resources for customers, they mainly consider continuously increasing the bandwidth capacity of CDN nodes, that is, increasing bandwidth resources. This scheduling method that relies on increasing bandwidth resources is suitable for customers such as video apps and game apps that consume more bandwidth. However, it is not applicable to customers such as health apps, weather apps, and car apps that have a large number of concurrent visitor access requests but a small amount of bandwidth occupied by the data requested by the visitor access requests. It is impossible to respond to visitor access requests in a timely manner, resulting in low service quality for such customers. For example, when users of health apps check their health information, they have not received a response and their health information cannot be displayed.
[0052] The CDN resource scheduling method of the embodiment of the present application: When scheduling CDN resources for customers, CDN manufacturers no longer only consider the bandwidth factor of CDN nodes, but also comprehensively consider the characteristics of the customers. For customers such as health apps, weather apps, and car apps, which have a large number of concurrent visitor access requests but do not consume so much bandwidth, the number of visitor access requests per second of CDN edge nodes is monitored in real time. When a sudden increase in the number of visitor access requests is monitored, for edge nodes with insufficient QPS resources, node resources are promptly replaced or increased for the customer (for example, replaced with a server with a large QPS capacity, or a server with a large QPS capacity is increased) to achieve timely response to visitor access requests and improve the service quality of such customers.
[0053] Next, a CDN resource scheduling method provided in an embodiment of the present application is introduced.
[0054] Figure 1 is a flow chart of a CDN resource scheduling method provided by an embodiment of the present application, such as Figure 1 As shown, the method may include the following steps: step 101, step 102, step 103 and step 104;
[0055] In step 101, the real-time QPS of the server group of each CDN edge node is obtained.
[0056] In the embodiment of the present application, the real-time QPS of the server group refers to the real-time number of visitor access requests per second of the server group.
[0057] In the embodiment of the present application, since the server group usually includes multiple servers (ie, multiple edge cache servers), and each server has a real-time QPS, the real-time QPS of the server group can be the sum of the real-time QPS of all servers in the server group.
[0058] Specifically, you can first obtain the real-time QPS of all servers under each CDN edge node, and then find the server group to which each server belongs based on the IP of each server. Take the server group as the calculation unit, sum the real-time QPS of all servers in each server group, and get the real-time QPS of each server group.
[0059] For example, the three server groups are server group A, server group B and server group C. Server group A includes server 11, server 12 and server 13, server group B includes server 21, server 22 and server 23, and server group C includes server 31, server 32 and server 33. The real-time QPS of the above servers is shown in Table 1 below. Taking the server group as the calculation unit, the real-time QPS of all servers in each server group is summed to obtain the real-time QPS of each server group.
[0060]
[0061] Table 1
[0062] In an embodiment of the present application, the real-time QPS of the server group of each CDN edge node is obtained to monitor the number of requests per second of the edge node in real time, so that when the number of requests suddenly increases and the QPS resources of the edge node are insufficient, resource scheduling is performed in time, that is, the QPS resources of the edge node are increased.
[0063] In step 102, a target server group with insufficient QPS is determined according to the real-time QPS and the upper limit QPS of each server group, wherein the upper limit QPS is the maximum QPS supported by the server group.
[0064] In the embodiment of the present application, the upper limit QPS of the server group may be the sum of the upper limit QPSs of all servers in the server group.
[0065] In the embodiment of the present application, the upper limit QPS of the server group refers to the maximum number of visitor access requests that the server group can support per second.
[0066] In the embodiment of the present application, the target server group with insufficient QPS refers to an over-performing server group, that is, a server group that cannot respond to all visitor access requests.
[0067] In the embodiment of the present application, the real-time QPS of all server groups can be traversed to determine whether it exceeds the upper limit QPS of the server group and whether there is any available QPS.
[0068] In some embodiments, for each server group, the real-time QPS of the server group can be directly compared with the upper limit QPS of the server group. If the real-time QPS of the server group is greater than or equal to the upper limit QPS, the server group is determined to be a target server group with insufficient QPS; if the real-time QPS of the server group is less than the upper limit QPS, the QPS of the server group is considered to be sufficient.
[0069] In some embodiments, in order to prevent the number of visitor access requests on the server group from suddenly exceeding, a redundancy parameter may be set, for example, the redundancy parameter is 0.9. In this case, the above step 102 includes the following steps: step 1021, step 1022, and step 1023;
[0070] In step 1021, a redundancy parameter is obtained, wherein the value of the redundancy parameter is between 0 and 1, and the redundancy parameter is used to prevent the number of visitor access requests on the server group from exceeding the limit.
[0071] In the embodiment of the present application, different redundancy parameters may be set for different server groups, or the same redundancy parameters may be set for different server groups, which is not limited in the embodiment of the present application.
[0072] In step 1022, the redundant QPS of each server group is calculated according to the real-time QPS, the upper limit QPS and the redundancy parameter of each server group, wherein the redundant QPS=the upper limit QPS*the redundancy parameter−the real-time QPS.
[0073] In the embodiment of the present application, redundant QPS refers to the remaining QPS, that is, the available QPS. For each server group, the redundant QPS of the server group = the upper limit QPS of the server group * the redundant parameter - the real-time QPS of the server group.
[0074] In step 1023, the server group with a redundant QPS less than 0 is determined as a target server group with insufficient QPS.
[0075] In the embodiment of the present application, for a target server group with insufficient QPS, it is considered that the target server group has exceeded the limit and the resources of the server group need to be scheduled.
[0076] In step 103, based on the correspondence between the server group and the customer, the domain name and the target acceleration zone of the target customer corresponding to the target server group are determined, wherein the acceleration zone is obtained based on the geographical location.
[0077] In an embodiment of the present application, when providing services to customers, the CDN manufacturer will allocate multiple server groups to the customers and record the correspondence between the customers and the server groups allocated to them. The correspondence can be in the form of a correspondence between the customer domain name, the acceleration zone and the server group identifier, as shown in Table 2 below, where Beijing refers to Beijing and Tianjin refers to Tianjin.
[0078] Customer domain name Acceleration Zone Server Group www.aaa.com Beijing A, B, C www.bbb.com Beijing B, C, D www.aaa.com Tianjin A, D, E
[0079] Table 2
[0080] In actual applications, multiple different customers may choose the same CDN manufacturer. In this case, one CDN manufacturer will serve multiple customers. When allocating server groups to multiple customers, multiple customers can share one server group or use different server groups.
[0081] In an embodiment of the present application, for all server groups with insufficient QSP, i.e., the target server group, all customers and acceleration areas affected by insufficient QPS of the server group, i.e., the target acceleration areas of the target customers, can be found based on the correspondence between the server group and the customer.
[0082] In the embodiment of the present application, CDN resource scheduling is performed for target customers in the target acceleration area affected by insufficient QPS of the server group to increase the QPS resources of the corresponding server group.
[0083] In step 104, CDN resource scheduling is performed for target customers in the target acceleration area; wherein the CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server to the target server; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0084] In the embodiment of the present application, in order to facilitate CDN resource scheduling for customers, a resource pool can be allocated to each customer in advance, and each resource pool includes multiple spare servers. When CDN resource scheduling is performed later, a server with a large QPS upper limit value is selected from the resource pool to replace the server with a small QPS upper limit value in the server group, or a server with a large QPS upper limit value is selected from the resource pool and added to the server group.
[0085] In the embodiment of the present application, the essence of CDN resource scheduling for target customers in the target acceleration area is to increase the QPS capacity of the server group corresponding to the target customers in the target acceleration area so as to be able to respond to more visitor access requests, so that the access requests of users of target customers in the target acceleration area are all fed back.
[0086] It can be seen from the above embodiment that in this embodiment, the real-time QPS of the server group of each edge node of the CDN is obtained; based on the real-time QPS and the upper limit QPS of each server group, the target server group with insufficient QPS is determined, wherein the upper limit QPS is the maximum QPS supported by the server group; based on the correspondence between the server group and the customer, the domain name and target acceleration area of the target customer corresponding to the target server group are determined, wherein the acceleration area is obtained based on the geographical location; CDN resource scheduling is performed for the target customer in the target acceleration area; wherein the above CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server in the target server; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0087] It can be seen that in the embodiments of the present application, when CDN manufacturers schedule CDN resources for customers, they no longer only consider the bandwidth factor of the CDN nodes, but also comprehensively consider the characteristics of the customers. For customers with a large number of concurrent visitor access requests but less obvious bandwidth consumption, the CDN manufacturers monitor the number of visitor access request data of the CDN edge nodes in real time. When a sudden increase in the number of visitor access requests is monitored, for edge nodes with insufficient resources, the CDN manufacturers promptly replace or increase node resources for the customers, so as to achieve timely response to visitor access requests and improve the service quality of the customers.
[0088] In another embodiment provided by the present application, when CDN resource scheduling is performed for a target customer in a target acceleration area, CDN resource scheduling may be performed based on historical visitor access request data of the target customer in the target acceleration area. Accordingly, Figure 2 As shown, the above step 104 includes the following steps: step 201, step 202 and step 203;
[0089] In step 201, the historical peak QPS of visitor access requests of a target customer in a target acceleration area is obtained.
[0090] In the embodiment of the present application, considering that different customers usually have different request requirements in different time periods, a day can be divided into multiple time periods, so as to make full use of CDN node resources by combining factors of peak time periods of different customers. For example, a day is divided into two time periods: 0:00-18:00 (morning period) and 18:00-24:00 (evening period).
[0091] Accordingly, in some embodiments, the historical peak QPS of visitor access requests of target customers in different time periods in the target acceleration area in the last N days may be obtained, where N is an integer greater than 1.
[0092] In step 202, resource planning information of the target client in the target acceleration area is obtained, wherein the resource planning information includes: the server group to be used and the priority of use of the server group.
[0093] Taking into account the possibility that multiple clients share a server group, in an embodiment of the present application, a usage priority of each client for the server group can be set, and different clients correspond to different usage priorities.
[0094] In some embodiments, resource planning information of the target customer in the target acceleration area in the last N days may be obtained. For example, resource planning information of the target customer in the target acceleration area in the last 2 days may be obtained.
[0095] Considering that customers usually have more than one task, for example, health apps provide users with multiple services, such as vaccination services, disease detection services, etc., each service can be regarded as a task. Therefore, after the CDN manufacturer assigns a server group to the customer, the customer can also assign server groups to different tasks according to their own tasks.
[0096] In one example, as shown in Table 3 below, resource planning information of a target customer in a target acceleration area in the last two days is shown.
[0097] Task ID Customer domain name Acceleration Zone Server Group Priority 1 www.aaa.com Beijing A, B, C high 2 www.bbb.com Beijing B, C, D Low 3 www.aaa.com Tianjin A, D, E high
[0098] Table 3
[0099] In step 203, CDN resources are scheduled for target customers in the target acceleration area according to the historical peak QPS and resource planning information.
[0100] In an embodiment of the present application, the maximum number of visitor access requests received by each target server group in the target acceleration area at the current time can be estimated based on the historical peak QPS of visitor access requests of the target customer in the target acceleration area, and the target server group with insufficient QPS resources can be determined by comparing the estimated maximum value with the upper limit QPS of the target server group, that is, which target server group needs to increase QPS resources.
[0101] Preferably, according to the historical peak QPS of visitor access requests of target clients in different time periods in the target acceleration area in the last N days, the maximum number of visitor access requests received by each target server group in the target acceleration area at the current time can be more accurately estimated.
[0102] In the embodiment of the present application, the execution order of each task in the target acceleration area can be determined according to the resource planning information of the target customer in the target acceleration area.
[0103] In an example, the resource planning information is shown in Table 3. It can be seen from Table 3 that: the tasks related to the customer domain name www.aaa.com need to be executed first; Task 1 and Task 3 have a common server group A and cannot be executed at the same time; Task 2 depends on Task 1 and Task 3 to be completed.
[0104] It can be seen that in the embodiments of the present application, the execution order of each task in the target acceleration area can be determined according to the resource planning information, the maximum number of visitor access requests of each target server group in the target acceleration area can be estimated according to the historical peak QPS, and each task can be executed according to the determined execution order. During the task execution process, the target server group with insufficient QPS resources when executing each task is determined according to the estimated maximum value. The target server group with insufficient QPS resources can be accurately determined, and QPS resources can be added to the target server group in time, so as to achieve timely response to visitor access requests, thereby improving customer service quality.
[0105] In another embodiment provided by the present application, records of visitor access to customer domain names can be collected from each server group of the CDN edge node, and the number of visitor requests in the visitor access records can be aggregated to each acceleration area of each customer according to the area to which the visitor IP belongs. In addition, a day can be divided into multiple time periods, and the peak number of requests in each time period can be calculated. Accordingly, Figure 3 As shown, the above step 201 includes the following steps: step 301, step 302, step 303 and step 304;
[0106] In step 301, the visitor access records of the server groups of each CDN edge node are obtained, wherein the visitor access records include the number of visitor access requests for different customer domain names from different visitor IPs.
[0107] In one example, the visitor access record is shown in Table 4 below.
[0108] Visitor IP Customer domain name Number of access requests 1.1.1.1 www.aaa.com 500 1.1.1.1 www.bbb.com 260 1.1.1.2 www.ccc.com 400
[0109] Table 4
[0110] In step 302, the number of visitor access requests in the visitor access record is aggregated into the acceleration area of each customer according to the area to which the visitor IP belongs.
[0111] In an example, the acceleration zone to which the visitor's IP belongs may be queried from the IP database every 5 minutes, and the QPS of different customers in the corresponding acceleration zone within these 5 minutes may be calculated, as shown in Table 5 below.
[0112] Customer domain name Acceleration Zone QPS www.aaa.com Beijing 1200 www.bbb.com Beijing 1500 www.aaa.com Tianjin 500
[0113] Table 5
[0114] In step 303, the time of each day in the recent N days is divided into time periods, and the historical peak QPS of the visitor access requests of each customer in each acceleration area in different time periods in the recent N days is calculated according to the number of visitor access requests of each customer in each acceleration area.
[0115] In the embodiment of the present application, considering that different customers usually have different request requirements in different time periods, a day can be divided into multiple time periods, so as to make full use of CDN node resources by combining factors of peak time periods of different customers. For example, a day is divided into two time periods: 0:00-18:00 (morning period) and 18:00-24:00 (evening period).
[0116] For example, first summarize the QPS of each customer in each acceleration area to obtain the results shown in Table 6 below.
[0117] Customer domain name Acceleration Zone QPS time www.aaa.com Beijing 1200 2022-07-25 17:45:00 www.bbb.com Beijing 1500 2022-07-25 17:45:00 www.aaa.com Tianjin 500 2022-07-25 17:45:00
[0118] Table 6
[0119] Afterwards, according to the reporting time, the aggregated QPS of each customer in each acceleration area is matched to the corresponding time period, for example, the morning peak time period or the evening peak time period, and the peak QPS of each customer in different time periods in each acceleration area is updated. When updating, if the current QPS is greater than the current peak QPS, the current peak QPS = the current QPS value; otherwise, the data remains unchanged. For example, the results shown in Table 7 below can be obtained.
[0120] Customer domain name Acceleration Zone Peak QPS this morning Peak QPS tonight www.aaa.com Beijing 5000 8000 www.bbb.com Beijing 3000 9500 www.aaa.com Tianjin 1500 6000
[0121] Table 7
[0122] Finally, according to the peak QPS usage of customers in the last two days (i.e., historical peak QPS) and the resource planning information of customers in the last two days, resource scheduling is performed, so the peak values of today's and yesterday's peak QPS need to be calculated. At 0:00 every day, the peak values of each time period of today are updated to the peak QPS data of the corresponding time period of yesterday, and today's peak QPS is recalculated based on the real-time QPS, and the data shown in Table 8 below can be obtained.
[0123]
[0124] Table 8
[0125] In step 304, the historical peak QPS of visitor access requests of target customers in different time periods in the target acceleration area in the recent N days is obtained from the historical peak QPS of visitor access requests of each customer in different time periods in each acceleration area in the recent N days.
[0126] In an embodiment of the present application, the historical peak QPS of visitor access requests of the target customer in different time periods within the target acceleration area in the past N days can be obtained from the historical peak QPS of visitor access requests of each customer in different time periods within each acceleration area in the past N days.
[0127] It can be seen that in the embodiment of the present application, the time of each day can be divided into time periods (for example, morning and evening), and the peak number of requests in the current time period can be calculated based on the number of visitor access requests from customers in each acceleration area, which can be used as the number of requests required in the time period to avoid frequent switching of services when scheduling resources for customers.
[0128] In another embodiment provided by the present application, for the clients that will be affected after the server group is monitored to be running high, a directed acyclic graph can be constructed according to the relevance of their planned resources, and then parallel scheduling can be performed using the topological sorting of the directed acyclic graph to improve the efficiency of resource scheduling. Accordingly, Figure 4 As shown, the above step 203 includes the following steps: step 401 and step 402;
[0129] In step 401, a directed acyclic graph is constructed according to resource planning information, wherein each node in the directed acyclic graph corresponds to a scheduling task of a target customer in a target acceleration area.
[0130] In the embodiment of the present application, a directed acyclic graph can be constructed based on the priority level of the target customer, the customer domain name, and the acceleration zone granularity.
[0131] In one example, the following is constructed based on the priority level of the target customer, the customer domain name, and the acceleration zone granularity: Figure 5The directed acyclic graph shown in FIG. 1 , in which each node corresponds to a scheduling task and the customer domain name and acceleration zone to which the scheduling task belongs. Figure 5 It can be seen that: Task 1 and Task 2 can be executed in parallel, Task 3 depends on Task 1 and Task 2, Task 4 depends on Task 3, Task 5 and Task 6 both depend on Task 4, Task 5 and Task 6 can be executed in parallel, Task 7 depends on Task 5 and Task 6, and Task 8 depends on Task 7. For the convenience of description, Figure 5 The directed acyclic graph shown is transformed into Figure 6 The representation shown, where Figure 6 The node i in corresponds to Figure 5 The node of task i in .
[0132] In step 402, CDN resource scheduling is performed according to the historical peak QPS and the topological ordering of the nodes in the directed acyclic graph.
[0133] In the embodiment of the present application, tasks can be executed according to the topological ordering of the nodes in the directed acyclic graph.
[0134] In one example, for Figure 6 The directed acyclic graph shown in the figure is topologically sorted. First, the tasks corresponding to node 1 and node 2 are executed simultaneously. After the tasks corresponding to node 1 and node 2 are completed, the task corresponding to node 3 is executed. After the task corresponding to node 3 is completed, the task corresponding to node 4 is executed. After the task corresponding to node 4 is completed, the tasks corresponding to node 5 and node 6 are executed simultaneously. After the tasks corresponding to node 5 and node 6 are completed, the task corresponding to node 7 is executed. After the task corresponding to node 7 is completed, the task corresponding to node 8 is executed.
[0135] In an embodiment of the present application, in the process of executing each task according to topological sorting, the maximum number of visitor access requests of each target server group in the target acceleration area is estimated based on the historical peak QPS, and based on the estimated maximum value, the target server group with insufficient QPS resources when executing each task is determined, and QPS resources are added to the target server group in a timely manner.
[0136] It can be seen that in the embodiment of the present application, the number of requests of the customer in the acceleration area can be combined. For customers with a high number of requests, a directed acyclic graph can be constructed at the customer and acceleration area granularity, and then topological sorting can be used to schedule the customers in parallel to avoid intersection of resources under the customers, which affects the scheduling results, thereby improving the efficiency of resource scheduling. It is suitable for scenarios with a large number of visitor access requests but a small amount of bandwidth usage.
[0137] In another embodiment provided by the present application, after the directed acyclic graph is constructed, the tasks are scheduled in parallel using topological sorting. The task with in-degree 0 can be selected for execution first, and then the in-degree of the corresponding task is reduced by 1. This step is repeated until there is no task with in-degree 0, indicating that all tasks have been completed, so that unrelated tasks can be executed in parallel, thereby improving the efficiency of scheduling. Figure 7 As shown, the above step 402 may include the following steps: step 701, step 702, step 703, step 704 and step 705;
[0138] In step 701, starting from the target node with in-degree 0 in the directed acyclic graph, the historical mean of the number of visitor access requests for each target server group in the target acceleration area of the target client corresponding to the target node is calculated based on the historical peak QPS, where the historical mean = historical peak QPS / number of target server groups.
[0139] In some embodiments, starting from a target node with an in-degree of 0 in a directed acyclic graph, the target time period to which the current time belongs can be determined, and based on the historical peak QPS corresponding to the target time period, the historical average number of visitor access requests for each target server group in the target acceleration area of the target customer corresponding to the target node can be calculated.
[0140] For example, the historical peak QPS of the number of requests for the current task = max (today's peak QPS, yesterday's peak QPS), and the historical average number of visitor access requests for each server group under the current task = the historical peak QPS of the number of requests for the current task / the number of server groups in the acceleration area to which the current task belongs.
[0141] In step 702, for the target server group whose upper QPS is less than the historical average, a second server is selected from the resource pool of the target customer, and the first server in the target server group is replaced with the second server.
[0142] In the embodiment of the present application, for a server group with insufficient QPS, a server can be first selected from the customer's resource pool to try to meet the current customer demand.
[0143] In step 703, for the target server group whose upper limit QPS is still less than the historical average after replacing the second server, a third server is selected from the target customer's resource pool and the third server is added to the target server group until the upper limit QPS of the target server group is greater than the historical average.
[0144] In the embodiment of the present application, if the replacement resources cannot meet the situation, an attempt is made to add a server until the customer's needs in the acceleration area are met, and then the increase of resources is stopped.
[0145] In step 704, after the scheduling task corresponding to the target node is executed, the target node in the directed acyclic graph is deleted, and the in-degrees of other nodes in the directed acyclic graph are reduced by 1.
[0146] In the embodiment of the present application, after the current task is executed, the in-degree of the subsequent task is reduced by 1, and the current task is deleted from the directed acyclic graph.
[0147] In step 705, the above resource scheduling process is repeated for other nodes in the directed acyclic graph until the number of nodes in the directed acyclic graph is zero.
[0148] In the embodiment of the present application, the above steps 701 to 704 may be repeated until there is no task with an in-degree of 0, indicating that all tasks scheduled this time have been executed.
[0149] In an example, Figure 8 As shown, for Figure 6 The directed acyclic graph shown in the figure is sorted in topology. Since the in-degree of nodes 1 and 2 is 0, the tasks corresponding to nodes 1 and 2 are executed at the same time. After the tasks corresponding to nodes 1 and 2 are completed, nodes 1 and 2 are deleted, and the in-degrees of nodes 3 to 8 are reduced by 1. Since the in-degree of node 3 is 0 at this time, the tasks corresponding to node 3 continue to be executed, and so on, until the tasks corresponding to node 8 are completed.
[0150] It can be seen that in the embodiment of the present application, the topological sorting of the directed acyclic graph is used to schedule tasks in parallel, and the task with an in-degree of 0 is selected for execution. The in-degree of the corresponding task is then reduced by 1, and this step is repeated until there is no task with an in-degree of 0, indicating that the task execution is completed, so that the tasks can be executed in parallel, and resources can be quickly scheduled for customers with high server group performance.
[0151] In another embodiment provided by the present application, a CDN resource scheduling system may also be provided, such as Fig. 9 As shown, the CDN resource scheduling system may include: an IP segment database, a basic data configuration module, a real-time data collection module, a data analysis module and a scheduling decision module; wherein the IP segment database is used to mainly store the relationship between operators, IP segments and ASNs, and may be provided by a third party.
[0152] The basic data configuration module is used to maintain edge server information, server group information, customer information, customer domain name information, and customer resource planning information in each acceleration area.
[0153] The real-time data collection module is responsible for collecting the real-time request data of the edge server, and regularly summarizes the number of requests of each customer in the corresponding acceleration area, and sends the data to the data analysis module after aggregation.
[0154] The data analysis module is used to calculate the data reported by the real-time data collection module according to different time periods, and finally calculate the peak number of requests of different customers in each acceleration area at different time periods, and push the data results to the scheduling decision module.
[0155] The scheduling decision module is used to determine the customers with the highest number of requests based on the number of requests from customers in the acceleration area, build a directed acyclic graph based on the granularity of customers and acceleration areas, and then use topological sorting to schedule customers in parallel.
[0156] It can be seen that in the embodiment of the present application, when the scheduling system schedules resources for the acceleration area corresponding to the customer, it no longer only considers the bandwidth, but also combines the request number demand. Specifically, the visitor request number data of the edge server is collected in real time, and the request number data summarizes the customer's data in each acceleration area, and scheduling is performed based on the visitor's request number. When the customer's bandwidth demand is small but the number of requests is large, the node resources are replaced or increased for the customer, thereby ensuring the customer's service quality in the scenario where the number of visitor access requests is large but the bandwidth is small.
[0157] Corresponding to the above method embodiment, the embodiment of the present application further provides a CDN resource scheduling device. The CDN resource scheduling device described below and the CDN resource scheduling method described above can refer to each other.
[0158] Fig.10 is a structural diagram of a CDN resource scheduling device provided in an embodiment of the present application, such as Fig.10 As shown, the CDN resource scheduling device 1000 may include: an acquisition module 1001, a first determination module 1002, a second determination module 1003 and a scheduling module 1004;
[0159] An acquisition module 1001 is used to acquire the real-time QPS of the server group of each edge node of the CDN;
[0160] A first determination module 1002 is used to determine a target server group with insufficient QPS according to the real-time QPS and the upper limit QPS of each server group, wherein the upper limit QPS is the maximum QPS supported by the server group;
[0161] The second determination module 1003 is used to determine the domain name and target acceleration area of the target customer corresponding to the target server group according to the correspondence between the server group and the customer, wherein the acceleration area is obtained based on the geographical location;
[0162] The scheduling module 1004 is used to perform CDN resource scheduling for the target customer in the target acceleration area; the CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server to the target server; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0163] It can be seen from the above embodiment that in this embodiment, the real-time QPS of the server group of each edge node of the CDN is obtained; based on the real-time QPS and the upper limit QPS of each server group, the target server group with insufficient QPS is determined, wherein the upper limit QPS is the maximum QPS supported by the server group; based on the correspondence between the server group and the customer, the domain name and target acceleration area of the target customer corresponding to the target server group are determined, wherein the acceleration area is obtained based on the geographical location; CDN resource scheduling is performed for the target customer in the target acceleration area; wherein the above CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server in the target server; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0164] It can be seen that in the embodiments of the present application, when CDN manufacturers schedule CDN resources for customers, they no longer only consider the bandwidth factor of the CDN nodes, but also comprehensively consider the characteristics of the customers. For customers with a large number of concurrent visitor access requests but less obvious bandwidth consumption, the CDN manufacturers monitor the number of visitor access request data of the CDN edge nodes in real time. When a sudden increase in the number of visitor access requests is monitored, for edge nodes with insufficient resources, the CDN manufacturers promptly replace or increase node resources for the customers, so as to achieve timely response to visitor access requests and improve the service quality of the customers.
[0165] Optionally, as an embodiment, the scheduling module 1004 may include:
[0166] A first acquisition submodule is used to acquire a historical peak QPS of a visitor access request of the target customer in the target acceleration area;
[0167] A second acquisition submodule is used to acquire resource planning information of the target customer in the target acceleration area, wherein the resource planning information includes: a server group to be used and a priority for use of the server group;
[0168] The scheduling submodule is used to perform CDN resource scheduling for the target customer in the target acceleration area according to the historical peak QPS and the resource planning information.
[0169] Optionally, as an embodiment, the first acquisition submodule may include:
[0170] A first acquisition unit is used to acquire the historical peak QPS of visitor access requests of the target customer in different time periods in the target acceleration area in the last N days, where N is an integer greater than 1;
[0171] The second acquisition submodule may include: a second acquisition unit, configured to acquire resource planning information of the target customer in the target acceleration area in the last N days.
[0172] Optionally, as an embodiment, the first acquiring unit may include:
[0173] A first acquisition subunit is used to acquire visitor access records of the server group of each edge node of the CDN, wherein the visitor access records include the number of visitor access requests for different customer domain names from different visitor IPs;
[0174] A summarizing subunit, for summarizing the number of visitor access requests in the visitor access record to the acceleration area of each customer according to the area to which the visitor IP belongs;
[0175] The first calculation subunit is used to divide the time of each day in the recent N days into time periods, and calculate the historical peak QPS of the visitor access requests of each customer in each acceleration area in different time periods in the recent N days according to the number of visitor access requests of each customer in each acceleration area;
[0176] The second acquisition subunit is used to obtain the historical peak QPS of visitor access requests of the target customer in different time periods in the target acceleration area in the last N days from the historical peak QPS of visitor access requests of each customer in different time periods in each acceleration area in the last N days.
[0177] Optionally, as an embodiment, the scheduling submodule may include:
[0178] A construction unit, configured to construct a directed acyclic graph according to the resource planning information, wherein each node in the directed acyclic graph corresponds to a scheduling task of the target customer in the target acceleration area;
[0179] The scheduling unit is used to perform CDN resource scheduling according to the historical peak QPS and the topological ordering of each node in the directed acyclic graph.
[0180] Optionally, as an embodiment, the scheduling unit may include:
[0181] The second calculation subunit is used to calculate, starting from the target node with an in-degree of 0 in the directed acyclic graph, a historical average of the number of visitor access requests of the target client corresponding to the target node for each target server group in the target acceleration area according to the historical peak QPS, wherein the historical average = historical peak QPS / number of target server groups;
[0182] A first scheduling subunit is configured to select, for the target server group whose upper QPS is less than the historical average, a second server from the resource pool of the target customer, and replace the first server in the target server group with the second server;
[0183] a second scheduling subunit, configured to select a third server from the resource pool of the target customer for the target server group whose upper limit QPS is still less than the historical average after the second server is replaced, and add the third server to the target server group until the upper limit QPS of the target server group is greater than the historical average;
[0184] An updating subunit is used to delete the target node in the directed acyclic graph after the scheduling task corresponding to the target node is executed, and reduce the in-degree of other nodes in the directed acyclic graph by 1;
[0185] The third scheduling subunit is used to repeat the above resource scheduling process for other nodes in the directed acyclic graph until the number of nodes in the directed acyclic graph is 0.
[0186] Optionally, as an embodiment, the computing sub-unit is specifically used to determine the target time period to which the current time belongs, starting from the target node with an in-degree of 0 in the directed acyclic graph, and calculate the historical average number of visitor access requests of the target customer corresponding to the target node for each target server group in the target acceleration area based on the historical peak QPS corresponding to the target time period.
[0187] Optionally, as an embodiment, the first determining module 1002 may include:
[0188] A third acquisition submodule is used to acquire a redundancy parameter, wherein the value of the redundancy parameter is between 0 and 1, and the redundancy parameter is used to prevent the number of visitor access requests on the server group from exceeding the limit;
[0189] A calculation submodule, configured to calculate a redundant QPS of each server group according to the real-time QPS, the upper limit QPS and the redundancy parameter of each server group, wherein redundant QPS=upper limit QPS*redundancy parameter−real-time QPS;
[0190] The determination submodule is used to determine the server group with a redundant QPS less than 0 as a target server group with insufficient QPS.
[0191] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0192] Corresponding to the above method embodiment, an embodiment of the present application further provides an electronic device, including: a memory for storing a computer program; and a processor for implementing the steps of the above CDN resource scheduling method when executing the computer program.
[0193] like Fig.11 , which is a schematic diagram of the composition structure of an electronic device, the electronic device may include: a processor 1100, a memory 1200, a communication interface 1300 and a communication bus 1400. The processor 1100, the memory 1200 and the communication interface 1300 all communicate with each other through the communication bus 1400.
[0194] In the embodiment of the present application, the processor 1100 may be a central processing unit (CPU), a specific application integrated circuit, a digital signal processor, a field programmable gate array or other programmable logic device. The processor 1100 may call the program stored in the memory 1200. Specifically, the processor 1100 may perform the operations in the embodiment of the CDN resource scheduling method. The memory 1200 is used to store one or more programs. The program may include program code, and the program code includes computer operation instructions. In the embodiment of the present application, the memory 1200 at least stores programs for implementing the following functions:
[0195] Obtain the real-time QPS of the server group of each CDN edge node; determine the target server group with insufficient QPS based on the real-time QPS and upper limit QPS of each server group; determine the domain name and target acceleration area of the target customer corresponding to the target server group based on the correspondence between the server group and the customer; perform CDN resource scheduling for the target customer in the target acceleration area; CDN resource scheduling includes at least one of the following: replacing the first server in the target server group with the second server, and adding a third server to the target server; the upper limit QPS of the second server is greater than the upper limit QPS of the first server.
[0196] In one possible implementation, the memory 1200 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function, etc.; the data storage area may store data created during use. In addition, the memory 1200 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device or other volatile solid-state storage device. The communication interface 1300 may be an interface of a communication module, which is used to connect to other devices or systems. Of course, it should be noted that Fig.11 The structure shown does not constitute a limitation on the electronic device in the embodiment of the present application. In actual applications, the electronic device may include Fig.11 More or fewer components than shown, or combinations of certain components.
[0197] Corresponding to the above method embodiment, the embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above CDN resource scheduling method are implemented.
[0198] In addition, it should be noted that: the embodiment of the present application also provides a computer program product or a computer program, which may include computer instructions, and the computer instructions may be stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor can execute the computer instructions so that the computer device executes the description of the CDN resource scheduling method in the corresponding embodiment above, so it will not be repeated here. In addition, the description of the beneficial effects of using the same method will not be repeated. For technical details not disclosed in the computer program product or computer program embodiment involved in this application, please refer to the description of the method embodiment of this application.
[0199] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. Professionals can also further realize that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with 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 the above description according to the function. Whether these functions are executed 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 exceed the scope of this application.
[0200] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0201] Specific examples are used herein to illustrate the principles and implementation methods of the present application, and the description of the above embodiments is only used to help understand the technical solution and core ideas of the present application. It should be pointed out that for ordinary technicians in this technical field, without departing from the principles of the present application, several improvements and modifications can be made to the present application, and these improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A content distribution network CDN resource scheduling method, characterized in that: The method comprises: Obtain the real-time query rate per second (QPS) of the server group of each edge node of the CDN; Determine a target server group with insufficient QPS according to the real-time QPS and the upper limit QPS of each of the server groups, wherein the upper limit QPS is the maximum QPS supported by the server group; According to the correspondence between the server group and the customer, determining the domain name and target acceleration area of the target customer corresponding to the target server group, wherein the acceleration area is obtained based on the geographical location; Perform CDN resource scheduling for the target customer in the target acceleration area; The CDN resource scheduling includes: replacing the first server in the target server group with the second server, and / or adding a third server to the target server group; the upper limit QPS of the second server is greater than the upper limit QPS of the first server; The step of performing CDN resource scheduling for the target customer in the target acceleration area includes: Obtain a historical peak QPS of visitor access requests of the target customer in the target acceleration area; Acquire resource planning information of the target customer in the target acceleration area, wherein the resource planning information includes: a server group to be used and a priority for use of the server group; CDN resources are scheduled for the target customer in the target acceleration area according to the historical peak QPS and the resource planning information.
2. The method according to claim 1, characterized in that The obtaining of the historical peak QPS of the visitor access request of the target customer in the target acceleration area includes: Obtain the historical peak QPS of visitor access requests of the target customer in different time periods in the target acceleration area in the last N days, where N is an integer greater than 1; The obtaining resource planning information of the target customer in the target acceleration area includes: Obtain resource planning information of the target customer in the target acceleration area in the last N days.
3. The method according to claim 2, characterized in that The step of obtaining the historical peak QPS of visitor access requests of the target customer in different time periods in the target acceleration area in the last N days includes: Obtain visitor access records of the server groups of each edge node of the CDN, wherein the visitor access records include the number of visitor access requests for different customer domain names from different visitor IPs; According to the region to which the visitor's IP address belongs, the number of visitor access requests in the visitor access record is aggregated to the acceleration region of each customer; Divide the time of each day in the last N days into time periods, and calculate the historical peak QPS of visitor access requests of each customer in each acceleration zone at different time periods in the last N days according to the number of visitor access requests of each customer in each acceleration zone; The historical peak QPS of visitor access requests of the target customer in the target acceleration area at different time periods in the recent N days is obtained from the historical peak QPS of visitor access requests of each customer in each acceleration area at different time periods in the recent N days.
4. The method according to any one of claims 1 to 3, characterized in that: The performing CDN resource scheduling for the target customer in the target acceleration area according to the historical peak QPS and the resource planning information includes: Constructing a directed acyclic graph according to the resource planning information, wherein each node in the directed acyclic graph corresponds to a scheduling task of the target customer in the target acceleration area; CDN resource scheduling is performed according to the historical peak QPS and the topological ordering of each node in the directed acyclic graph.
5. The method according to claim 4, characterized in that The performing CDN resource scheduling according to the historical peak QPS and the topological sorting of each node in the directed acyclic graph includes: Starting from the target node with in-degree 0 in the directed acyclic graph, according to the historical peak QPS, the historical average of the number of visitor access requests of each target server group of the target customer corresponding to the target node in the target acceleration area is calculated, wherein the historical average = historical peak QPS / number of target server groups; For the target server group whose upper QPS is less than the historical average, selecting a second server from the resource pool of the target customer, and replacing the first server in the target server group with the second server; For the target server group whose upper QPS is still lower than the historical average after replacing the second server, select a third server from the resource pool of the target customer, and add the third server to the target server group until the upper QPS of the target server group is higher than the historical average; After the scheduling task corresponding to the target node is executed, the target node in the directed acyclic graph is deleted, and the in-degree of other nodes in the directed acyclic graph is reduced by 1; Repeat the resource scheduling process for other nodes in the directed acyclic graph until the number of nodes in the directed acyclic graph is zero.
6. The method according to claim 5, characterized in that Starting from the target node with an in-degree of 0 in the directed acyclic graph, calculating the historical average number of visitor access requests of each target server group of the target client corresponding to the target node in the target acceleration area according to the historical peak QPS, comprises: Starting from the target node with an in-degree of 0 in the directed acyclic graph, the target time period to which the current time belongs is determined, and based on the historical peak QPS corresponding to the target time period, the historical average number of visitor access requests of the target customer corresponding to the target node for each target server group in the target acceleration area is calculated.
7. The method according to claim 1, characterized in that According to the real-time QPS and the upper limit QPS of each of the server groups, determining the target server group with insufficient QPS includes: Obtaining a redundancy parameter, wherein the value of the redundancy parameter is between 0 and 1, and the redundancy parameter is used to prevent the number of visitor access requests on the server group from exceeding the limit; Calculate the redundant QPS of each server group according to the real-time QPS, the upper limit QPS and the redundant parameter of each server group, wherein the redundant QPS=the upper limit QPS*the redundant parameter-the real-time QPS; The server group with a redundant QPS less than 0 is determined as a target server group with insufficient QPS.
8. A CDN resource scheduling device, characterized in that: The device comprises: An acquisition module, used to acquire the real-time QPS of the server group of each edge node of the CDN; A first determination module is used to determine a target server group with insufficient QPS according to the real-time QPS and the upper limit QPS of each of the server groups, wherein the upper limit QPS is the maximum QPS supported by the server group; A second determination module is used to determine the domain name and target acceleration area of the target customer corresponding to the target server group according to the corresponding relationship between the server group and the customer, wherein the acceleration area is obtained based on the geographical location; A scheduling module, used for scheduling CDN resources for the target customer in the target acceleration area; The CDN resource scheduling includes: replacing the first server in the target server group with the second server, and / or adding a third server to the target server group; the upper limit QPS of the second server is greater than the upper limit QPS of the first server; Wherein, the scheduling module includes: A first acquisition submodule is used to acquire a historical peak QPS of a visitor access request of the target customer in the target acceleration area; A second acquisition submodule is used to acquire resource planning information of the target customer in the target acceleration area, wherein the resource planning information includes: a server group to be used and a priority for use of the server group; The scheduling submodule is used to perform CDN resource scheduling for the target customer in the target acceleration area according to the historical peak QPS and the resource planning information.
9. The device according to claim 8, characterized in that The first acquisition submodule includes: A first acquisition unit is used to acquire the historical peak QPS of visitor access requests of the target customer in different time periods in the target acceleration area in the last N days, where N is an integer greater than 1; The second acquisition submodule includes: The second acquisition unit is used to acquire resource planning information of the target customer in the target acceleration area in the last N days.
10. The device according to claim 9, characterized in that The first acquiring unit includes: A first acquisition subunit is used to acquire visitor access records of the server group of each edge node of the CDN, wherein the visitor access records include the number of visitor access requests for different customer domain names from different visitor IPs; A summarizing subunit, for summarizing the number of visitor access requests in the visitor access record to the acceleration area of each customer according to the area to which the visitor IP belongs; The first calculation subunit is used to divide the time of each day in the recent N days into time periods, and calculate the historical peak QPS of the visitor access requests of each customer in each acceleration area in different time periods in the recent N days according to the number of visitor access requests of each customer in each acceleration area; The second acquisition subunit is used to obtain the historical peak QPS of visitor access requests of the target customer in different time periods in the target acceleration area in the last N days from the historical peak QPS of visitor access requests of each customer in different time periods in each acceleration area in the last N days.
11. The device according to any one of claims 8 to 10, characterized in that The scheduling submodule includes: A construction unit, configured to construct a directed acyclic graph according to the resource planning information, wherein each node in the directed acyclic graph corresponds to a scheduling task of the target customer in the target acceleration area; The scheduling unit is used to perform CDN resource scheduling according to the historical peak QPS and the topological ordering of each node in the directed acyclic graph.
12. An electronic device comprising a memory, a processor and a computer program stored in the memory, characterized in that: The processor executes the computer program to implement the method according to any one of claims 1 to 7.
13. A computer-readable storage medium having a computer program / instruction stored thereon, characterized in that: When the computer program / instructions are executed by a processor, the method according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Node load distributed CDN global scheduling method
CN103825837A
Multi-cache server scheduling method and system
CN107801086A
Multi-CDN access management method and device, computer equipment and storage medium
CN110166526A
Access request processing method and device, electronic equipment and storage medium
CN110677492A
Attack defense method based on content distribution network
CN113037716A
