CN114598701B - CDN scheduling method, CDN scheduling system, computing device and storage medium - Google Patents

CDN scheduling method, CDN scheduling system, computing device and storage medium Download PDF

Info

Publication number
CN114598701B
CN114598701B CN202210141632.4A CN202210141632A CN114598701B CN 114598701 B CN114598701 B CN 114598701B CN 202210141632 A CN202210141632 A CN 202210141632A CN 114598701 B CN114598701 B CN 114598701B
Authority
CN
China
Prior art keywords
edge node
information
client
request
resource
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210141632.4A
Other languages
Chinese (zh)
Other versions
CN114598701A (en
Inventor
杨怀志
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba China Co Ltd
Original Assignee
Alibaba China Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba China Co Ltd filed Critical Alibaba China Co Ltd
Priority to CN202210141632.4A priority Critical patent/CN114598701B/en
Publication of CN114598701A publication Critical patent/CN114598701A/en
Application granted granted Critical
Publication of CN114598701B publication Critical patent/CN114598701B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The embodiment of the application provides a CDN scheduling method, a CDN scheduling system, computing equipment and a storage medium. In the embodiment of the application, a resource access request sent by a client is received through a first edge node, and a query request is sent to a dispatching center according to the resource access request; determining, by the dispatch center, load information of the first edge node according to the query request, determining whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returning access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node for the first edge node; and sending the access information of the second edge node and the resource response information responding to the resource access request to the client through the first edge node, so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node. Enabling the edge nodes to be depressurized from loading. And meanwhile, the user access experience is not reduced.

Description

CDN scheduling method, CDN scheduling system, computing device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a CDN scheduling method, a CDN scheduling system, a computing device, and a storage medium.
Background
The acceleration service of the CDN (Content Delivery Network ) has become an infrastructure of the Internet industry, internet traffic is gradually increased, traffic burst easily occurs in a non-working period of a user according to behavior habits of the Internet user, and in order to reduce bandwidth cost, the monthly cost of the user can be reduced in a bandwidth peak elimination mode, the traffic burst can cause higher node load of a CDN part, and how to reduce the node load is very important, and meanwhile, the user access experience is ensured not to be reduced.
Disclosure of Invention
Aspects of the present application provide a CDN scheduling method, system, computing device, and storage medium, so as to reduce the load of edge nodes and simultaneously ensure that the user access experience is not degraded.
The embodiment of the application provides a CDN scheduling method, wherein the CDN comprises a plurality of edge nodes and a scheduling center, and the method comprises the following steps: receiving a resource access request sent by a client through a first edge node; sending a query request to the dispatching center through a first edge node according to the resource access request so as to request the dispatching center to determine whether dispatching is needed or not; determining, by the dispatch center, load information of the first edge node according to the query request, determining whether a load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returning access information of a second edge node in the CDN, where the second edge node is used as a substitute node for the first edge node; and sending access information of a second edge node and resource response information responding to the resource access request to the client through the first edge node, so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
The embodiment of the application also provides a CDN scheduling method, which comprises the following steps: receiving a resource access request sent by a client; according to the resource access request, sending a query request to a dispatching center so that the dispatching center determines load information of a first edge node according to the query request, determines whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returns access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node of the first edge node; and receiving access information of a second edge node sent by the dispatching center, and sending the access information of the second edge node and resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
The embodiment of the application also provides a CDN scheduling system, which comprises: the first edge node, the second edge node and the dispatching center; the first edge node receives a resource access request sent by a client; the first edge node sends a query request to the dispatching center according to the resource access request so as to request the dispatching center to determine whether dispatching is needed; the dispatching center determines the load information of the first edge node according to the query request, determines whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returns the access information of a second edge node in the CDN, wherein the second edge node is used as a substitute node of the first edge node; and the first edge node sends access information of a second edge node and resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
The embodiment of the application also provides a computing device, which comprises: a memory, a processor; the memory is used for storing a computer program; the processor executes the computer program for: receiving a resource access request sent by a client; according to the resource access request, sending a query request to a dispatching center so that the dispatching center determines load information of a first edge node according to the query request, determines whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returns access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node of the first edge node; and receiving access information of a second edge node sent by the dispatching center, and sending the access information of the second edge node and resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
Embodiments of the present application also provide a computer-readable storage medium storing a computer program which, when executed by one or more processors, causes the one or more processors to implement the steps in the above-described method.
In the embodiment of the application, a resource access request sent by a client is received through a first edge node; sending a query request to a dispatching center through a first edge node according to a resource access request so as to request the dispatching center to determine whether dispatching is needed or not; determining, by the dispatch center, load information of the first edge node according to the query request, determining whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returning access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node for the first edge node; and sending the access information of the second edge node and the resource response information responding to the resource access request to the client through the first edge node, so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
The access information of the second edge node and the resource response information responding to the resource access request are sent to the client through the first edge node, so that the client can not only receive the resource response information to be accessed, but also perform subsequent access according to the access information of the second edge node, so that the load of the first edge node can be reduced, and the load of the edge node is reduced. Meanwhile, the time consumption of access is not excessively increased, and the user access experience is not reduced.
Drawings
The accompanying drawings, which are included to provide a further understanding of the application and are incorporated in and constitute a part of this specification, illustrate embodiments of the application and together with the description serve to explain the application and do not constitute a limitation on the application. In the drawings:
FIG. 1 is a flowchart of a CDN scheduling method according to an exemplary embodiment of the present application;
FIG. 2 is a diagram illustrating a CDN scheduling process according to an exemplary embodiment of the present application;
FIG. 3 is a schematic diagram illustrating a CDN scheduling system according to an exemplary embodiment of the present application;
FIG. 4 is a flowchart of a CDN scheduling method according to an exemplary embodiment of the present application;
fig. 5 is a schematic structural diagram of a CDN scheduling device according to an exemplary embodiment of the present application;
FIG. 6 is a schematic diagram of a computing device according to an exemplary embodiment of the present application.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the technical solutions of the present application will be clearly and completely described below with reference to specific embodiments of the present application and corresponding drawings. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
According to the foregoing, according to the behavior habit of the internet user, traffic burst easily occurs in a non-working period of the user, and in order to reduce bandwidth cost, the monthly cost of the user can be reduced in a bandwidth peak elimination manner, the traffic burst can cause higher node load of a CDN part, and how to reduce the node load, and it is important to ensure that the user access experience is not reduced.
Aiming at the problems, the embodiment of the application provides a CDN scheduling method, a CDN scheduling system, a computing device and a storage medium, so that the load of edge nodes is reduced, and the user access experience is ensured not to be reduced.
The following describes the CDN scheduling process in detail in connection with method embodiments.
Fig. 1 is a flowchart of a CDN scheduling method according to an exemplary embodiment of the present application. The method 100 provided by the embodiment of the application is applied to a CDN network comprising a plurality of edge nodes and a dispatching center. The method 100 comprises the steps of:
101: and receiving a resource access request sent by the client through the first edge node.
102: and sending a query request to a dispatching center through the first edge node according to the resource access request so as to request the dispatching center to determine whether dispatching is needed.
103: and determining, by the dispatch center, load information of the first edge node according to the query request, determining whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returning access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node of the first edge node.
104: and sending the access information of the second edge node and the resource response information responding to the resource access request to the client through the first edge node, so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
It should be noted that, in the CDN network 202 shown in fig. 2, there may be a plurality of nodes, and there may be edge nodes in the plurality of nodes, where the edge nodes may include a first edge node, such as edge node a2021, and a second edge node, such as edge node B2022. In addition, a dispatch center 2023 may also be provided. There may also be an upper node 2024 and a source station 2025.
In addition, other networks besides the CDN network may be used as long as the network has a plurality of nodes and a dispatch center. It is enough to have a network architecture similar to that of CDN networks.
The following is a detailed description of the above steps:
101: and receiving a resource access request sent by the client through the first edge node.
The first edge node refers to a node for providing resource information, such as an edge node in a CDN network. The physical form may be a server.
For example, a user may log onto a video website through a computer-installed web browser and send a movie resource acquisition request, i.e., a resource access request, to the video website. Such as a user may enter a movie title on a page of a video website and click on a query. I.e. the web browser sends the request via the computer. The IP (Internet Protocol ) address of the node that corresponds to receiving the request needs to be determined before the request is sent. The IP address of the edge node a in the CDN network, i.e., the IP address of the first edge node, which may be a server with a closer physical distance, may be determined by means of a DNS (Domain Name System ) scheduling. The request is then sent via the IP address to an edge node a in the CDN network.
In this case, as shown in fig. 2, the client 201, i.e. the web browser installed on the computer, executes step 211 to send a resource access request to the edge node a2021, i.e. the first edge node.
102: and sending a query request to a dispatching center through the first edge node according to the resource access request so as to request the dispatching center to determine whether dispatching is needed.
Wherein, the dispatching center refers to a center for determining a dispatching strategy. When a first edge node or a second edge node in the CDN network receives a normal request, the access scheduling center is required to determine a scheduling policy.
For example, according to the foregoing, after receiving the request, the edge node a may send a query request to a dispatching center in the CDN network, where whether the request is dispatched, that is, determine a corresponding dispatching policy.
Wherein, as shown in fig. 2, the edge node a2021 performs step 212: a query request is sent to the dispatch center 2023.
103: and determining, by the dispatch center, load information of the first edge node according to the query request, determining whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returning access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node of the first edge node.
Wherein, the load information may include: bandwidth, CPU (central processing unit ), QPS (query rate per second), etc.
The load capacity may be determined directly by the load information, such as bandwidth, CPU, QPS. The calculation may be performed by the load information, for example, a capability value may be obtained by calculating a weight algorithm.
The access information may include an IP address or domain name, etc.
For example, after receiving the request, the scheduling center may query the current load information of the edge node a, such as bandwidth, CPU, QPS, etc., and then directly determine the corresponding load capability, determine whether the current edge node a exceeds the capability threshold according to the corresponding threshold, and if the current edge node a exceeds the capability threshold, find a substitute node from the load information recorded with other edge nodes, as a substitute node of the edge node a. The load capacity of the alternative node may not exceed the capacity threshold. And acquiring the recorded IP address or domain name of the substitute node, and returning to the edge node A.
Wherein, as shown in fig. 2, the scheduling center 2023 returns the access information of the alternative node (such as the edge node B2022) to the edge node a2021 as the scheduling policy, that is, performs step 213: and sending a scheduling strategy.
In addition, in order to better determine the load information of the edge node, the node is also required to report the information at regular time.
Specifically, the method 100 further includes: the load information of the current first edge node is sent to a dispatching center through the first edge node; and sending the load information of the current second edge node to the dispatching center through the second edge node.
For example, according to the foregoing, the edge node a may acquire its own load information at regular time and send it to the scheduling center. Similarly, the edge node B may also acquire its own load information periodically and send it to the dispatch center. The dispatch center can record after receiving.
It should be noted that, when the node receives the access request, the node may acquire the corresponding load information, then determine whether the load capability of the node exceeds a threshold, and if so, may send a query request to the scheduling center to request a corresponding scheduling policy. If not exceeded, the time to send the query request can be saved. However, it is also necessary to report its own load information to the scheduling center at regular time.
Furthermore, the method 100 further comprises: through a dispatching center, determining that the load capacity of the first edge node does not exceed a capacity threshold, and returning prompt information of not dispatching; and directly transmitting resource response information responding to the resource access request through the first edge node.
For example, according to the foregoing, if the scheduling center determines that the load capacity of the edge node a does not exceed the capacity threshold, the scheduling center may return a prompt message that scheduling is not performed, as a scheduling policy. After receiving the prompt message, the edge node a may directly respond to the request to query the corresponding movie information, and return to the client of the user, such as a web browser.
Furthermore, when the load capacity of the first edge node exceeds the capacity threshold, the method 100 further comprises: and selecting a corresponding second edge node with the load capacity not exceeding the capacity threshold from a plurality of second edge nodes in the CDN as a substitute node of the first edge node through the dispatching center.
As already described above, the description is omitted here. Merely illustrate: when selecting the alternative node, a good load capacity, i.e. a minimum load capacity value, may be selected. Or selecting a physical distance closest to the first edge node. Or randomly selecting an alternative node.
104: and sending the access information of the second edge node and the resource response information responding to the resource access request to the client through the first edge node, so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
For example, according to the foregoing, after the edge node a receives the access information of the alternative node returned by the dispatch center, the access information and the queried movie information may be sent to the client through the same data packet, so that the client may access through the alternative node in a subsequent access process.
As shown in fig. 2, the edge node a2021 transmits access information of the edge node B2022 and the above-mentioned queried movie information to the client 201. I.e. step 214 is performed: and sending the resource response information and the access information.
The first edge node may respond to the information without waiting for the dispatch center to return a dispatch policy. The request may be responded to after the access request is received, for example, the queried movie information is returned to the client. And then receiving the scheduling strategy sent by the scheduling center. If the scheduling policy is that the alternative node is selected, a message may be sent to the corresponding client to inform the access information of the alternative node.
Specifically, sending, by the first edge node, access information of the second edge node and resource response information in response to the resource access request to the client includes: and sending the preset response header, the access information of the second edge node and the resource response information responding to the resource access request to the client through the first edge node.
The preset response header is used for prompting the client to take the second edge node as a substitute node of the first edge node, so that the client caches the preset response header. I.e. prompt an "alternative service" response header, such as an alt-svc response header.
For example, according to the foregoing, after the edge node a receives the access information of the alternative node, the alt-svc response header is used as the response header of the data packet or the message, and the data packet or the message carries the access information of the edge node B and the queried movie information to send to the client.
Since the request may include an http (hypertext transfer protocol ) request and an https (hypertext transfer security protocol, hyper Text Transfer Protocol over SecureSocket Layer) request. The sending of different access information is performed for different requests in the following manner.
It should be noted that, the current mainstream browser already supports recognition of the alt-svc response header by default, and although the function of prompting "substitute service" can also be implemented through other custom response headers, modification adaptation is required to be performed on a client (such as a browser), so that the modification amount of the client is large and not convenient enough.
Specifically, sending, by the first edge node, the preset response header, access information of the second edge node, and resource response information in response to the resource access request to the client, where the sending includes: and when the resource access request is an http request, sending a preset response header, the IP address of the second edge node and resource response information responding to the resource access request to the client through the first edge node.
For example, according to the foregoing, when the request is an http request, the edge node a uses the alt-svc response header as the response header of the data packet or the message, and the data packet or the message carries the IP address of the edge node B and the queried movie information to send to the client. The packet or message may be in response to: alt-svc, h2= "ip-B:443"; ma=300, where IP-B denotes the corresponding IP address of the edge node B. Wherein ma in the response header alt-svc value refers to the service expiration date, i.e., the available time.
Specifically, sending, by the first edge node, the preset response header, access information of the second edge node, and resource response information in response to the resource access request to the client, where the sending includes: and when the resource access request is an https request, sending a preset response header, the domain name of the second edge node and resource response information responding to the resource access request to the client through the first edge node so that the client acquires the corresponding IP address according to the domain name.
For example, according to the foregoing, when the request is an https request, the edge node a uses the alt-svc response header as the response header of the data packet or the message, and the domain name of the edge node B and the queried movie information are carried in the data packet or the message and sent to the client. The packet or message may be in response to: alt-svc, h2= "ip-b.gslb.com:443"; ma=300, wherein IP-b.gslb.com address represents the domain name corresponding to the IP address of the edge node B. The domain name may be resolved by DNS to the IP address of the edge node B. Wherein ma in the response header alt-svc value refers to the service expiration date, i.e., the available time.
It should be noted that, the IP address or domain name of the alt-svc response header value indicates that the edge node B may be used as an alternative service node for the current resource, i.e., an alternative node for the edge node a. If the load of the edge node A is normal, the content of the current request resource can be directly responded without carrying a response header alt-svc. Therefore, node scheduling can be directly performed through the alternative service response header alt-svc, and scheduling requests can be performed while the access requests are responded, so that the time consumption of the received access requests is less increased, and the user experience is improved.
If there is no time available or when no time available is needed, the corresponding time information may not be carried by the corresponding request.
The client may then receive the response header and then buffer it. In addition, the method can be realized by customizing other response heads, but the client is required to be subjected to transformation adaptation, so that the transformation amount of the client is large.
In order not to cause excessive load pressure on the replacement node, the corresponding scheduling policy of the scheduling center once is preset in time, i.e. each time the corresponding scheduling policy has a valid time, e.g. 300s seconds. The first edge node also needs to prompt the corresponding client for the validity time.
Specifically, the method 100 further includes: and sending the available time of the second edge node serving as the alternative node through the first edge node, so that the client sends a corresponding resource access request to the second edge node at the available time, wherein the available time corresponds to the duration of one-time scheduling policy of the scheduling center.
For example, according to the foregoing, when the request is an http request, then the response alt-svc: h2= "ip-B:443"; ma=300. When the request is https request, responding alt-svc: h2= "ip-b.gslb.com:443"; ma=300. The ma in the response header alt-svc value refers to the valid period, namely the available time, of the alternative service, and is defined according to the response time of the scheduling policy of the current scheduling center, so that real-time traffic scheduling can be realized according to the load of the edge node, and stable change of the node load can be realized, for example, the current scheduling center generates the scheduling policy once every 1 minute, and ma=300 s can be kept consistent with the change time (namely the duration time) of the scheduling policy.
After the client receives the access information of the second edge node, subsequent access can be performed according to the access information.
Specifically, after the client receives the access information of the second edge node, the method 100 further includes: and receiving a resource access request sent by the client through the second edge node, and responding the resource access request to return resource response information according to information which is carried by the resource access request and indicates the second edge node as a substitute node.
For example, after receiving the packet or the data packet sent by the edge node a, the client records the response header according to the response header alt-svc header, and when the next request is initiated, for example, according to the queried movie information, clicking to play the movie, that is, sending the request for playing the movie, then the request may be initiated to the edge node B according to the IP of the edge node B specified in alt-svc in the response header. Here, the IP address may be a directly specified IP address, or a corresponding IP address resolved from a domain name and DNS. When a play request is sent, the request can carry a request header alt-used IP-B in the request header when the request is an http request, and can carry a request header alt-used ipxxx.gslb.com in the request header when the request is an https request, so as to identify that the IP address or domain name of the alternative service edge node B is currently used, namely the edge node B node is indicated as an alternative node.
As shown in fig. 2, the client 201 performs step 215: a resource access request is sent to the edge node B2022.
It should be noted that, when the request from the client arrives at the first edge node, the first edge node may add an "alternative service" response header alt-svc while prioritizing the response content, the current mainstream browser may already support to identify the preset response header by default, and the browser may buffer the current response header and directly request other destination nodes, such as the second edge node, specified in the alt-svc header before the client buffer service fails and when the next request is initiated within the available time.
And the second edge node receives the access request, needs to determine whether the request is already scheduled, thereby making a request response.
Specifically, the method 100 further includes: and receiving a resource access request sent by the client through the second edge node, sending a query request to a dispatching center according to the resource access request when the resource access request does not carry information representing the second edge node as a substitute node, requesting the dispatching center to determine whether dispatching is needed or not, and sending resource response information according to a dispatching result.
For example, according to the foregoing, after the edge node B receives the above access request, when the request is an http request, a request header in the request carries alt-used ip-B, or when the request is an https request, a request header in the request carries the above alt-used ipxxx.gslb.com, which indicates that the currently used service address is already an alternative service address, that is, an alternative node, the edge node B does not request the dispatch center any more, and does not return an alt-svc response header, and directly responds to the request to return corresponding resource response information, such as a video stream of a movie, to execute step 216: and sending the resource response information. Otherwise, the scheduling center will be requested according to the foregoing manner, and will not be described again.
It should be noted that, a positioning location may also be returned by the dispatch center for each request from the client. However, the client side does not respond to the request, and jumps to the destination node to request along with the location, so that the response information of the request can be obtained, the time consumption of each request is increased, and the user experience is affected. In addition, although the node can also judge whether to return the location according to the self pressure, when the node load is higher, the client side can increase time consumption of part of requests due to the jump of the location, and the user experience is affected.
Fig. 3 is a schematic structural diagram of a CDN scheduling system according to an exemplary embodiment of the present application. As shown in fig. 3, the system 300 may include: a first edge node 301, a second edge node 302, and a dispatch center 303.
The first edge node 301, the second edge node 302, and the dispatch center 303 may be deployed in a CDN network. The first edge node 301 and the second edge node 302 belong to edge nodes, which may be implemented by a server device. The dispatch center 303 may also be implemented by a server device or service cluster.
In addition, the system 300 may further include: a client, which is hosted on the intelligent terminal 304.
Specifically, the first edge node 301 receives a resource access request sent by the client. The first edge node 301 sends a query request to the scheduling center 303 according to the resource access request, so as to request the scheduling center 303 to determine whether scheduling is required.
The dispatch center 303 determines the load information of the first edge node 301 according to the query request, determines whether the load capacity of the first edge node 301 exceeds the capacity threshold according to the load information, and if so, returns the access information of the second edge node 302 in the CDN, wherein the second edge node 302 serves as a substitute node for the first edge node 301.
The first edge node 301 sends the access information of the second edge node 302 and the resource response information responding to the resource access request to the client, so that the client can perform subsequent access through the second edge node 302 according to the access information of the second edge node 302.
In addition, after the client receives the access information of the second edge node 302, the second edge node 302 receives the resource access request sent by the client, and returns resource response information in response to the resource access request according to the information carried by the resource access request and indicating that the second edge node 302 is used as a substitute node.
In addition, the second edge node 302 receives a resource access request sent by the client, and when the resource access request does not carry information indicating that the second edge node 302 is used as a substitute node, sends a query request to the dispatching center 303 according to the resource access request, so as to request the dispatching center 303 to determine whether dispatching is required, and sends resource response information according to a dispatching result.
In addition, the scheduling center 303 determines that the load capacity of the first edge node 301 does not exceed the capacity threshold, and returns a prompt message for not scheduling; the resource response information in response to the resource access request is directly transmitted through the first edge node 301.
Specifically, the first edge node 301 sends a preset response header, access information of the second edge node 302, and resource response information responding to the resource access request to the client, where the preset response header is used to prompt the client to use the second edge node 302 as a substitute node of the first edge node 301, so that the client caches the preset response header.
Specifically, when the resource access request is an http request, the first edge node 301 sends a preset response header, an IP address of the second edge node 302, and resource response information in response to the resource access request to the client.
Specifically, when the resource access request is an https request, the first edge node 301 sends a preset response header, a domain name of the second edge node 302, and resource response information in response to the resource access request to the client, so that the client obtains a corresponding IP address according to the domain name.
In addition, the first edge node 301 sends the availability time of the second edge node 302 as an alternative node, so that the client sends a corresponding resource access request to the second edge node 302 at the availability time, and the availability time corresponds to the duration of the primary scheduling policy of the scheduling center.
In addition, the first edge node 301 sends load information of the current first edge node 301 to the dispatch center 303. The second edge node 302 sends the load information of the current second edge node 302 to the dispatch center 303.
In addition, when the load capacity of the first edge node 301 exceeds the capacity threshold, the dispatch center 303 selects, from the plurality of second edge nodes 302 in the CDN network, a corresponding second edge node 302 whose load capacity does not exceed the capacity threshold as a substitute node for the first edge node 301.
Please refer to the foregoing for details, and details are not repeated.
In the scenario of access scheduling in the CDN network, a user may log in to a video website through an intelligent terminal 304, such as a web browser installed on a computer, and send a movie resource acquisition request, i.e., a resource access request, to the video website. Such as a user may enter a movie title on a page of a video website and click on a query. I.e. the web browser sends the request via the computer. I.e. step 311 is performed: a resource access request is sent to the first edge node 301. The IP (Internet Protocol ) address of the node that corresponds to receiving the request needs to be determined before the request is sent. The IP address of the edge node a in the CDN network, i.e., the IP address of the first edge node 301, may be determined by means of a DNS (Domain Name System ) scheduling, and the first edge node 301 may be a server with a closer physical distance. The request is then sent via the IP address to an edge node a in the CDN network.
After receiving the request, the edge node a may send a query request to the dispatching center 303 in the CDN network, where whether the request is dispatched, that is, determine a corresponding dispatching policy, that is, execute step 313: a query request is sent to the dispatch center 303. After receiving the request, the dispatching center 303 may query the current load information of the edge node a, such as bandwidth, CPU, QPS, etc., then may directly determine the corresponding load capability, determine whether the current edge node a exceeds the capability threshold according to the corresponding threshold, and if the current edge node a exceeds the capability threshold, find a substitute node from the load information recorded with other edge nodes, as a substitute node of the edge node a, that is, the second edge node 302. The load capacity of the alternative node may not exceed the capacity threshold. And acquires the recorded IP address or domain name of the substitute node, and returns to the edge node a as a scheduling policy, i.e. execute step 314: and sending the scheduling strategy to the edge node A.
After the edge node A receives the access information of the alternative node returned by the dispatching center, the access information and the queried movie information can be sent to the web browser through the same data packet, so that the web browser can access through the alternative node in the subsequent access process.
When the request is an http request, responding alt-svc:h2= "ip-B:443"; ma=300. When the request is https request, responding alt-svc: h2= "ip-b.gslb.com:443"; ma=300. I.e. step 312 is performed: and sending the resource response information and the access information of the second edge node.
After receiving the message or the data packet sent by the edge node a, the web browser records the response header according to the response header alt-svc header, and when the next request is initiated, for example, according to the queried movie information, clicks to play the movie, that is, sends the request for playing the movie, then the request can be initiated to the edge node B according to the IP address corresponding to the IP or the domain name of the edge node B specified in alt-svc in the response header. I.e. step 315 is performed: and sending a resource access request. Here, the IP address may be a directly specified IP address, or a corresponding IP address resolved from a domain name and DNS. When a play request is sent, the request can carry a request header alt-used IP-B in the request header when the request is an http request, and can carry a request header alt-used ipxxx.gslb.com in the request header when the request is an https request, so as to identify that the IP address or domain name of the alternative service edge node B is currently used, namely the edge node B node is indicated as an alternative node.
After the edge node B receives the above access request, when the request is an http request, a request header in the request carries the above alt-used ip-B, or when the request is an https request, a request header in the request carries the above alt-used ipxxx. I.e. step 316 is performed: and sending the resource response information.
Details not described herein may be referred to the foregoing and will not be repeated.
In the present embodiment described above, the first edge node 301, the second edge node 302, and the dispatch center 303 are network-connected. If the first edge node 301, the second edge node 302, and the dispatch center 303 are in communication connection, the network system of the mobile network may be any of 2G (GSM), 2.5G (GPRS), 3G (WCDMA, TD-SCDMA, CDMA2000, UTMS), 4G (LTE), 4g+ (lte+), wiMax, 5G, and the like.
Fig. 4 is a flowchart of a CDN scheduling method according to an exemplary embodiment of the present application. The method 400 provided in the embodiment of the present application is applied to a server, which may belong to a first edge node (corresponding to the foregoing edge node) in a CDN network. The method 400 includes the steps of:
401: and receiving a resource access request sent by the client.
402: and sending a query request to a dispatching center according to the resource access request, so that the dispatching center determines the load information of the first edge node according to the query request, determines whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returns access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node of the first edge node.
403: and receiving the access information of the second edge node sent by the dispatching center, and sending the access information of the second edge node and the resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
It should be noted that, the foregoing steps 401 to 403 are already described in detail, and will not be described herein. Please refer to the foregoing for details, and details are not repeated.
Fig. 5 is a schematic structural frame diagram of a CDN scheduling device according to an exemplary embodiment of the present application. The apparatus 500 may be applied to a computing device, such as a server. The apparatus 500 includes: a receiving module 501 and a transmitting module 502; the functions of the respective modules are explained in detail below:
A receiving module 501, configured to receive a resource access request sent by a client.
The sending module 502 is configured to send a query request to the dispatch center according to the resource access request, so that the dispatch center determines load information of the first edge node according to the query request, determines whether the load capability of the first edge node exceeds a capability threshold according to the load information, and if yes, returns access information of a second edge node in the CDN, where the second edge node serves as a substitute node for the first edge node.
And the sending module 502 is configured to receive the access information of the second edge node sent by the scheduling center, send the access information of the second edge node and the resource response information in response to the resource access request to the client, so that the client performs subsequent access through the second edge node according to the access information of the second edge node.
Please refer to the above description for the details of the device 500, and the detailed description is omitted.
The internal functions and structures of the apparatus 500 shown in fig. 5 are described above, and in one possible design, the structure of the apparatus 500 shown in fig. 5 may be implemented as a computing device, such as a server. As shown in fig. 6, the apparatus 600 may include: a memory 601, a processor 602;
A memory 601 for storing a computer program.
A processor 602 for executing a computer program for: receiving a resource access request sent by a client; according to the resource access request, sending a query request to a dispatching center so that the dispatching center can determine the load information of the first edge node according to the query request, and determine whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, if so, returning access information of a second edge node in the CDN, wherein the second edge node is used as a substitute node of the first edge node; and receiving the access information of the second edge node sent by the dispatching center, and sending the access information of the second edge node and the resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
Please refer to the foregoing for details of the present apparatus 600, and the detailed description is omitted.
Embodiments of the present invention provide a computer storage medium, which when executed by one or more processors, causes the one or more processors to implement the steps of a CDN scheduling method in the method embodiment of fig. 4. And will not be described in detail.
In addition, in some of the flows described in the above embodiments and the drawings, a plurality of operations appearing in a specific order are included, but it should be clearly understood that the operations may be performed out of the order in which they appear herein or performed in parallel, the sequence numbers of the operations such as 101, 102, 103, etc. are merely used to distinguish between the various operations, and the sequence numbers themselves do not represent any order of execution. In addition, the flows may include more or fewer operations, and the operations may be performed sequentially or in parallel. It should be noted that, the descriptions of "first" and "second" herein are used to distinguish different messages, devices, modules, etc., and do not represent a sequence, and are not limited to the "first" and the "second" being different types.
The apparatus embodiments described above are merely illustrative, wherein the elements illustrated as separate elements may or may not be physically separate, and the elements shown as elements may or may not be physical elements, may be located in one place, or may be distributed over a plurality of network elements. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present invention without undue burden.
From the above description of the embodiments, it will be apparent to those skilled in the art that the embodiments may be implemented by adding necessary general purpose hardware platforms, or may be implemented by a combination of hardware and software. Based on such understanding, the foregoing aspects, in essence and portions contributing to the art, may be embodied in the form of a computer program product, which may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable multimedia data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable multimedia data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable multimedia data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable multimedia data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
In one typical configuration, a computing device includes one or more processors (CPUs), input/output interfaces, network interfaces, and memory.
The memory may include volatile memory in a computer-readable medium, random Access Memory (RAM) and/or nonvolatile memory, such as Read Only Memory (ROM) or flash memory (flash RAM). Memory is an example of computer-readable media.
Computer readable media, including both non-transitory and non-transitory, removable and non-removable media, may implement information storage by any method or technology. The information may be computer readable instructions, data structures, modules of a program, or other data. Examples of storage media for a computer include, but are not limited to, phase change memory (PRAM), static Random Access Memory (SRAM), dynamic Random Access Memory (DRAM), other types of Random Access Memory (RAM), read Only Memory (ROM), electrically Erasable Programmable Read Only Memory (EEPROM), flash memory or other memory technology, compact disc read only memory (CD-ROM), digital Versatile Discs (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium, which can be used to store information that can be accessed by a computing device. Computer-readable media, as defined herein, does not include transitory computer-readable media (transmission media), such as modulated data signals and carrier waves.
Finally, it should be noted that: the above embodiments are only for illustrating the technical solution of the present invention, and are not limiting; although the invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims (14)

1. The CDN scheduling method is characterized in that the CDN comprises a plurality of edge nodes and a scheduling center, and comprises the following steps:
receiving a resource access request sent by a client through a first edge node;
sending a query request to the dispatching center through a first edge node according to the resource access request so as to request the dispatching center to determine whether dispatching is needed or not;
determining, by the dispatch center, load information of the first edge node according to the query request, determining whether a load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returning access information of a second edge node in the CDN, where the second edge node is used as a substitute node for the first edge node;
and sending access information of a second edge node and resource response information responding to the resource access request to the client through the first edge node, so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
2. The method of claim 1, wherein after the client receives the access information for the second edge node, the method further comprises:
And receiving a resource access request sent by the client through the second edge node, and responding to the resource access request to return resource response information according to information which is carried by the resource access request and indicates the second edge node as a substitute node.
3. The method according to claim 1 or 2, characterized in that the method further comprises:
and receiving a resource access request sent by the client through a second edge node, sending a query request to the dispatching center according to the resource access request when the resource access request does not carry information representing the second edge node as a substitute node, requesting the dispatching center to determine whether dispatching is needed or not, and sending resource response information according to a dispatching result.
4. The method according to claim 1, wherein the method further comprises:
the scheduling center determines that the load capacity of the first edge node does not exceed a capacity threshold, and returns prompt information of not scheduling;
and directly transmitting resource response information responding to the resource access request through the first edge node.
5. The method of claim 1, wherein the sending, by the first edge node, access information of a second edge node and resource response information in response to the resource access request to the client comprises:
And sending a preset response header, access information of the second edge node and resource response information responding to the resource access request to the client through the first edge node, wherein the preset response header is used for prompting the client to take the second edge node as a substitute node of the first edge node, so that the client caches the preset response header.
6. The method of claim 5, wherein the sending, by the first edge node, the preset response header, the access information of the second edge node, and the resource response information in response to the resource access request to the client comprises:
and when the resource access request is an http request, sending a preset response header, an IP address of a second edge node and resource response information responding to the resource access request to the client through the first edge node.
7. The method of claim 5, wherein the sending, by the first edge node, the preset response header, the access information of the second edge node, and the resource response information in response to the resource access request to the client comprises:
And when the resource access request is an https request, sending a preset response header, a domain name of a second edge node and resource response information responding to the resource access request to the client through the first edge node so that the client obtains a corresponding IP address according to the domain name.
8. The method of claim 5, wherein the method further comprises:
and sending the available time of the second edge node serving as a substitute node through the first edge node, so that the client sends a corresponding resource access request to the second edge node at the available time, wherein the available time corresponds to the duration of one-time scheduling policy of a scheduling center.
9. The method according to claim 1, wherein the method further comprises:
sending load information of the current first edge node to the dispatching center through the first edge node;
and sending load information of the current second edge node to the dispatching center through the second edge node.
10. The method of claim 1, wherein when the load capacity of the first edge node exceeds a capacity threshold, the method further comprises:
And selecting a corresponding second edge node with the load capacity not exceeding a capacity threshold from a plurality of second edge nodes in the CDN as a substitute node of the first edge node through the dispatching center.
11. A CDN scheduling method, comprising:
receiving a resource access request sent by a client;
according to the resource access request, sending a query request to a dispatching center so that the dispatching center determines load information of a first edge node according to the query request, determines whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returns access information of a second edge node in the CDN, wherein the second edge node serves as a substitute node of the first edge node;
and receiving access information of a second edge node sent by the dispatching center, and sending the access information of the second edge node and resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
12. The CDN scheduling system is characterized by comprising a first edge node, a second edge node and a scheduling center;
The first edge node receives a resource access request sent by a client;
the first edge node sends a query request to the dispatching center according to the resource access request so as to request the dispatching center to determine whether dispatching is needed;
the dispatching center determines the load information of the first edge node according to the query request, determines whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returns the access information of a second edge node in the CDN, wherein the second edge node is used as a substitute node of the first edge node;
and the first edge node sends access information of a second edge node and resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
13. A computing device, comprising: a memory, a processor;
the memory is used for storing a computer program;
the processor executes the computer program for:
receiving a resource access request sent by a client;
According to the resource access request, sending a query request to a dispatching center so that the dispatching center determines load information of a first edge node according to the query request, determines whether the load capacity of the first edge node exceeds a capacity threshold according to the load information, and if so, returns access information of a second edge node in the CDN, wherein the second edge node is used as a substitute node of the first edge node;
and receiving access information of a second edge node sent by the dispatching center, and sending the access information of the second edge node and resource response information responding to the resource access request to the client so that the client can carry out subsequent access through the second edge node according to the access information of the second edge node.
14. A computer readable storage medium storing a computer program, which when executed by one or more processors causes the one or more processors to implement the steps in the method of claim 11.
CN202210141632.4A 2022-02-16 2022-02-16 CDN scheduling method, CDN scheduling system, computing device and storage medium Active CN114598701B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210141632.4A CN114598701B (en) 2022-02-16 2022-02-16 CDN scheduling method, CDN scheduling system, computing device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210141632.4A CN114598701B (en) 2022-02-16 2022-02-16 CDN scheduling method, CDN scheduling system, computing device and storage medium

Publications (2)

Publication Number Publication Date
CN114598701A CN114598701A (en) 2022-06-07
CN114598701B true CN114598701B (en) 2023-08-22

Family

ID=81805601

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210141632.4A Active CN114598701B (en) 2022-02-16 2022-02-16 CDN scheduling method, CDN scheduling system, computing device and storage medium

Country Status (1)

Country Link
CN (1) CN114598701B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116233027A (en) * 2022-12-23 2023-06-06 天翼云科技有限公司 CDN resource scheduling method and device, electronic equipment and storage medium

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297472A (en) * 2012-03-01 2013-09-11 上海盛霄云计算技术有限公司 Redirection method and content distribution node applied to content distribution network
CN103873497A (en) * 2012-12-11 2014-06-18 中国电信股份有限公司 Method, device and system for scheduling information
CN105763628A (en) * 2016-04-12 2016-07-13 上海帝联信息科技股份有限公司 Data access request processing method and device, edge node server and edge cluster
CN110336848A (en) * 2019-04-23 2019-10-15 网宿科技股份有限公司 A kind of dispatching method and scheduling system, equipment of access request
CN111355731A (en) * 2020-02-28 2020-06-30 北京奇艺世纪科技有限公司 Resource access method, device, resource access system, equipment and storage medium
CN113037878A (en) * 2021-05-26 2021-06-25 北京拓课网络科技有限公司 CDN data access method, system and electronic equipment
CN113497817A (en) * 2020-03-20 2021-10-12 北京金山云网络技术有限公司 Traffic scheduling method and device, edge node of CDN (content delivery network) and server
WO2022001732A1 (en) * 2020-06-29 2022-01-06 中兴通讯股份有限公司 Cdn scheduling method, access device, cdn scheduler, and storage medium
CN113973136A (en) * 2020-07-07 2022-01-25 中国移动通信集团广东有限公司 Traffic scheduling method, device and system

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20170171344A1 (en) * 2015-12-15 2017-06-15 Le Holdings (Beijing) Co., Ltd. Scheduling method and server for content delivery network service node
CN108712343A (en) * 2018-05-14 2018-10-26 网宿科技股份有限公司 Distribution method, system, fringe node and the central dispatching system of streaming media resource
CN109981765B (en) * 2019-03-18 2023-03-24 北京百度网讯科技有限公司 Method and apparatus for determining access path of content distribution network

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103297472A (en) * 2012-03-01 2013-09-11 上海盛霄云计算技术有限公司 Redirection method and content distribution node applied to content distribution network
CN103873497A (en) * 2012-12-11 2014-06-18 中国电信股份有限公司 Method, device and system for scheduling information
CN105763628A (en) * 2016-04-12 2016-07-13 上海帝联信息科技股份有限公司 Data access request processing method and device, edge node server and edge cluster
CN110336848A (en) * 2019-04-23 2019-10-15 网宿科技股份有限公司 A kind of dispatching method and scheduling system, equipment of access request
CN111355731A (en) * 2020-02-28 2020-06-30 北京奇艺世纪科技有限公司 Resource access method, device, resource access system, equipment and storage medium
CN113497817A (en) * 2020-03-20 2021-10-12 北京金山云网络技术有限公司 Traffic scheduling method and device, edge node of CDN (content delivery network) and server
WO2022001732A1 (en) * 2020-06-29 2022-01-06 中兴通讯股份有限公司 Cdn scheduling method, access device, cdn scheduler, and storage medium
CN113973136A (en) * 2020-07-07 2022-01-25 中国移动通信集团广东有限公司 Traffic scheduling method, device and system
CN113037878A (en) * 2021-05-26 2021-06-25 北京拓课网络科技有限公司 CDN data access method, system and electronic equipment

Also Published As

Publication number Publication date
CN114598701A (en) 2022-06-07

Similar Documents

Publication Publication Date Title
JP6018182B2 (en) Send category information
CN111966289B (en) Partition optimization method and system based on Kafka cluster
US20170366409A1 (en) Dynamic Acceleration in Content Delivery Network
CN110661849A (en) Request processing method and device, electronic equipment and storage medium
CN109412966B (en) Large-scale log transmission method, device and system
CN101645928A (en) Content resource caching method, device and system
CN113296924B (en) Content distribution method, device, system and storage medium
CN111586134A (en) CDN node overload scheduling method and system
CN114598701B (en) CDN scheduling method, CDN scheduling system, computing device and storage medium
CN101980505A (en) 3Tnet-based video-on-demand load balancing method
CN113301079B (en) Data acquisition method, system, computing device and storage medium
EP1627500B1 (en) Service management using multiple service location managers
CN107819754B (en) Anti-hijacking method, monitoring server, terminal and system
CN106790354B (en) Communication method and device for preventing data congestion
CN101964741B (en) Method and equipment for sending node list
CN112311826B (en) Method, device and system for processing access request in content distribution system
CN112579639A (en) Data processing method and device, electronic equipment and storage medium
CN114301848B (en) CDN-based communication method, system, equipment and storage medium
CN114615333B (en) Resource access request processing method, device, equipment and medium
CN112925946B (en) Service data storage method and device and electronic equipment
CN110581873A (en) cross-cluster redirection method and monitoring server
CN112307338A (en) Flow control method, device, equipment and storage medium of freight rate search system
CN113630422B (en) Network security data processing method and system based on edge node
CN113904953B (en) Offline detection method, device and equipment for communication equipment
CN112311829B (en) Method, device, medium and equipment for scheduling access request

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant