CN117201505A - Method for dynamically selecting optimal upper layer of CDN system - Google Patents

Method for dynamically selecting optimal upper layer of CDN system Download PDF

Info

Publication number
CN117201505A
CN117201505A CN202310871566.0A CN202310871566A CN117201505A CN 117201505 A CN117201505 A CN 117201505A CN 202310871566 A CN202310871566 A CN 202310871566A CN 117201505 A CN117201505 A CN 117201505A
Authority
CN
China
Prior art keywords
node
nodes
optimal
web server
upper layer
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.)
Pending
Application number
CN202310871566.0A
Other languages
Chinese (zh)
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.)
Huashu Cloud Technology Co ltd
Original Assignee
Huashu Cloud Technology 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 Huashu Cloud Technology Co ltd filed Critical Huashu Cloud Technology Co ltd
Priority to CN202310871566.0A priority Critical patent/CN117201505A/en
Publication of CN117201505A publication Critical patent/CN117201505A/en
Pending legal-status Critical Current

Links

Abstract

The invention discloses a method for dynamically selecting an optimal upper layer by a CDN system, which comprises the following steps: the edge node detects the availability of more than two upper nodes to obtain an availability detection result, judges whether the availability detection result is 200, if so, sets the upper nodes to be available, and if not, sets the upper nodes to be unavailable; the edge node detects the performance of more than two upper nodes to obtain the data transmission rate; the edge node selects an upper node with the highest data transmission rate as an optimal upper node, and the source is returned through the optimal upper node, so that the availability, performance and service quality of the CDN system are improved when the source is returned.

Description

Method for dynamically selecting optimal upper layer of CDN system
Technical Field
The invention relates to CDN technology, in particular to a method for dynamically selecting an optimal upper layer by a CDN system.
Background
The basic idea of CDN (content delivery network) is to avoid bottlenecks and links on the internet that may affect data transmission speed and stability as much as possible, so that content transmission is faster and more stable. The main setting mode is that a layer of intelligent virtual network formed by node servers is arranged at the network all over the internet on the basis of the existing internet, and the CDN system can redirect the request of the user to the service node closest to the user according to the network flow, the connection of each node, the load condition, the distance from the user, the response time and other comprehensive information. The method aims to enable the user to obtain the required content nearby, solve the problem of congestion of the Internet network and improve the response speed of the user for accessing the website.
The existing CDN (Content Delivery Network ) network back source needs to rely on a pre-configured back source link or node, especially when the network link quality is reduced, the back source link cannot be dynamically adjusted in real time, the network back source process is blocked for a period of time, and the back source link needs to be manually reconfigured, so that network experience of network users is poor and network operation and maintenance cost is high.
Currently, CDNs include edge nodes and upper nodes. When the traffic volume is small, the upper node can select a single node, and when the traffic volume reaches a certain amount, the upper node generally selects a plurality of upper nodes, so that the risk brought by the single node is avoided. When the IP address of the upper node is changed, a worker is required to manually adjust the cache configuration and send the cache configuration to all edge nodes so as to ensure the normal running of the CDN source.
However, there is a great risk in manually adjusting the operation of the cache configuration. The risk specifically includes: 1. with the increase of the edge nodes and the upper nodes, the updated upper node IP addresses need to be issued to hundreds of nodes, and the problem of high deployment pressure exists; 2. with the increase of clients accessing the edge node, huge manpower is required to be invested to maintain and operate the CDN, and the CDN is easy to cause faults along with very large operation risks, so that the operation and maintenance cost and the difficulty of planning the upper node are definitely increased; 3. when the network of the upper node is unstable and even fails, the CDN back source may become unavailable, which may further lead to degradation of quality of service.
Disclosure of Invention
In order to overcome the defects and the existing problems in the prior art, the invention provides a method for dynamically selecting an optimal upper layer by a CDN system.
In order to achieve the above purpose, the invention adopts the following technical scheme:
a method for dynamically selecting an optimal upper layer by a CDN system comprises the following steps:
the edge node detects the availability of more than two upper nodes to obtain an availability detection result, judges whether the availability detection result is 200, if so, sets the upper nodes to be available, and if not, sets the upper nodes to be unavailable;
the edge node detects the performance of more than two upper nodes to obtain the data transmission rate;
and the edge node selects an available upper node with the maximum data transmission rate as an optimal upper node, and returns the source through the optimal upper node.
Preferably, the step of performing source back through the optimal upper node specifically includes:
the web server reads an IP list of an upper node from the upper configuration file, and selects an IP address of the optimal upper node from the IP list, wherein the web server is deployed on the edge node;
the web server configures API parameters according to the IP address of the optimal upper node, the web server establishes communication with the optimal upper node according to the API parameters, and the edge node returns the source through the web server and the optimal upper node.
Preferably, the step of performing source returning by the edge node through the web server and the optimal upper node specifically includes:
and the web server judges whether the optimal upper node returns a source error code to the web server, if so, the web server establishes communication with other upper nodes, and the edge node returns the source through the web server and the other upper nodes.
Preferably, the step of performing source returning by the edge node through the web server and the optimal upper node specifically includes:
and the web server judges whether the optimal upper node returns a source error code to the web server, if not, the edge node returns the source through the web server and the optimal upper node.
Preferably, if the upper node is available, the availability of the upper node is set to 1.
Preferably, if the upper node is unavailable, the availability of the upper node is set to 0.
Preferably, the method further comprises:
the edge node loops the availability detection of the upper node according to the first timing time.
Preferably, the method further comprises:
the edge node loops the performance probing of the upper node according to the second timing time.
Preferably, the edge node is provided with an IP list of an upper node, the IP list of the upper node includes an IP address of the upper node, and the edge node performs availability detection and performance detection on the upper node according to the IP address of the upper node.
Preferably, the web server uses nginnx.
Compared with the prior art, the invention has the following outstanding and beneficial technical effects:
in the invention, the edge node can detect the availability and the performance of a plurality of upper nodes, and the optimal upper node is selected for source returning, so that the problem of reduced source returning service quality caused by unstable network or even faults of the upper nodes is avoided, and the availability, the performance and the service quality of the edge node during source returning are improved.
In the invention, when facing thousands of upper nodes, the CDN system automatically deploys the optimal upper nodes for the edge nodes, thereby reducing the pressure of system deployment and lowering the cost of operation and maintenance.
In the invention, the availability and performance detection are adopted to preliminarily eliminate the unstable or even unusable upper nodes of the network, and the optimal upper nodes are adopted to replace other upper nodes for source returning when source returning errors occur, so that the problems of low source returning efficiency and failure caused by unstable or even failure of the upper nodes are comprehensively avoided, and the availability, performance and service quality of the edge nodes for source returning are greatly improved.
In the invention, the edge node can carry out source returning through the web server and the optimal upper node, and the web server selects Nginx with high performance, less occupied memory and strong concurrency capacity, thereby ensuring the performance, efficiency and success rate of source returning.
Drawings
FIG. 1 is a schematic diagram of a system architecture of the present invention;
FIG. 2 is a flow chart of the steps of the availability detection of the present invention.
Detailed Description
The present invention is further described below with reference to the drawings and specific embodiments for the purpose of facilitating understanding by those skilled in the art.
As shown in fig. 1 and fig. 2, the present embodiment provides a CDN system, which includes a source station, upper nodes, edge nodes, and a user end, where the number of upper nodes is at least two. The source station is connected to more than two upper nodes, the more than two upper nodes are connected to the edge node, and the user end is connected to the edge node.
The source station may also be referred to as a superior server, where the data resources are initially stored. The upper node is used for caching the data resources pulled from the source station and distributing the data resources to the edge nodes. The edge node is used for caching the data resources pulled from the upper node so as to share the pressure of the upper node, and is also used for distributing the data resources to the user terminal so as to complete the data service of the user terminal. The user end is used for accessing the edge node, and the data resource is acquired from the source station or the upper node through the edge node. In practical use, the netizen can access the edge node nearest to the user terminal through the user terminal, and acquire the data resource from the source station or the upper layer node through the edge node, so as to achieve the effect of quick access. The user terminal can be a computer, a notebook, a mobile phone and the like.
The CDN system also comprises a web server, wherein each edge node is provided with a web server, and the web server serves as an application service on the edge node. The edge node may establish communication with the upper node through the web server. In this embodiment, the web server selects ng. The web server is preset with an upper layer configuration file, the upper layer configuration file comprises an IP list of upper layer nodes, and the IP list of the upper layer nodes comprises IP addresses of all the upper layer nodes.
The embodiment also provides a method for dynamically selecting an optimal upper layer by using the CDN system, including the CDN system, further including:
the edge node detects the availability of more than two upper nodes to obtain an availability detection result, judges whether the availability detection result is 200, if so, sets the upper nodes to be available, and if not, sets the upper nodes to be unavailable;
the above steps may be referred to as an availability detection procedure for the upper node. As shown in fig. 2, if the edge node detects availability of the upper node, the edge node initiates an availability detection request to the upper node through the detection interface, and after receiving the availability detection request, the upper node judges whether the availability of the upper node is normal, if so, the availability detection result is set to be 200 and fed back to the edge node, and the edge node sets the upper node as available; if not, the availability detection result is set to be not 200, and the availability detection result is fed back to the edge node, and the edge node sets the upper node as unavailable. In this embodiment, the probe interface includes, but is not limited to, at least one of an API interface, an info interface, and a check_health interface.
The availability probe is a three-digit code of the response state of the upper node under the hypertext transfer protocol standard (Hypertext Transfer Protocol, HTTP), which is also called an HTTP status code, and is not manually adjusted. In the availability detection flow, if the availability detection result is 200, it indicates that the upper node is an HTTP status code in a normal response state, and the corresponding upper node is available. If the availability detection result is not 200, the upper node is an HTTP status code of an abnormal response status, and the corresponding upper node is unavailable.
The edge node detects the performance of more than two upper nodes to obtain the data transmission rate;
the above steps may be referred to as a performance probing procedure of the upper node. And if the edge node detects the performance of the upper node, the edge node initiates a performance detection request to the upper node, and after receiving the performance detection request, the upper node detects the data transmission rate of the upper node and feeds the detected data transmission rate back to the edge node.
The data transmission rate of the upper node includes at least one of an uplink rate and a downlink rate of the upper node. The uplink rate of the upper node refers to the rate at which the upper node downloads data from the source station. The downlink rate of the upper node refers to the rate at which the upper node transmits data to the edge node.
The edge node selects an upper node with the maximum data transmission rate as an optimal upper node, and returns a source through the optimal upper node;
in the above steps, the available upper node refers to an upper node set to be available in the availability detection flow of the upper node. The upper node with the maximum data transmission rate refers to the upper node with the maximum data transmission rate in the performance detection flow of the upper node.
If the upper node is available, i.e., the upper node can be accessed, the availability of the upper node is set to 1. The available upper nodes are arranged in the CDN system by adopting a programming language so as to be convenient for the CDN system to recognize and read.
If the upper node is unavailable, i.e. the upper node cannot be accessed, the availability of the upper node is set to 0. The unavailable upper nodes are arranged in the CDN system in a program language form so as to be convenient for the CDN system to recognize and read.
The method further comprises the steps of:
the edge node circulates the availability detection of the upper node according to the first timing time;
in the above steps, the edge node regularly repeats the availability detection flow of the upper node according to the first timing time, so as to update the availability of the upper node regularly. In this embodiment, the first timing time is 5 minutes.
The method further comprises the steps of:
the edge node detects the performance of the upper layer node according to the second timing time;
in the above step, the edge node regularly repeats the performance detection flow of the upper node according to the second timing time, so as to update the data transmission rate of the upper node at regular time. In this embodiment, the second timing time may be 5 minutes.
The step of returning the source through the optimal upper node specifically comprises the following steps:
the web server reads an IP list of an upper node from the upper configuration file, and selects an IP address of the optimal upper node from the IP list, wherein the web server is deployed on the edge node;
in the above steps, the upper layer configuration file is preset in the web server, where the upper layer configuration file includes an IP list of upper layer nodes, and the IP list of upper layer nodes includes IP addresses of each upper layer node, that is, the IP list of upper layer nodes includes the IP address of the optimal upper layer node.
In the process that the web server selects the IP address of the optimal upper node from the IP list, the web server can select the IP address of the corresponding upper node from the IP list according to the domain name of the optimal upper node, so that the IP address of the optimal upper node is configured in the web server.
The web server configures API parameters according to the IP address of the optimal upper node, the web server establishes communication with the optimal upper node according to the API parameters, and the edge node returns a source through the web server and the optimal upper node;
in the above steps, the web server is provided with an API interface, and the web server configures the API interface according to the API parameters, so that the API interface and the optimal upper node establish communication.
The edge node is provided with an IP list of an upper node, the IP list of the upper node comprises an IP address of the upper node, and a unique corresponding relation exists between the IP address of the upper node and a domain name of the upper node. In actual processing, the edge node periodically performs availability detection and performance detection on the corresponding upper node according to the IP address of the upper node.
The web page server selects Nginx. Nginx is a high-performance HTTP and reverse proxy web server developed by Igore Saiodate, version Nginx 1.21.6, release day 2022, month 01 and 25.
The edge node carries out the step of source returning through the webpage server and the optimal upper node, and specifically comprises the following steps:
the web server judges whether the optimal upper node sends a source error code back to the web server, if so, the web server establishes communication with other upper nodes, and the edge node returns the source through the web server and the other upper nodes; if not, the edge node returns the source through the web server and the optimal upper node.
In the above steps, the other upper nodes refer to upper nodes other than the optimal upper node among the upper nodes performing the availability detection and the performance detection. The problem that the source returning error can occur when the edge node returns the source through the space between the web server and the optimal upper node is considered. For this reason, if the edge node carries on the error of source back through the web server and optimal upper node, then produce the error code of source back; judging whether to generate a source return error code, if so, suggesting communication by the web server and other upper nodes, and enabling the edge node to return the source through the web server and other upper nodes, thereby ensuring normal operation of the source return.
The above embodiments are only preferred embodiments of the present invention, and are not intended to limit the scope of the present invention in this way, therefore: all equivalent changes in structure, shape and principle of the invention should be covered in the scope of protection of the invention.

Claims (9)

1. A method for dynamically selecting an optimal upper layer in a CDN system, comprising:
the edge node detects the availability of more than two upper nodes to obtain an availability detection result, judges whether the availability detection result is 200, if so, sets the upper nodes to be available, and if not, sets the upper nodes to be unavailable;
the edge node detects the performance of more than two upper nodes to obtain the data transmission rate;
and the edge node selects an available upper node with the maximum data transmission rate as an optimal upper node, and returns the source through the optimal upper node.
2. The method for dynamically selecting an optimal upper layer in a CDN system according to claim 1, wherein the step of performing back-sourcing through an optimal upper layer node specifically comprises:
the web server reads an IP list of an upper node from the upper configuration file, and selects an IP address of the optimal upper node from the IP list, wherein the web server is deployed on the edge node;
the web server configures API parameters according to the IP address of the optimal upper node, the web server establishes communication with the optimal upper node according to the API parameters, and the edge node returns the source through the web server and the optimal upper node.
3. The method for dynamically selecting an optimal upper layer in a CDN system according to claim 2, wherein the step of performing source back by the edge node through the web server and the optimal upper layer node specifically includes:
and the web server judges whether the optimal upper node returns a source error code to the web server, if so, the web server establishes communication with other upper nodes, and the edge node returns the source through the web server and the other upper nodes.
4. The method for dynamically selecting an optimal upper layer for a CDN system of claim 1 wherein the availability of an upper node is set to 1 if the upper node is available.
5. The method for dynamically selecting an optimal upper layer of a CDN system of claim 1 wherein the availability of an upper node is set to 0 if the upper node is unavailable.
6. The method for dynamically selecting an optimal upper layer in a CDN system of claim 1, further comprising:
the edge node loops the availability detection of the upper node according to the first timing time.
7. The method for dynamically selecting an optimal upper layer in a CDN system of claim 1, further comprising:
the edge node loops the performance probing of the upper node according to the second timing time.
8. The method for dynamically selecting an optimal upper layer of a CDN system according to claim 1, wherein an IP list of upper layer nodes is provided in the edge nodes, the IP list of upper layer nodes includes IP addresses of upper layer nodes, and the edge nodes perform availability detection and performance detection on the upper layer nodes according to the IP addresses of the upper layer nodes.
9. The method for dynamically selecting an optimal upper layer in a CDN system of claim 1 wherein the web server is implemented using nginnx.
CN202310871566.0A 2023-07-17 2023-07-17 Method for dynamically selecting optimal upper layer of CDN system Pending CN117201505A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310871566.0A CN117201505A (en) 2023-07-17 2023-07-17 Method for dynamically selecting optimal upper layer of CDN system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310871566.0A CN117201505A (en) 2023-07-17 2023-07-17 Method for dynamically selecting optimal upper layer of CDN system

Publications (1)

Publication Number Publication Date
CN117201505A true CN117201505A (en) 2023-12-08

Family

ID=89002383

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310871566.0A Pending CN117201505A (en) 2023-07-17 2023-07-17 Method for dynamically selecting optimal upper layer of CDN system

Country Status (1)

Country Link
CN (1) CN117201505A (en)

Similar Documents

Publication Publication Date Title
US9778999B2 (en) Adaptive private network with geographically redundant network control nodes
USRE45806E1 (en) System and method for the optimization of database access in data base networks
US11343306B2 (en) Method, device and system for downloading data block of resource file
CN111615066B (en) Distributed micro-service registration and calling method based on broadcast
EP2787742B1 (en) Method and system for transmitting network video
WO2020019472A1 (en) Rating method for service node, domain name system (dns) scheduling method and server
JPH10307783A (en) Site access control system and recording medium
CN103051551A (en) Distributed system and automatic maintaining method for same
CN101635728A (en) Method and system for data synchronization in content distribution network
CN101977236A (en) Large-file multipoint distribution system
CN107682442B (en) Web connection method and device
CN112311896B (en) Health examination method, device, equipment and computer readable storage medium
CN113824723A (en) End-to-end system solution applied to audio and video data transmission
CN105554099A (en) Method and device for balancing load of acquisition servers
WO2019011142A1 (en) Network link switching method and system
WO2019149166A1 (en) Network access method, client, network interaction method, and scheduling and network systems
CN112398802B (en) Data downloading method and related equipment
CN117201505A (en) Method for dynamically selecting optimal upper layer of CDN system
US11973824B2 (en) Method for data transmission of audio and video in end-to-end system
CN112969244B (en) Session recovery method and device
CN111131367B (en) Distributed access service processing method and device
CN106686034B (en) CDN scheduling enhancement method, device and system
CN105229990B (en) The method and apparatus for loading webpage
CN100334840C (en) Method for push of service parameter information actively initiated by network management center
US10536875B2 (en) System and method for seamless TCP connection handoff

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