Mirror acceleration system, method and apparatus
By dynamically selecting compute nodes in the P2P network as alternative root nodes, the network congestion problem caused by source node failure is solved, enabling efficient image data transmission and container cold start, accelerating the image distribution process, and reducing system overhead.
Patent Information
- Application Number
- CN202210898260.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-28
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-07-28
AI Technical Summary
In existing technologies, when dedicated origin nodes fail or are under maintenance, the efficiency of P2P network transmission decreases, network congestion occurs in scenarios of large-scale parallel distribution of image repositories, container cold start time is prolonged, and system overhead is large.
A decentralized P2P networking structure is adopted. Through P2P management and service devices, computing nodes in the P2P network are dynamically selected as alternative root nodes to replace abnormal root nodes. Idle resources of computing nodes are used for mirrored data transmission, and cluster networking information is dynamically updated to ensure data transmission efficiency.
It ensures efficient data transfer even when the origin node is unavailable, supports accelerated large-scale and large image distribution, reduces system overhead, and improves the cold start speed of container images.
Smart Images

Figure CN115499449B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of cloud computing technology, specifically to image acceleration systems, methods and apparatus, and electronic devices. Background Technology
[0002] A distributed serverless computing platform is a public cloud FaaS (Function-as-a-Service) product that enables cloud application developers to more easily run and manage microservice applications.
[0003] Distributed serverless computing platforms support containers and provide container image services, allowing users to deploy images of cloud-native applications and supporting image startup acceleration, thus becoming a secure hosting and efficient distribution platform for cloud-native applications. A typical method for accelerating container image cold starts is to reduce the overall load on a single image repository when application instances are scaled up in batches through on-demand image reading and P2P distribution. The container image acceleration system obtains data from the image repository through dedicated origin nodes (SuperNodes) and distributes image data using a tree-structured P2P network. Compute nodes (container hosts) within the tree-structured P2P network can transfer data to each other. When application instances are scaled up in batches, data can be quickly distributed to all compute nodes, achieving container startup with a latency of seconds.
[0004] However, in the process of implementing this invention, the inventors discovered that the above solution has at least the following problems: 1) When a dedicated origin node is unavailable due to failure or maintenance, it will affect the transmission efficiency of the P2P network. In scenarios of large-scale parallel distribution of image repositories, network congestion will occur, resulting in longer container cold start times and hindering the acceleration of large-scale and large image distribution. Specifically, due to stability and other reasons, origin nodes may be subject to machine recycling, such as during upgrades. Therefore, the lifecycle of origin nodes is unreliable. The current P2P network structure cannot adapt to changes in origin nodes, resulting in a lack of alternative origin nodes when problems occur, ultimately reducing the number of origin nodes. Compute nodes need to pass through origin nodes to obtain image data, and when the number of origin nodes decreases, data transmission efficiency will be affected. 2) Dedicated origin nodes exist independently of compute nodes within the P2P network, resulting in significant system overhead. Summary of the Invention
[0005] This application provides an image acceleration system to solve the problems of high latency and high system overhead during image cold starts when the origin node is unavailable in existing technologies. This application also provides an image acceleration method, apparatus, and electronic device.
[0006] This application provides a mirror acceleration system, including:
[0007] A P2P management device, deployed on the management node side, is used to acquire system information of multiple proxy nodes within a mirror service cluster based on a P2P network structure, and information on abnormal root nodes. The root nodes and proxy nodes are used to launch application instances in a virtual runtime environment based on mirror data. The root node is also used to acquire mirror data from the mirror data source. Based on the system information, a node is selected from the multiple proxy nodes as a replacement node for the abnormal root node. The abnormal root node information is removed from the cluster network information, and the replacement node in the cluster network information is set as the root node. Updated cluster network information is provided to the computing nodes within the mirror service cluster.
[0008] The P2P service device is deployed on the computing node side to obtain the system information of the computing node and provide the system information to the P2P management device; obtain the updated cluster networking information provided by the P2P management device; and process the mirrored data according to the updated cluster networking information.
[0009] This application also provides a mirroring acceleration method, applied to a management node, including:
[0010] The system information of multiple proxy nodes in the image service cluster based on the P2P network structure and the information of the root node that has an anomaly are obtained. The root node and the proxy node are used to start application instances in the virtual running environment according to the image data. The root node is also used to obtain image data from the image data source.
[0011] Based on the system information, a node is selected from the plurality of proxy nodes as a replacement node for the abnormal root node;
[0012] Remove the abnormal root node information from the cluster networking information and set the alternative node in the cluster networking information as the root node;
[0013] The updated cluster networking information is provided to the computing nodes within the image service cluster.
[0014] Optionally, selecting a node from the plurality of proxy nodes as a replacement node for the abnormal root node based on the system information includes:
[0015] The score of the proxy node is determined based on at least one of the following data: memory idle ratio, CPU idle ratio, disk usage, and machine startup time.
[0016] The replacement node is determined from the plurality of proxy nodes according to their score order.
[0017] Optional, also includes:
[0018] Obtain the compute node information that has been rejoined to the image service cluster;
[0019] In the cluster networking information, set the newly added compute nodes as proxy nodes.
[0020] Optional, also includes:
[0021] Obtain information about the proxy nodes that are malfunctioning;
[0022] Remove the abnormal agent node information from the cluster networking information.
[0023] Optionally, providing updated cluster networking information to the computing nodes within the mirror service cluster includes:
[0024] The updated cluster networking information is sent to the computing nodes within the mirror service cluster via broadcast.
[0025] Optionally, obtaining the root node information where the anomaly occurred includes:
[0026] If the root node anomaly detection condition is met, the information of the abnormal root node is obtained. The root node anomaly detection condition includes, but is not limited to, reaching the root node anomaly detection cycle.
[0027] Optionally, the root node information that caused the anomaly can be obtained using at least one of the following methods:
[0028] If the system information of the root node meets the node abnormality conditions, then the root node is determined to be abnormal.
[0029] If the heartbeat keep-alive with the P2P service device on the root node fails, the root node is determined to be abnormal.
[0030] If an error message is received from the root node, it is determined that the root node has encountered an error.
[0031] Optionally, the execution entity of the method is a management node, which includes: a P2P management device, a computing node management device, and a management service device;
[0032] The computing node includes: a P2P service device, a computing node proxy device, and a container acceleration device;
[0033] The system information is obtained in the following manner:
[0034] The P2P management device obtains system information by maintaining a heartbeat with the P2P service device.
[0035] Optional, also includes:
[0036] If the P2P management device determines that the conditions for obtaining computing node information are met, it obtains the computing node information of the mirror service cluster through the computing node management device. The conditions for obtaining computing node information include, but are not limited to, reaching the node information acquisition cycle.
[0037] By maintaining a heartbeat with the P2P service device, information on available computing nodes can be obtained.
[0038] The P2P management device obtains system information, including: (This is achieved by maintaining a heartbeat with the P2P service device.)
[0039] The P2P management device obtains system information by performing heartbeat keep-alive with the P2P service device of the available computing nodes.
[0040] This application also provides a mirroring acceleration method applied to a compute node, including:
[0041] Obtain system information of computing nodes, which belong to a mirror service cluster based on a P2P network structure;
[0042] The system information is provided to the P2P management device so that if the P2P management device determines that there is an abnormal root node in the mirror service cluster, it selects a node from the multiple proxy nodes in the mirror service cluster as a replacement node for the abnormal root node based on the system information of the multiple proxy nodes in the mirror service cluster; it removes the abnormal root node information from the cluster networking information and sets the replacement node in the cluster networking information as the root node.
[0043] Obtain updated cluster networking information provided by the P2P management device;
[0044] Based on the updated cluster networking information, the mirror data is processed. The root node is used to obtain mirror data from the mirror data source and start application instances in the virtual runtime environment based on the mirror data. The proxy node is used to start application instances in the virtual runtime environment based on the mirror data.
[0045] This application also provides a mirror acceleration method, including:
[0046] The system obtains system information of multiple proxy nodes and abnormal root node information within the image service cluster based on the P2P network structure. The root node is used to obtain image data from the image data source and start application instances in the virtual runtime environment based on the image data. The proxy nodes are used to start application instances in the virtual runtime environment based on the image data.
[0047] Based on the system information, a node is selected from the plurality of proxy nodes as a replacement node for the abnormal root node;
[0048] Remove the abnormal root node information from the cluster networking information and set the alternative node in the cluster networking information as the root node;
[0049] Process the mirrored data based on the updated cluster networking information.
[0050] This application also provides a container image acceleration device, including:
[0051] The information acquisition unit is used to acquire system information of multiple proxy nodes in the image service cluster based on the P2P network structure, and information of the root node that has an anomaly. The root node is used to acquire image data from the image data source and start application instances in the virtual running environment based on the image data. The proxy nodes are used to start application instances in the virtual running environment based on the image data.
[0052] The root node reassignment unit is used to select a node from the plurality of proxy nodes as a replacement node for the abnormal root node based on the system information.
[0053] The network information update unit is used to remove the abnormal root node information from the cluster network information and set the alternative node in the cluster network information as the root node.
[0054] The mirror data processing unit is used to process mirror data based on the updated cluster networking information.
[0055] This application also provides an electronic device, including:
[0056] Processor and memory; memory for storing a program that implements the above method, the device being powered on and the program of the method being run by the processor.
[0057] This application also provides a computer-readable storage medium storing instructions that, when executed on a computer, cause the computer to perform the various methods described above.
[0058] This application also provides a computer program product including instructions that, when run on a computer, cause the computer to perform the various methods described above.
[0059] Compared with the prior art, this application has the following advantages:
[0060] The image acceleration system provided in this application includes a P2P management device that can be deployed on the management node side of an image service cluster based on a P2P network structure, and a P2P service device that can be deployed on the computing node side within the P2P network. The P2P management device is used to obtain system information of multiple proxy nodes within the image service cluster and information of abnormal root nodes. The root nodes and proxy nodes are used to launch application instances in a virtual runtime environment based on image data. The root node is also used to obtain image data from an image data source. Based on the system information, the device selects a node from the multiple proxy nodes as a replacement node for the abnormal root node; it removes the abnormal root node information from the cluster network information and sets the replacement node in the cluster network information as the root node; and it provides updated cluster network information to the computing nodes within the image service cluster. The P2P service device is used to obtain the system information of the computing nodes and provide the system information to the P2P management device; it obtains the updated cluster network information provided by the P2P management device; and it processes the image data based on the updated cluster network information. This approach enables dynamic P2P network topology. Even if a root node goes offline for some reason, the P2P manager, upon detecting this change, will assign a new root node from the P2P network. This new root node will possess most of the necessary mirror data, achieving near-seamless root node replacement. This ensures a fixed number of root nodes for a given period, effectively guaranteeing data transmission efficiency even when some root nodes are unavailable, thus supporting accelerated large-scale and large-mirror distribution. Furthermore, this approach implements decentralized root nodes. All root nodes are selected from compute nodes within the P2P network, while the root and proxy nodes are traditional P2P peers, eliminating the need for additional dedicated root nodes. This effectively reduces system overhead. Furthermore, since decentralized origin nodes utilize the idle network and hard disk resources of compute nodes (container hosts) in the P2P network to pull images from the origin, these origin nodes can also launch application instances based on the images at the same time, so they will not affect online applications. Attached Figure Description
[0061] Figure 1 A schematic diagram of an embodiment of the mirror acceleration system provided in this application;
[0062] Figure 2 This application provides a schematic diagram illustrating the application scenarios of an embodiment of the image acceleration system.
[0063] Figure 3 Interactive diagrams of embodiments of the image acceleration system provided in this application;
[0064] Figure 4a A schematic diagram of the P2P network structure before the update of the embodiment of the mirror acceleration system provided in this application;
[0065] Figure 4b This application provides an updated P2P network structure diagram of an embodiment of the mirror acceleration system;
[0066] Figure 5 This application provides a schematic diagram of a P2P network service device representing an embodiment of a mirror acceleration system;
[0067] Figure 6 A flowchart illustrating an embodiment of the image acceleration method for management nodes provided in this application;
[0068] Figure 7 A flowchart illustrating a computing node embodiment of the image acceleration method provided in this application;
[0069] Figure 8 A flowchart illustrating an embodiment of the image acceleration method provided in this application. Detailed Implementation
[0070] Many specific details are set forth in the following description to provide a full understanding of this application. However, this application can be implemented in many other ways different from those described herein, and those skilled in the art can make similar extensions without departing from the spirit of this application; therefore, this application is not limited to the specific embodiments disclosed below.
[0071] This application provides a container image acceleration system, method, and apparatus, as well as an electronic device. To clearly illustrate the solutions provided in the embodiments of this application, the container image cold start acceleration technology will be described first. Then, the various solutions provided in the embodiments of this application will be described in detail in the following examples.
[0072] Serverless computing platforms are the infrastructure that supports user application systems (such as e-commerce platforms, instant messaging software, etc.). The platform prepares computing resources for users, runs code in an elastic and reliable manner, and provides functions such as log query, performance monitoring, and alarms. Users no longer need to manage infrastructure such as servers; they only need to write code and upload it to achieve rapid cloud migration and serverless architecture transformation of application systems.
[0073] For applications running on serverless computing platforms, a container image includes the packaged application and its dependencies, as well as information about the processes running at startup. Container images offer better portability and a richer toolchain ecosystem compared to code packages, but their accompanying application-irrelevant data (such as the operating system, command-line tools, and other files not needed by the application itself) can easily make the image bloated. During application instance startup, the image needs to be pulled from the image repository. Large images inevitably increase the amount of data that needs to be downloaded and decompressed, increasing the application instance's cold start time. For larger images, such as container images larger than 1GB before decompression, this can cause image pull delays of several minutes, significantly slowing down the application instance's cold start performance. This problem worsens with large-scale startups. The image repository may crash due to bandwidth exhaustion or excessive server pressure caused by concurrent image pulls.
[0074] To improve the cold start speed of container images, the serverless computing platform enables image startup acceleration for applications running in custom containers and using container image services. The principle behind this acceleration is that each time such an application is created or updated, the serverless computing platform pulls the image and transfers it to an accelerated image cache service within the platform. After the transfer is complete, most container image read requests are intercepted within the cluster, improving the cache hit rate. This eliminates the need for requests to fetch from the origin server, saving bandwidth consumption on container image service nodes and network image storage nodes, and removing the performance bottleneck of fetching image data over the network. This significantly improves the startup speed of custom container images in the application, bringing faster container image startup speeds to the computing platform and ultimately enhancing the end-to-end user experience. Enabling image acceleration can reduce image fetching time from minutes to seconds.
[0075] Container image acceleration systems sit as an acceleration layer between image storage and applications, supporting on-demand image reading and P2P image distribution. This reduces the overall load on a single image repository when compute nodes are scaled up in batches. A P2P image distribution network consists of multiple compute nodes, which can be container hosts or virtual machine hosts. The principle of P2P image distribution is to divide the image into many "blocks." If a compute node pulls a block, other nodes can pull data from that node, thus avoiding all requests hitting the image repository. For example, if an application container engine Docker client is deployed on a node, and one Docker client pulls a block, other Docker clients can pull data from that client.
[0076] In existing P2P image distribution technologies (also known as native P2P solutions), a fixed origin node is responsible for storing the relationship between "blocks" and clients (compute nodes). When client A makes its first request, it hits the origin node, which then pulls data from the image repository and forwards it to client A, recording the correspondence between these blocks and client A. Subsequent requests from other clients (B, C, ...) to these blocks are directed to the origin node, which tells the client (B, C, ...) to retrieve the data from the node that successfully pulled the data (client A), thus reducing the load on the image repository. As the applicant explained in the background section, when the origin node in this native P2P solution is unavailable, it affects the P2P network transmission efficiency, thus hindering large-scale and large image distribution acceleration. Furthermore, since the additionally deployed dedicated origin node exists independently of the P2P network, the system overhead is also relatively large.
[0077] It should be noted that the image service provided by the serverless computing platform can launch application instances not only within containers but also within virtual machines. Containers, compared to virtual machines, are characterized by their lightweight nature and rapid startup. While virtual machine images can easily reach tens of gigabytes in size, container images contain only the application and its required dependencies, thus achieving a size of a few hundred megabytes or even less. The following embodiments primarily illustrate the container image startup scenario, but the various solutions provided in this application can also be applied to virtual machine image startup scenarios.
[0078] First Embodiment
[0079] Please refer to Figure 1 This is a schematic diagram of the structure of an embodiment of the mirror acceleration system of this application. In this embodiment, the system includes: a P2P management device 1 and a P2P service device 2.
[0080] The system provided in this application embodiment adopts a decentralized cluster networking logic (NodeList). Through the cooperation of P2P management device 1 and P2P service device 2, it manages the P2P topology logic and achieves a container image acceleration method with reusable computing nodes. Specifically, the system removes the fixed dedicated origin nodes found in native P2P schemes, dividing peer nodes in the P2P network into two categories: root nodes and agent nodes. Agent nodes are responsible for launching application instances using container images, while root nodes not only launch application instances using container images but also utilize idle network and hard disk resources of computing nodes to handle data return to the origin. Through P2P management device 1, when some root nodes are detected to be offline, the system selects replacement root nodes from other agent nodes based on their operational status in the P2P network. This dynamically assigns origin nodes, ensuring a fixed number of origin nodes are available for a period of time, thus supporting large-scale and large image distribution acceleration.
[0081] like Figure 2 As shown, in this embodiment, the serverless computing platform includes a container image server cluster, which may include at least one image repository, which can be deployed on the storage node side, a management node (left side), and a tree-shaped P2P image distribution network composed of multiple compute nodes (EE, right side of the cluster). The system utilizes the tree-shaped P2P network to distribute image data. A portion of the nodes in the P2P network are root nodes. Root nodes can act as container hosts, responsible for launching application instances using container images, and can also act as origin pull nodes, utilizing the node's idle network and disk resources to pull images from the origin. After obtaining image data from the image repository, the root node stores the image data in the P2P network, effectively providing an accelerated image caching service. Another portion of the nodes in the P2P network are proxy nodes. Proxy nodes act as container hosts. Proxy nodes can transfer image data to each other. When application instances are scaled up in batches, image data can be quickly distributed to all compute nodes (including root nodes and proxy nodes), thereby achieving container startup with a latency of seconds.
[0082] like Figure 3As shown, P2P management device 1 is used to obtain system information of multiple proxy nodes and abnormal root node information within the mirror service cluster based on the P2P network structure; select a node from the multiple proxy nodes as a replacement node for the abnormal root node based on the system information; remove the abnormal root node information from the cluster network information and set the replacement node in the cluster network information as the root node; and provide updated cluster network information to the computing nodes within the mirror service cluster. P2P service device 2 is used to obtain the system information of the computing nodes and provide the system information to P2P management device 1; obtain the updated cluster network information provided by P2P management device 1; and process the mirror data based on the updated cluster network information. The root node and the proxy nodes are used to start application instances in the virtual runtime environment based on the mirror data, and the root node is also used to obtain mirror data from the mirror data source.
[0083] The abnormal root node can be a root node that has malfunctioned or a root node that requires maintenance operations such as system upgrades.
[0084] The cluster networking information includes the role information of each computing node, which can be a root node or a proxy node. For example... Figure 4a As shown, the cluster network information NodeList includes the role information of each node, where Node-1, 6, and 2 are root nodes, and Node-3, 4, 5, 8, and 7 are root nodes. In this embodiment, the cluster network information is a list of cluster-level root nodes actively maintained by the management node.
[0085] This application proposes the concept of cluster network information (nodelist) and a technical concept that enables compute nodes to locate available root nodes and download image data by dynamically updating the cluster network information, allowing compute nodes to access those root nodes and download the image data. In this embodiment, the dynamic updating of cluster network information through the cooperation between the P2P management device and the P2P service device can adapt to more dynamic machine lifecycles and automatically remove unavailable nodes. Therefore, it can effectively improve fault tolerance probability, automatically maintain the P2P topology logical state, and thus improve the cold start speed of container images.
[0086] In this embodiment, the source node of the system is not fixed, but can dynamically change according to the operating status of the computing nodes within the P2P network. When a root node server becomes unusable due to failure or maintenance, the P2P management device 1 will decide which proxy node server to replace the root node and automatically take over its work. Figure 4b As shown, Figure 4aWhen the root node Node-6 is taken offline due to an upgrade, compute node Node-5 can be assigned as the new root node to replace Node-6. At this time, the role information of Node-6 is cleared from the cluster's NodeList, and Node-5 is marked as the root node. This approach ensures that there are always enough root nodes to retrieve data from the image repository under high concurrency, guaranteeing efficient data transmission and low latency for container image cold starts, achieving container startup with a latency of up to seconds.
[0087] In practice, compute nodes in a P2P network can periodically update cluster networking information (NodeList configuration file) to obtain the latest list of Roots and Agents within the cluster. When an image startup request reaches a compute node, that node first reads the cluster networking information from its local NodeList, thus enabling it to pull image data from nearby storage when starting the image.
[0088] like Figure 2 As shown, in specific implementation, the P2P management device 1 can broadcast updated cluster networking information to the computing nodes within the mirror service cluster. This approach effectively improves the efficiency of each computing node updating its cluster networking information.
[0089] The system information includes, but is not limited to: the power-on time of computing nodes, storage space usage information, memory space usage information, CPU usage information, and network speed.
[0090] In one example, the P2P management device 2 is specifically used to determine the score of the proxy node based on at least one of the following data: memory idle ratio, CPU idle ratio, disk usage, and machine startup time; and to determine the replacement node from the multiple proxy nodes according to the score order of the multiple proxy nodes.
[0091] In practice, a node's score is directly proportional to its memory idle rate, CPU idle rate, and disk usage, and inversely proportional to its machine startup time. For example, the score can be calculated using the following formula: Score = Memory Idle Rate * CPU Idle Rate * Disk Usage / Machine Startup Time. This approach allows the root node to have more idle network and hard drive resources for data fetching from the origin; therefore, it effectively improves the efficiency of pulling images from the origin.
[0092] In one example, the P2P management device 1 can obtain the abnormal root node information in the following way: if the root node anomaly detection condition is met, then the abnormal root node information is obtained. The root node anomaly detection condition includes, but is not limited to, reaching the root node anomaly detection cycle, such as checking for abnormal root nodes every minute. Using this method, abnormal root nodes can be detected periodically.
[0093] In one example, the P2P management device 1 can obtain the abnormal root node information by at least one of the following methods: if the system information of the root node meets the node abnormality conditions, the root node is determined to be abnormal, and the node abnormality conditions can be set according to application requirements; if the heartbeat keep-alive with the P2P service device on the root node fails, the root node is determined to be abnormal; if abnormal information sent by the root node is received, the root node is determined to be abnormal.
[0094] In practice, the P2P management device 1 can obtain the system information by maintaining a heartbeat with the P2P service device 2.
[0095] P2P service device 2 is responsible for managing the cluster networking information NodeList of its computing nodes. In one example, P2P service device 2 can communicate with P2P management device 1 via RPC and periodically collect system information on the node, including but not limited to boot time, available data disk space, and available memory space. P2P service device 2 can pull the required image files from the corresponding nodes according to the NodeList configuration file on its local machine.
[0096] Depend on Figure 2 As can be seen in one example, the management node includes a P2P management device 1 (P2P manager), and a compute node management device (EEManager) and a management service device (Admin_service) are also deployed on the management node side. EEManager and Admin_service are existing devices on the management node. EEManager is used to obtain information about multiple compute nodes (EEs) in the cluster, including the IP address, status, type, and other information of the compute nodes.
[0097] like Figure 5As shown, multiple compute nodes in the P2P network (including the root node and proxy nodes) each include a P2P service device 2 (P2PDaemon). The compute nodes also deploy compute node proxy devices (EEagent) and container acceleration devices (DADI Agent). DADI refers to a block-based data on-demand reading acceleration format. This approach allows P2P service device 2 to be located in bypass control of the compute nodes, without altering the existing application call chain. Both P2P management device 1 and P2P service device 2 are integrated into the existing container image acceleration system as plug-ins, achieving non-intrusive container image acceleration for production environment compute and management nodes. Therefore, it effectively reduces the modification cost of the container image acceleration system.
[0098] In one example, the P2P management device 1 is further configured to, if the conditions for obtaining computing node information are met, obtain the computing node information of the mirror service cluster through the computing node management device. The conditions for obtaining computing node information include, but are not limited to: reaching the node information acquisition cycle; the P2P management device 1 obtaining available computing node information by performing a heartbeat keep-alive with the P2P service device 2; and the P2P management device 1 obtaining the system information by performing a heartbeat keep-alive with the P2P service device 2 of the available computing nodes.
[0099] P2P management device 1 is responsible for managing the computing node machines within the P2P network, updating the latest cluster network information on each node, and removing unhealthy machines from the network. In practice, P2P management device 1 can periodically communicate with the computing node management device to obtain all computing node machines in the current cluster and filter out machines currently serving applications. P2P management device 1 can also periodically maintain activity by performing heartbeats with P2P service devices 2 on the computing nodes to obtain the latest system information of the machines, including their lifespan and remaining available data disk space. After each data collection, P2P management device 1 recalculates the network structure based on the latest data and assigns a new root node.
[0100] In one example, the P2P management device 1 is also used to obtain information about compute nodes that have rejoined the image service cluster; and to set the rejoined compute nodes as proxy nodes in the cluster network information. The P2P management device 1 can also be used to obtain information about abnormal proxy nodes; and to remove the abnormal proxy node information from the cluster network information. This processing method makes the P2P network structure self-healing, adapting to the addition and deletion of compute nodes. When an abnormal node appears, it will be removed from the network by the P2P management device 1, covering situations where the lifecycle of compute nodes is unpredictable in image startup acceleration scenarios; therefore, it can effectively ensure data transmission efficiency.
[0101] In practice, when a computing node malfunctions (such as network outages, insufficient system resources like memory / CPU), the P2P management device 1 will proactively abandon that node in the network logic after making a decision. For example, if a proxy node is about to be taken offline, the heartbeat keep-alive mechanism between the P2P management device 1 and the node's P2P service device 2 fails, the node is kicked out of the network and the announcement is made, while other nodes continue to provide data services as usual.
[0102] For example, if a root node is about to go offline and the heartbeat keep-alive mechanism between P2P management device 1 and the P2P service device 2 fails, an update to the NodeList will be broadcast to all available compute nodes. A new root node will be selected, and the cluster network information will be updated through communication between the P2P management device and P2P service device 2. This ensures that proxy nodes can address the new root node and prevents data transmission from stalling. For instance, if an image startup request lands on node A, node A will calculate the information for each layer of the image corresponding to the request, find the root node based on the layer information, and then send an image retrieval request to the root node. Upon receiving the image retrieval request, the root node will tell node A which node is the specific data source it needs; node A then retrieves the data from the corresponding node. If the root node receives an image retrieval request during a cold start (the first request for image data, with a cache miss), it will read the data from the data source.
[0103] As can be seen from the above embodiments, the image acceleration system provided in this application includes a P2P management device that can be deployed on the management node side of an image service cluster based on a P2P network structure, and a P2P service device that can be deployed on the computing node side within the P2P network. The P2P management device is used to obtain system information of multiple proxy nodes within the image service cluster and information of abnormal root nodes. The root nodes and proxy nodes are used to launch application instances in a virtual runtime environment based on image data. The root node is also used to obtain image data from the image data source. Based on the system information, a node is selected from the multiple proxy nodes as a replacement node for the abnormal root node. The abnormal root node information is cleared from the cluster network information, and the replacement node in the cluster network information is set as the root node. Updated cluster network information is provided to the computing nodes within the image service cluster. The P2P service device is used to obtain the system information of the computing nodes and provide the system information to the P2P management device. It also obtains the updated cluster network information provided by the P2P management device and processes the image data based on the updated cluster network information. This approach enables dynamic P2P network topology. Even if a root node goes offline for some reason, the P2P manager, upon detecting this change, will assign a new root node from the P2P network. This new root node will possess most of the necessary data, achieving near-seamless replacement. This ensures a fixed number of root nodes for a given period, effectively guaranteeing data transmission efficiency even when some root nodes are unavailable, thus supporting accelerated large-scale and large-mirror distribution. Furthermore, this approach implements decentralized root nodes. All root nodes are selected from computing nodes within the P2P network, while the root and proxy nodes are traditional P2P peers, eliminating the need for additional dedicated root nodes. This effectively reduces system overhead. Furthermore, since decentralized origin nodes utilize the idle network and hard disk resources of compute nodes (container hosts) in the P2P network to pull images from the origin, these origin nodes can also launch application instances based on the images at the same time, so they will not affect online applications.
[0104] Second Embodiment
[0105] In the above embodiments, a mirror acceleration system is provided. Correspondingly, this application also provides a mirror acceleration method. This method corresponds to the embodiments of the above system. Since the method embodiments are basically similar to the system embodiments, they are described simply, and relevant details can be found in the descriptions of the system embodiments. The method embodiments described below are merely illustrative.
[0106] Please refer to Figure 6This is a flowchart illustrating an embodiment of the image acceleration method of this application. In this embodiment, the method includes:
[0107] Step S601: Obtain system information of multiple proxy nodes in the mirror service cluster based on the P2P network structure, and information of the root node that has an anomaly.
[0108] The root node and the proxy node are used to launch application instances in the virtual runtime environment based on the image data. The root node is also used to obtain image data from the image data source. The virtual runtime environment can be a container or a virtual machine.
[0109] In one example, obtaining the abnormal root node information can be implemented as follows: if the root node anomaly detection condition is met, then the abnormal root node information is obtained. The root node anomaly detection condition includes, but is not limited to, reaching the root node anomaly detection cycle.
[0110] In one example, obtaining the abnormal root node information can be achieved in at least one of the following ways: if the root node's system information meets the node abnormality conditions, then the root node is determined to be abnormal; if the heartbeat keep-alive with the P2P service device on the root node fails, then the root node is determined to be abnormal; if abnormal information sent by the root node is received, then the root node is determined to be abnormal.
[0111] Step S603: Based on the system information, select a node from the plurality of proxy nodes as a replacement node for the abnormal root node.
[0112] In one example, step S603 may include the following sub-steps: determining the score of the proxy node based on at least one of the following data: memory idle ratio, CPU idle ratio, disk usage, and machine startup time; and determining the replacement node from the multiple proxy nodes according to the score order of the multiple proxy nodes.
[0113] Step S605: Remove the abnormal root node information from the cluster networking information and set the alternative node in the cluster networking information as the root node.
[0114] Step S607: Provide updated cluster networking information to the computing nodes within the image service cluster.
[0115] In one example, step S607 can be implemented as follows: by broadcasting the updated cluster networking information to the computing nodes within the image service cluster.
[0116] In one example, the method may further include the following steps: obtaining the compute node information that has rejoined the image service cluster; and setting the rejoined compute node as a proxy node in the cluster networking information.
[0117] In one example, the method may further include the following steps: obtaining information about the abnormal agent nodes; and removing the abnormal agent node information from the cluster networking information.
[0118] In one example, the execution entity of the method is a management node, which includes: a P2P management device, a compute node management device, and a management service device; the compute node includes: a P2P service device, a compute node proxy device, and a container acceleration device; the system information can be obtained in the following way: the P2P management device obtains the system information by performing a heartbeat keep-alive with the P2P service device.
[0119] In one example, the method may further include the following steps: if the P2P management device determines that the conditions for obtaining computing node information are met, then the computing node management device obtains the computing node information of the mirror service cluster. The conditions for obtaining computing node information include, but are not limited to: reaching the node information acquisition cycle; obtaining available computing node information by performing a heartbeat keep-alive with the P2P service device; and the P2P management device obtaining the system information by performing a heartbeat keep-alive with the P2P service device of the available computing nodes.
[0120] Third Embodiment
[0121] In the above embodiments, a mirror acceleration method is provided. Correspondingly, this application also provides a mirror acceleration device. This device corresponds to the embodiments of the above method. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments. The device embodiments described below are merely illustrative.
[0122] This application also provides a mirror acceleration device, including: an information acquisition unit, a root node reassignment unit, a network information update unit, and an update data sending unit.
[0123] The information acquisition unit is used to acquire system information of multiple proxy nodes in the image service cluster based on the P2P network structure, and information of the root node that has an anomaly. The root node is used to acquire image data from the image data source and start application instances in the virtual running environment based on the image data. The proxy nodes are used to start application instances in the virtual running environment based on the image data.
[0124] The root node reassignment unit is used to select a node from the plurality of proxy nodes as a replacement node for the abnormal root node based on the system information.
[0125] The network information update unit is used to remove the abnormal root node information from the cluster network information and set the alternative node in the cluster network information as the root node.
[0126] The data sending unit is used to provide updated cluster networking information to the computing nodes within the image service cluster.
[0127] Fourth embodiment
[0128] In the above embodiments, a mirror acceleration system is provided. Correspondingly, this application also provides a mirror acceleration method. This method corresponds to the embodiments of the above system. Since the method embodiments are basically similar to the system embodiments, they are described simply, and relevant details can be found in the descriptions of the system embodiments. The method embodiments described below are merely illustrative.
[0129] Please refer to Figure 7 This is a flowchart illustrating an embodiment of the image acceleration method of this application. In this embodiment, the method includes:
[0130] Step S701: Obtain system information of the computing node, which belongs to a mirror service cluster based on a P2P network structure.
[0131] Step S703: Provide the system information to the P2P management device so that if the P2P management device determines that there is an abnormal root node in the mirror service cluster, it selects a node from the multiple proxy nodes in the mirror service cluster as a replacement node for the abnormal root node based on the system information of the multiple proxy nodes in the mirror service cluster; it removes the abnormal root node information from the cluster networking information and sets the replacement node in the cluster networking information as the root node.
[0132] Step S704: Obtain the updated cluster networking information provided by the P2P management device.
[0133] Step S705: Process the mirror data according to the updated cluster networking information.
[0134] The root node is used to obtain image data from the image data source and start application instances in the virtual runtime environment based on the image data. The proxy node is used to start application instances in the virtual runtime environment based on the image data.
[0135] In one example, the method may further include the following steps: obtaining abnormal information of computing nodes; providing the abnormal information to a P2P management device so that the P2P management device can obtain system information of multiple proxy nodes after receiving the abnormal information sent by the root node; and clearing the proxy node information from the cluster networking information after receiving the abnormal information sent by the proxy node.
[0136] Fifth embodiment
[0137] In the above embodiments, a mirror acceleration method is provided. Correspondingly, this application also provides a mirror acceleration device. This device corresponds to the embodiments of the above method. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments. The device embodiments described below are merely illustrative.
[0138] This application also provides a mirror acceleration device, including: a system information acquisition unit, a system information sending unit, an update information acquisition unit, and a mirror data processing unit.
[0139] The system information acquisition unit is used to acquire system information of computing nodes, which belong to a mirror service cluster based on a P2P network structure.
[0140] The system information sending unit is used to provide the system information to the P2P management device, so that if the P2P management device determines that there is an abnormal root node in the mirror service cluster, it selects a node from the multiple proxy nodes in the mirror service cluster as a replacement node for the abnormal root node based on the system information of the multiple proxy nodes in the mirror service cluster; it removes the abnormal root node information from the cluster networking information and sets the replacement node in the cluster networking information as the root node.
[0141] The update information acquisition unit is used to acquire the updated cluster networking information provided by the P2P management device.
[0142] The mirror data processing unit is used to process mirror data according to the updated cluster networking information. The root node is used to obtain mirror data from the mirror data source and start application instances in the virtual runtime environment according to the mirror data. The proxy node is used to start application instances in the virtual runtime environment according to the mirror data.
[0143] Sixth Embodiment
[0144] In the above embodiments, a mirror acceleration system is provided. Correspondingly, this application also provides a mirror acceleration method. This method corresponds to the embodiments of the above system. Since the method embodiments are basically similar to the system embodiments, they are described simply, and relevant details can be found in the descriptions of the system embodiments. The method embodiments described below are merely illustrative.
[0145] Please refer to Figure 8 This is a flowchart illustrating an embodiment of the image acceleration method of this application. In this embodiment, the method includes:
[0146] Step S801: Obtain system information of multiple proxy nodes in the mirror service cluster based on the P2P network structure, and information of the root node that has an anomaly.
[0147] The root node is used to obtain image data from the image data source and start application instances in the virtual runtime environment based on the image data. The proxy node is used to start application instances in the virtual runtime environment based on the image data.
[0148] Step S803: Based on the system information, select a node from the plurality of proxy nodes as a replacement node for the abnormal root node.
[0149] Step S805: Remove the abnormal root node information from the cluster networking information and set the alternative node in the cluster networking information as the root node.
[0150] Step S807: Process the mirror data based on the updated cluster networking information.
[0151] Seventh Embodiment
[0152] In the above embodiments, a mirror acceleration method is provided. Correspondingly, this application also provides a mirror acceleration device. This device corresponds to the embodiments of the above method. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple, and relevant parts can be referred to in the description of the method embodiments. The device embodiments described below are merely illustrative.
[0153] This application also provides a mirror acceleration device, including: an information acquisition unit, a root node reassignment unit, a network information update unit, and a mirror data processing unit.
[0154] The information acquisition unit is used to acquire system information of multiple proxy nodes in the image service cluster based on the P2P network structure, and information of the root node that has an anomaly. The root node is used to acquire image data from the image data source and start application instances in the virtual running environment based on the image data. The proxy nodes are used to start application instances in the virtual running environment based on the image data.
[0155] The root node reassignment unit is used to select a node from the plurality of proxy nodes as a replacement node for the abnormal root node based on the system information.
[0156] The network information update unit is used to remove the abnormal root node information from the cluster network information and set the alternative node in the cluster network information as the root node.
[0157] The mirror data processing unit is used to process mirror data based on the updated cluster networking information.
[0158] Eighth embodiment
[0159] In the above embodiments, a mirror acceleration method is provided. Correspondingly, this application also provides an electronic device. This device corresponds to the embodiments of the above method. Since the device embodiments are basically similar to the method embodiments, the description is relatively simple, and relevant details can be found in the description of the method embodiments. The device embodiments described below are merely illustrative.
[0160] This application also provides an electronic device, including a processor and a memory. The memory stores a program for implementing the mirror acceleration method provided in the above-described method embodiments. The terminal is powered on and runs the program of the method through the processor.
[0161] Although this application discloses preferred embodiments as described above, it is not intended to limit this application. Any person skilled in the art can make possible changes and modifications without departing from the spirit and scope of this application. Therefore, the scope of protection of this application should be determined by the scope defined in the claims of this application.
[0162] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0163] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0164] 1. Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media 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 technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include non-transitory computer-readable media, such as modulated data signals and carrier waves.
[0165] 2. Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can 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.) containing computer-usable program code.
Claims
1. A mirror acceleration system, characterized in that, include: The P2P management device is deployed on the management node side to obtain system information of multiple proxy nodes in the mirror service cluster based on the P2P network structure, as well as information of the root node that has an anomaly. The root node and the proxy nodes are used to start application instances in the virtual running environment according to the mirror data. The root node is also used to obtain mirror data from the mirror data source. Based on the system information, a node is selected from the plurality of proxy nodes as a replacement node for the abnormal root node; Remove the abnormal root node information from the cluster networking information and set the alternative node in the cluster networking information as the root node; Provide updated cluster networking information to the computing nodes within the image service cluster; The P2P service device is deployed on the computing node side to obtain the system information of the computing node and provide the system information to the P2P management device. Obtain the updated cluster networking information provided by the P2P management device; The mirrored data is processed based on the updated cluster networking information.
2. A mirror acceleration method, characterized in that, Applied to management nodes, including: The system information of multiple proxy nodes in the image service cluster based on the P2P network structure and the information of the root node that has an anomaly are obtained. The root node and the proxy node are used to start application instances in the virtual running environment according to the image data. The root node is also used to obtain image data from the image data source. Based on the system information, a node is selected from the plurality of proxy nodes as a replacement node for the abnormal root node; Remove the abnormal root node information from the cluster networking information and set the alternative node in the cluster networking information as the root node; The updated cluster networking information is provided to the computing nodes within the image service cluster.
3. The method according to claim 2, characterized in that, The step of selecting a node from the plurality of proxy nodes as a replacement node for the abnormal root node based on the system information includes: The score of the proxy node is determined based on at least one of the following data: memory idle ratio, CPU idle ratio, disk usage, and machine startup time. The replacement node is determined from the plurality of proxy nodes according to their score order.
4. The method according to claim 2, characterized in that, Also includes: Obtain the compute node information that has been rejoined to the image service cluster; In the cluster networking information, set the newly added compute nodes as proxy nodes.
5. The method according to claim 2, characterized in that, Also includes: Obtain information about the proxy nodes that are malfunctioning; Remove the abnormal agent node information from the cluster networking information.
6. The method according to claim 2, characterized in that, Providing updated cluster networking information to the computing nodes within the mirror service cluster includes: The updated cluster networking information is sent to the computing nodes within the mirror service cluster via broadcast.
7. The method according to claim 2, characterized in that, Obtaining the root node information that caused the anomaly includes: If the root node anomaly detection condition is met, the information of the abnormal root node is obtained. The root node anomaly detection condition includes, but is not limited to, reaching the root node anomaly detection cycle.
8. The method according to claim 2, characterized in that, Obtain the root node information that has encountered the anomaly using at least one of the following methods: If the system information of the root node meets the node abnormality conditions, then the root node is determined to be abnormal. If the heartbeat keep-alive with the P2P service device on the root node fails, the root node is determined to be abnormal. If an error message is received from the root node, it is determined that the root node has encountered an error.
9. The method according to claim 2, characterized in that, The execution entity of the method is a management node, which includes: a P2P management device, a computing node management device, and a management service device; The computing node includes: a P2P service device, a computing node proxy device, and a container acceleration device; The system information is obtained in the following manner: The P2P management device obtains system information by maintaining a heartbeat with the P2P service device.
10. The method according to claim 9, characterized in that, Also includes: If the P2P management device determines that the conditions for obtaining computing node information are met, it obtains the computing node information of the mirror service cluster through the computing node management device. The conditions for obtaining computing node information include, but are not limited to, reaching the node information acquisition cycle. By maintaining a heartbeat with the P2P service device, information on available computing nodes can be obtained. The P2P management device obtains system information, including: (This is achieved by maintaining a heartbeat with the P2P service device.) The P2P management device obtains system information by performing heartbeat keep-alive with the P2P service device of the available computing nodes.
11. A mirror acceleration method, characterized in that, Applied to compute nodes, including: Obtain system information of computing nodes, which belong to a mirror service cluster based on a P2P network structure; The system information is provided to the P2P management device so that if the P2P management device determines that there is an abnormal root node in the mirror service cluster, it selects a node from the multiple proxy nodes in the mirror service cluster as a replacement node for the abnormal root node based on the system information of the multiple proxy nodes in the mirror service cluster; it removes the abnormal root node information from the cluster networking information and sets the replacement node in the cluster networking information as the root node. Obtain updated cluster networking information provided by the P2P management device; Based on the updated cluster networking information, the mirror data is processed. The root node is used to obtain mirror data from the mirror data source and start application instances in the virtual runtime environment based on the mirror data. The proxy node is used to start application instances in the virtual runtime environment based on the mirror data.
12. A mirror acceleration method, characterized in that, include: The system obtains system information of multiple proxy nodes and abnormal root node information within the image service cluster based on the P2P network structure. The root node is used to obtain image data from the image data source and start application instances in the virtual runtime environment based on the image data. The proxy nodes are used to start application instances in the virtual runtime environment based on the image data. Based on the system information, a node is selected from the plurality of proxy nodes as a replacement node for the abnormal root node; Remove the abnormal root node information from the cluster networking information and set the alternative node in the cluster networking information as the root node; Process the mirrored data based on the updated cluster networking information.
13. A container image acceleration device, characterized in that, include: The information acquisition unit is used to acquire system information of multiple proxy nodes in the image service cluster based on the P2P network structure, and information of the root node that has an anomaly. The root node is used to acquire image data from the image data source and start application instances in the virtual running environment based on the image data. The proxy nodes are used to start application instances in the virtual running environment based on the image data. The root node reassignment unit is used to select a node from the plurality of proxy nodes as a replacement node for the abnormal root node based on the system information. The network information update unit is used to remove the abnormal root node information from the cluster network information and set the alternative node in the cluster network information as the root node. The mirror data processing unit is used to process mirror data based on the updated cluster networking information.
14. An electronic device, characterized in that, include: Processor and memory; The memory is used to store a program for implementing the method according to any one of claims 2 to 12, the device being powered on and the program for running the method being executed by the processor.
Citation Information
Patent Citations
Method, network appliance and system for resource backup in structured P2P
CN101296108A
Networking live stream distribution method and device for digital broadcasting system and storage medium
CN110071942A