Encryption and decryption acceleration method and device, computer equipment and storage medium
By virtualizing the fast assisted acceleration hardware device into a virtual device and integrating it with the Kubernetes cluster, the CPU resource consumption problem of Ingress-Nginx when processing HTTPS requests is solved, and hardware acceleration of encryption and decryption operations is achieved, improving performance and scalability.
Patent Information
- Application Number
- CN202411034294.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-30
- Publication Date
- 2024-11-29
AI Technical Summary
In the cloud computing architecture, the SSL/TLS encryption and decryption operation of Ingress-Nginx in Kubernetes cluster consumes a lot of CPU resources when processing HTTPS requests, resulting in performance bottlenecks. The existing optimization methods fail to fundamentally solve the problem of CPU resource consumption. , and there are limitations to general hardware acceleration cards.
By virtualizing the fast assist acceleration hardware device into multiple virtual devices and deeply integrating with the inlet controller container of the container orchestration engine cluster, resource allocation is used to allocate resources, and hardware acceleration of encryption and decryption operations is achieved and CPU load is reduced.
It significantly improves the speed of Ingress-Nginx to handle HTTPS requests and network traffic performance, frees up CPU resources for other computing tasks, and improves system scalability and response speed.
Smart Images

Figure CN119051850A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of encryption and decryption technology, and in particular to an encryption and decryption acceleration method, device, computer equipment and storage medium. Background Art
[0002] With the rapid development of information technology, network security and data transmission efficiency have become the focus of Internet service providers. In cloud computing architecture, container orchestration engine (Kubernetes) cluster is a popular container orchestration system that is widely used to manage and automate the deployment, expansion and operation of containerized applications. Kubernetes cluster manages external access through Ingress controller, and the ingress controller container (Ingress-Nginx) is one of the most commonly used Ingress controllers.
[0003] Ingress-Nginx uses Nginx as a reverse proxy server to route external requests to the backend POD according to Ingress rules. However, when it comes to HTTPS requests, Ingress-Nginx needs to encrypt and decrypt SSL / TLS, which consumes a lot of CPU resources. In high-concurrency scenarios, CPU-intensive encryption and decryption operations become a performance bottleneck, limiting the scalability and response speed of the service.
[0004] Currently, software optimization is used to improve the performance of Ingress-Nginx. For example, by adjusting Nginx's configuration parameters, such as connection timeout settings, buffer size, etc., the burden on the server can be reduced to a certain extent. In addition, some research efforts focus on improving the handshake process of the SSL / TLS protocol to reduce the necessary amount of calculations. Although these methods can provide certain performance improvements at the software level, they do not fundamentally solve the problem of CPU resource consumption. In addition, these optimization measures usually require in-depth adjustments to Nginx, which may increase the complexity and maintenance costs of the system.
[0005] In addition, general-purpose hardware accelerator cards, such as GPUs, are used to perform SSL / TLS encryption and decryption operations. However, these solutions often require a lot of modifications to Nginx to support interaction with hardware accelerator cards, which also increases the complexity of the system. Moreover, general-purpose hardware accelerator cards may not be optimized for specific encryption and decryption operations, so there may be limitations in performance improvement. Summary of the invention
[0006] Based on this, it is necessary to provide an encryption and decryption acceleration method, device, computer equipment and storage medium that can improve encryption and decryption efficiency, in view of the difficulty in optimizing the performance of the entry controller container of the container orchestration engine cluster, which has not fundamentally solved the problem of CPU resource consumption, and the technical problems of the limitations of general hardware acceleration cards.
[0007] On the one hand, a method for accelerating encryption and decryption is provided, the method comprising:
[0008] Create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine cluster;
[0009] Virtualize the fast auxiliary acceleration hardware device into multiple virtual devices;
[0010] Obtaining a node agent component on the container orchestration engine cluster, and deploying a device plug-in on the container orchestration engine cluster to implement interaction between the node agent component and the fast auxiliary acceleration hardware device;
[0011] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to a preset resource quota to accelerate the encryption and decryption operations.
[0012] In one embodiment, making an ingress controller container image capable of using a virtual device and deploying the ingress controller container image on a container orchestration engine cluster includes:
[0013] Obtain an ingress controller container on the container orchestration engine cluster, and transform the ingress controller container into an asynchronous mode according to an asynchronous model;
[0014] The fast-assisted acceleration hardware device engine component, the fast-assisted acceleration hardware device driver component and the open secure socket layer protocol component are compiled into the image of the ingress controller container to construct an ingress controller container image integrated with the fast-assisted acceleration hardware device.
[0015] In one embodiment, virtualizing the fast auxiliary acceleration hardware device into multiple virtual devices includes:
[0016] Obtaining the maximum number of virtual devices that the fast auxiliary acceleration hardware device can support;
[0017] Virtualizing the fast auxiliary acceleration hardware device into virtual devices less than or equal to a maximum number, which are shared by the PODs in the container orchestration engine cluster;
[0018] Each virtual device is set to have direct memory access mode, interrupt mode and queue mode resources, so as to allocate the virtual device to the ingress controller container for use.
[0019] In one of the embodiments, obtaining a node agent component on the container orchestration engine cluster, and deploying a device plug-in on the container orchestration engine cluster to implement interaction between the node agent component and the fast auxiliary acceleration hardware device includes:
[0020] Obtain a node on the container orchestration engine cluster, and obtain a node agent component that runs on the node and manages containers and PODs;
[0021] Creating a device plug-in based on the fast auxiliary acceleration hardware device, and deploying the device plug-in to the node that needs encryption and decryption acceleration manually or through a background support service set;
[0022] The fast auxiliary acceleration hardware device is registered on the node agent component, and the registration information includes the operating system socket, application program interface version and resource name of the fast auxiliary acceleration hardware device.
[0023] In one of the embodiments, when the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the ingress controller container image according to a preset resource quota to accelerate the encryption and decryption operations, including:
[0024] When the target node on the container orchestration engine cluster performs encryption and decryption operations, the node agent component on the target node is controlled to call a device list viewing command to the device plug-in through a high-performance remote procedure call protocol;
[0025] The device plug-in scans the device resources on the target node and reports them to the node agent component;
[0026] Control the device plug-in to obtain a device resource list on the target node once every first time period, and the device plug-in sends the device resource list to the interface server to update the device resource status of the target node;
[0027] The interface server identifies, according to the device resource list, whether there is a virtual device that can be scheduled for use in the device resources on the target node;
[0028] In response to the interface server acquiring the encrypted and decrypted message of the user, requesting virtual device resources and dispatching them to the target node;
[0029] The node agent component calls a memory allocation function to allocate virtual device resources through the device plug-in;
[0030] Obtaining a preset resource quota corresponding to the target node, and the device plug-in allocating the virtual device to the ingress controller container image according to the preset resource quota;
[0031] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operations of the encryption and decryption messages.
[0032] In one of the embodiments, controlling the device plug-in to obtain the device resource list on the target node once every first period of time further includes:
[0033] Obtain the health status of each device in the device resource list on the target node, and the device plug-in determines whether the corresponding device can be used normally;
[0034] The device plug-in simultaneously reports the health status of the device resources when sending the device resource list to the interface server.
[0035] In one embodiment, the ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operation of the encryption and decryption message, including:
[0036] When the target node performs encryption and decryption operations, the file library of the open secure socket layer protocol component is called, and the fast auxiliary acceleration hardware device engine component in the image of the ingress controller container is called by executing the application program interface to load the encryption and decryption message onto the virtual device;
[0037] The fast auxiliary acceleration hardware device engine component calls the fast auxiliary acceleration hardware device driver on the target node to implement the acceleration of encryption and decryption operations by the fast auxiliary acceleration hardware device.
[0038] On the other hand, an encryption and decryption acceleration device is provided, the device comprising:
[0039] A container image configuration module, used to create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine cluster;
[0040] A virtualization processing module, used for virtualizing the fast auxiliary acceleration hardware device into multiple virtual devices;
[0041] An interaction setting module, used to obtain a node agent component on the container orchestration engine cluster, and deploy a device plug-in on the container orchestration engine cluster to implement interaction between the node agent component and the fast auxiliary acceleration hardware device;
[0042] The encryption and decryption operation control module is used to, when the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to the preset resource quota to accelerate the encryption and decryption operations.
[0043] In another aspect, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0044] Create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine cluster;
[0045] Virtualize the fast auxiliary acceleration hardware device into multiple virtual devices;
[0046] Obtaining a node agent component on the container orchestration engine cluster, and deploying a device plug-in on the container orchestration engine cluster to implement interaction between the node agent component and the fast auxiliary acceleration hardware device;
[0047] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to a preset resource quota to accelerate the encryption and decryption operations.
[0048] In another aspect, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0049] Create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine cluster;
[0050] Virtualize the fast auxiliary acceleration hardware device into multiple virtual devices;
[0051] Obtaining a node agent component on the container orchestration engine cluster, and deploying a device plug-in on the container orchestration engine cluster to implement interaction between the node agent component and the fast auxiliary acceleration hardware device;
[0052] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to a preset resource quota to accelerate the encryption and decryption operations.
[0053] The above-mentioned encryption and decryption acceleration method, device, computer equipment and storage medium deeply integrate the fast auxiliary acceleration hardware device with the entry controller container on the container orchestration engine cluster, virtualize the fast auxiliary acceleration hardware device into multiple virtual devices, and share them among the PODs in the container orchestration engine cluster, thereby accelerating the secure hypertext transfer protocol (https) requests for cloud services and realizing hardware acceleration of encryption and decryption operations. From the user's perspective, there is no need to make large-scale changes to the entry controller container, so that the fast auxiliary acceleration hardware device can be plug-and-play for access on the cloud, and the acceleration performance of encryption and decryption operations is greatly improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 This is an application environment diagram of the encryption and decryption acceleration method in one embodiment of the present application;
[0056] Figure 2 This is a flow chart of an encryption and decryption acceleration method in one embodiment of the present application;
[0057] Figure 3 This is a schematic diagram of the acceleration principle of a fast auxiliary acceleration hardware device in one embodiment of the present application;
[0058] Figure 4 This is a timing diagram of performing encryption and decryption acceleration in a node on a container orchestration engine cluster in one embodiment of the present application;
[0059] Figure 5 This is a structural block diagram of an encryption and decryption acceleration device in one embodiment of the present application;
[0060] Figure 6 This is a diagram of the internal structure of a computer device in one embodiment of the present application. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0062] The encryption and decryption acceleration method provided in this application can be applied to Figure 1In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. Among them, the terminal 102 can be but not limited to various personal computers, laptops, smart phones, tablet computers and portable wearable devices, and the server 104 can be implemented with an independent server or a server cluster composed of multiple servers. When the user uses the terminal 102 to request the secure hypertext transfer protocol (https) of the cloud service through the World Wide Web, the server 104 uses the encryption and decryption acceleration method to accelerate the encryption and decryption operation, which is completely imperceptible to the user. Turn on the fast auxiliary acceleration hardware device switch to use the fast auxiliary acceleration hardware device to accelerate the https request.
[0063] In one embodiment, Figure 2 As shown, an encryption and decryption acceleration method is provided, which is applied to Figure 1 Taking the server 104 in the example as an example, the following steps are included:
[0064] Step S1, creating an ingress controller container image that can use virtual devices, and deploying the ingress controller container image on a container orchestration engine (Kubernetes) cluster;
[0065] Step S2, virtualizing the fast auxiliary acceleration hardware device into multiple virtual devices;
[0066] Step S3, obtaining a node agent component (kubelet) on the container orchestration engine cluster, and deploying a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device;
[0067] Step S4: When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to the preset resource quota to accelerate the encryption and decryption operations.
[0068] Among them, the container orchestration engine (Kubernetes), referred to as k8s, is an open source containerized application for managing multiple hosts in the cloud platform. The goal of Kubernetes is to make the deployment of containerized applications simple and efficient. Kubernetes provides a mechanism for application deployment, planning, updating, and maintenance.
[0069] The Intel QuickAssist Technology is a hardware acceleration technology developed by Intel to improve the performance of data encryption, decryption, compression and decompression operations. QAT is designed to offload these computationally intensive tasks, thereby reducing the burden on the CPU and freeing up CPU resources to handle other tasks.
[0070] Specifically, the implementation principle of the encryption and decryption acceleration method can be divided into three parts: QAT acceleration principle, deep integration of QAT into the ingress controller container, and container orchestration engine (Kubernetes) integration.
[0071] First of all, the core of the QAT acceleration principle is to separate the asymmetric encryption and decryption operations in TLS and put them into the hardware acceleration card for calculation, which frees up the CPU. At the same time, the dedicated hardware acceleration card also provides higher encryption and decryption performance. This is a typical hardware OffLoad technical solution.
[0072] like Figure 3 As shown, the QAT acceleration principle involves data transmission, request queue, service engine, parallel processing, response queue and data return.
[0073] Data transmission: User space applications (such as web servers) transmit encrypted data to the QAT device through the PCIe (Peripheral Component Interconnect Express) bus.
[0074] Request Queue: After data arrives at the QAT device, they are placed in a request queue. Each request contains necessary metadata, such as algorithm type, key, etc.
[0075] Service Engine: The QAT device contains multiple service engines, each of which can independently perform encryption or decryption tasks. The service engine extracts tasks from the request queue and executes them.
[0076] Parallel processing: The QAT device is designed for parallel processing, which means it can handle multiple encryption or decryption tasks at the same time, improving processing efficiency.
[0077] Response Queue: After encryption or decryption is completed, the result is placed in the response queue, waiting to be retrieved by the user space application.
[0078] Data return: The user space application reads the processed data from the response queue and continues with subsequent operations, such as network transmission.
[0079] Secondly, the ingress controller container is deeply integrated with QAT: QAT is a hardware device on a physical machine, but ingress-nginx is a container service running on Kubernetes. To use QAT capabilities for ingress-nginx, you must first integrate QAT on the basis of the existing ingress-nginx image, and secondly, virtualize the QAT hardware device into a virtual device.
[0080] In order to effectively use the acceleration function in ingress-nginx, a mechanism is needed to allow the application to wait for the Intel QAT accelerator to complete the unfinished operation without affecting the execution of subsequent operations. This programming model performs packet encryption and decryption operations outside the context of the main application, allowing the application to fully utilize the available processor cycles when the accelerator processes operations in parallel.
[0081] Step 1. nginx calls SSL_accept to do handshake, and openssl uses ASYNC_start_job to start the handshake process. At this time, there is actually a fiber switch, which switches to the specific SSL handshake function;
[0082] Step 2. The handshake function performs hardware calculations, calls the qat engine, and finally calls the rsa password function of qat (a handle will be created through eventfd before), returns directly, and then calls ASYNC_pause, performs fiber switching, returns to the place where ASYNC_start_job is called, and returns to the upper layer SSL_ERROR_WANT_ASYNC;
[0083] Step 3. nginx finds that the password is in pending state, calls ngx_ssl_async_process_fds, adds the handle created by eventfd to the monitoring set of epoll, and sets its event to ssl handshake;
[0084] Step 4. After the hardware is completed, call the callback function set by the RSA password function and write the fd;
[0085] Step 5. nginx monitors that the fd is readable, reads out the data, continues to call the handshake function, and then calls ASYNC_start_job to restore the scene saved by ASYNC_pause, and the program continues to execute.
[0086] Therefore, the encryption and decryption acceleration method also includes:
[0087] The response is used to receive the encryption and decryption message, and the ingress controller container calls the handshake function to obtain the encryption algorithm password function of the fast auxiliary acceleration hardware device;
[0088] When the encryption algorithm cryptographic function is in a suspended state, creating a handle of the encryption algorithm cryptographic function and adding the handle to a monitoring set of events;
[0089] The encryption algorithm password function is called to set the callback function, and whether the current floppy drive is readable is determined. If the current floppy drive is readable, the handshake function is continued to be called.
[0090] Furthermore, container orchestration engine (Kubernetes) integration: To use the virtual devices virtualized by QAT on Kubernetes, you also need to use the device plugin to implement the interaction between kubelet and QAT, so that Kubernetes can recognize the virtual devices of QAT on the node.
[0091] In this embodiment, the making of an ingress controller container image capable of using a virtual device and the deployment of the ingress controller container image on a container orchestration engine (Kubernetes) cluster include:
[0092] Obtain the ingress controller container (Ingress-Nginx) on the container orchestration engine cluster, and transform the ingress controller container into an asynchronous mode according to the asynchronous model;
[0093] The quick assisted acceleration hardware device engine component (QAT engine), the quick assisted acceleration hardware device driver component (QAT driver) and the open secure socket layer protocol component (openssl) are compiled into the image of the ingress controller container to construct an ingress controller container image integrated with the quick assisted acceleration hardware device.
[0094] Among them, the ingress controller container (Ingress-Nginx) is an Ingress controller widely used in Kubernetes clusters. It is based on the open source Nginx web server and reverse proxy software. Ingress is an application program interface (API) object in Kubernetes that manages the rules for external access to services within the cluster, allowing network traffic to enter the cluster and communicate with backend services.
[0095] In this embodiment, virtualizing the fast auxiliary acceleration hardware device into multiple virtual devices includes:
[0096] Obtaining the maximum number of virtual devices that the fast auxiliary acceleration hardware device can support;
[0097] Virtualizing the fast auxiliary acceleration hardware device into virtual devices less than or equal to a maximum number, which are shared by the PODs in the container orchestration engine cluster;
[0098] Each virtual device is set to have direct memory access mode, interrupt mode and queue mode resources, so as to allocate the virtual device to the ingress controller container for use.
[0099] Currently, a fast auxiliary acceleration hardware device supports up to 16 virtual devices. POD is the smallest basic unit of deployment and management in a kubernetes cluster, with collaborative addressing and collaborative scheduling. POD is a collection of one or more containers, an abstract collection of one or a group of services (processes).
[0100] like Figure 4 As shown, in this embodiment, the step of obtaining a node agent component (kubelet) on the container orchestration engine cluster and deploying a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device includes:
[0101] Obtain a node on the container orchestration engine cluster, and obtain a node agent component that runs on the node and manages containers and PODs;
[0102] Creating a device plug-in based on the fast auxiliary acceleration hardware device, and deploying the device plug-in to the node requiring encryption and decryption acceleration manually or through a background support service set (daemonset);
[0103] The fast auxiliary acceleration hardware device is registered on the node agent component (kubelet), and the registered information includes the operating system socket, application program interface version (APIVersion) and resource name (Resource Name) of the fast auxiliary acceleration hardware device.
[0104] like Figure 4 As shown, in this embodiment, when the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the ingress controller container image according to the preset resource quota to accelerate the encryption and decryption operations, including:
[0105] When the target node on the container orchestration engine (Kubernetes) cluster performs encryption and decryption operations, the node agent component on the target node is controlled to call a device list viewing command to the device plug-in through a high-performance remote procedure call protocol (gRPC);
[0106] The device plug-in scans the device resources on the target node and reports them to the node agent component;
[0107] Control the device plug-in to obtain a device resource list on the target node once every first time period, and the device plug-in sends the device resource list to an API server to update the device resource status of the target node;
[0108] The API server identifies, according to the device resource list, whether there is a virtual device that can be scheduled for use in the device resources on the target node;
[0109] In response to the API server acquiring the encrypted and decrypted message of the user, requesting virtual device resources and dispatching them to the target node;
[0110] The node agent component (kubelet) calls a memory allocation function (Allocate function) to allocate virtual device resources through the device plug-in;
[0111] Obtaining a preset resource quota corresponding to the target node, and the device plug-in allocating the virtual device to the ingress controller container image according to the preset resource quota;
[0112] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operations of the encryption and decryption messages.
[0113] The preset resource quota corresponding to the target node is the resource quota set when the ingress controller container is deployed on the container orchestration engine cluster: qat.intel.com / cy1_dc0:"16". The number here depends on the number of ingress-nginx working processes, specifically twice the number of ingress-nginx working processes, otherwise nginx may fail during reload.
[0114] In this embodiment, the controlling the device plug-in to obtain the device resource list on the target node once every first time period also includes:
[0115] Obtain the health status of each device in the device resource list on the target node, and the device plug-in determines whether the corresponding device can be used normally;
[0116] The device plug-in simultaneously reports the health status of the device resources when sending the device resource list to the API server.
[0117] By feeding back the health status of the device and updating the device resource status, it is possible to prevent the virtual device with communication failure from being unusable and to prevent the virtual device with communication failure from accelerating encryption and decryption operations.
[0118] In this embodiment, the ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operation of the encryption and decryption message, including:
[0119] When the target node performs encryption and decryption operations, the file library (lib library) of the open secure socket layer protocol component is called, and the fast auxiliary acceleration hardware device engine component in the image of the ingress controller container is called by executing the application program interface (evp API) to load the encryption and decryption message onto the virtual device;
[0120] The fast auxiliary acceleration hardware device engine component calls the fast auxiliary acceleration hardware device driver on the target node to implement the acceleration of encryption and decryption operations by the fast auxiliary acceleration hardware device.
[0121] In the above encryption and decryption acceleration method, the fast auxiliary acceleration hardware device is deeply integrated with the ingress controller container (Ingress-Nginx) on the container orchestration engine cluster, and the fast auxiliary acceleration hardware device is virtualized into multiple virtual devices, which are shared by the PODs in the container orchestration engine cluster. The acceleration of the secure hypertext transfer protocol (https) request for cloud services is realized, and the hardware acceleration of encryption and decryption operations is realized. From the user's perspective, there is no need to make large-scale changes to the ingress controller container, so that the fast auxiliary acceleration hardware device can be plug-and-play for access on the cloud, and the acceleration performance of encryption and decryption operations is greatly improved.
[0122] The wrk command is used to test the qps improvement effect of ingress-nginx using QAT and ingress-nginx not using QAT. As shown in Table 1, the performance of ingress-nginx using QAT can be improved by 2 to 4 times.
[0123] Table 1
[0124] Number of threads 8 40 80 160 Using QAT 19132.37 19682.38 19813.65 20238.84 Not using QAT 9036.13 7825.52 6448.44 5915.82
[0125] The beneficial effects of the present invention are as follows:
[0126] Performance improvement: Through hardware acceleration, QAT significantly reduces the CPU load in SSL / TLS encryption and decryption operations, thereby improving the speed of Ingress-Nginx processing HTTPS requests and the performance of overall network traffic.
[0127] Resource optimization: Free up CPU resources for other computing tasks, optimizing server resource allocation and usage efficiency.
[0128] Enhanced scalability: QAT technology supports virtualizing hardware resources into multiple virtual devices through SR-IOV virtualization technology in the Kubernetes environment, allowing multiple PODs to share and utilize QAT hardware acceleration, improving the scalability of the system. Allowing multiple PODs to share hardware resources improves resource utilization and system scalability.
[0129] Faster response time: Due to the acceleration of encryption and decryption operations, Ingress-Nginx can respond to client requests faster, improving the user experience.
[0130] The plug-in is developed to integrate QAT scanning, reporting, and real-time monitoring, and realize the dynamic management and allocation of cluster QAT virtual devices by Kubernetes. It also realizes real-time monitoring, status reporting, and device allocation of QAT hardware devices in the cluster.
[0131] Realize automatic support for multiple architectures such as arm and x86.
[0132] In one embodiment, Figure 5 As shown, an encryption and decryption acceleration device 10 is provided, including: a container image configuration module 1, a virtualization processing module 2, an interaction setting module 3, and an encryption and decryption operation control module 4.
[0133] The container image configuration module 1 is used to create an ingress controller container image that can use a virtual device and deploy the ingress controller container image on a container orchestration engine (Kubernetes) cluster.
[0134] The virtualization processing module 2 is used to virtualize the fast auxiliary acceleration hardware device into multiple virtual devices.
[0135] The interaction setting module 3 is used to obtain the node agent component (kubelet) on the container orchestration engine cluster, and deploy a device plugin (device plugin) on the container orchestration engine cluster to realize the interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device.
[0136] The encryption and decryption operation control module 4 is used for the container orchestration engine cluster to identify all virtual devices connected to the target node through the device plug-in when the target node performs encryption and decryption operations, and allocate the virtual devices to the entry controller container image according to the preset resource quota to accelerate the encryption and decryption operations.
[0137] In this embodiment, the making of an ingress controller container image capable of using a virtual device and the deployment of the ingress controller container image on a container orchestration engine (Kubernetes) cluster include:
[0138] Obtain the ingress controller container (Ingress-Nginx) on the container orchestration engine cluster, and transform the ingress controller container into an asynchronous mode according to the asynchronous model;
[0139] The quick assisted acceleration hardware device engine component (QAT engine), the quick assisted acceleration hardware device driver component (QAT driver) and the open secure socket layer protocol component (openssl) are compiled into the image of the ingress controller container to construct an ingress controller container image integrated with the quick assisted acceleration hardware device.
[0140] In this embodiment, virtualizing the fast auxiliary acceleration hardware device into multiple virtual devices includes:
[0141] Obtaining the maximum number of virtual devices that the fast auxiliary acceleration hardware device can support;
[0142] Virtualizing the fast auxiliary acceleration hardware device into virtual devices less than or equal to a maximum number, which are shared by the PODs in the container orchestration engine cluster;
[0143] Each virtual device is set to have direct memory access mode, interrupt mode and queue mode resources, so as to allocate the virtual device to the ingress controller container for use.
[0144] In this embodiment, the step of obtaining a node agent component (kubelet) on the container orchestration engine cluster and deploying a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device includes:
[0145] Obtain a node on the container orchestration engine cluster, and obtain a node agent component that runs on the node and manages containers and PODs;
[0146] Creating a device plug-in based on the fast auxiliary acceleration hardware device, and deploying the device plug-in to the node requiring encryption and decryption acceleration manually or through a background support service set (daemonset);
[0147] The fast auxiliary acceleration hardware device is registered on the node agent component (kubelet), and the registered information includes the operating system socket, application program interface version (APIVersion) and resource name (Resource Name) of the fast auxiliary acceleration hardware device.
[0148] In this embodiment, when the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the ingress controller container image according to a preset resource quota to accelerate the encryption and decryption operations, including:
[0149] When the target node on the container orchestration engine (Kubernetes) cluster performs encryption and decryption operations, the node agent component on the target node is controlled to call a device list viewing command to the device plug-in through a high-performance remote procedure call protocol (gRPC);
[0150] The device plug-in scans the device resources on the target node and reports them to the node agent component;
[0151] Control the device plug-in to obtain a device resource list on the target node once every first time period, and the device plug-in sends the device resource list to an API server to update the device resource status of the target node;
[0152] The API server identifies, according to the device resource list, whether there is a virtual device that can be scheduled for use in the device resources on the target node;
[0153] In response to the API server acquiring the encrypted and decrypted message of the user, requesting virtual device resources and dispatching them to the target node;
[0154] The node agent component (kubelet) calls a memory allocation function (Allocate function) to allocate virtual device resources through the device plug-in;
[0155] Obtaining a preset resource quota corresponding to the target node, and the device plug-in allocating the virtual device to the ingress controller container image according to the preset resource quota;
[0156] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operations of the encryption and decryption messages.
[0157] In this embodiment, the controlling the device plug-in to obtain the device resource list on the target node once every first time period also includes:
[0158] Obtain the health status of each device in the device resource list on the target node, and the device plug-in determines whether the corresponding device can be used normally;
[0159] The device plug-in simultaneously reports the health status of the device resources when sending the device resource list to the API server.
[0160] In this embodiment, the ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operation of the encryption and decryption message, including:
[0161] When the target node performs encryption and decryption operations, the file library (lib library) of the open secure socket layer protocol component is called, and the fast auxiliary acceleration hardware device engine component in the image of the ingress controller container is called by executing the application program interface (evp API) to load the encryption and decryption message onto the virtual device;
[0162] The fast auxiliary acceleration hardware device engine component calls the fast auxiliary acceleration hardware device driver on the target node to implement the acceleration of encryption and decryption operations by the fast auxiliary acceleration hardware device.
[0163] In the above-mentioned encryption and decryption acceleration device, by deeply integrating the fast auxiliary acceleration hardware device with the ingress controller container (Ingress-Nginx) on the container orchestration engine cluster, the fast auxiliary acceleration hardware device is virtualized into multiple virtual devices, and shared by the PODs in the container orchestration engine cluster, the cloud service secure hypertext transfer protocol (https) request acceleration is realized, and the hardware acceleration of encryption and decryption operations is realized. From the user's perspective, there is no need to make large-scale changes to the ingress controller container, so that the fast auxiliary acceleration hardware device can be plug-and-play for access on the cloud, and the acceleration performance of encryption and decryption operations is greatly improved.
[0164] For the specific definition of the encryption and decryption acceleration device, please refer to the definition of the encryption and decryption acceleration method above, which will not be repeated here. Each module in the above encryption and decryption acceleration device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0165] In one embodiment, a computer program product is provided, comprising a computer program, which, when executed by a processor, implements the following steps:
[0166] Create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine (Kubernetes) cluster;
[0167] Virtualize the fast auxiliary acceleration hardware device into multiple virtual devices;
[0168] Obtain a node agent component (kubelet) on the container orchestration engine cluster, and deploy a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device;
[0169] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to a preset resource quota to accelerate the encryption and decryption operations.
[0170] In one embodiment, the computer program further implements the following steps when executed by a processor:
[0171] The step of making an ingress controller container image capable of using a virtual device and deploying the ingress controller container image on a container orchestration engine (Kubernetes) cluster includes:
[0172] Obtain the ingress controller container (Ingress-Nginx) on the container orchestration engine cluster, and transform the ingress controller container into an asynchronous mode according to the asynchronous model;
[0173] The quick assisted acceleration hardware device engine component (QAT engine), the quick assisted acceleration hardware device driver component (QAT driver) and the open secure socket layer protocol component (openssl) are compiled into the image of the ingress controller container to construct an ingress controller container image integrated with the quick assisted acceleration hardware device.
[0174] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0175] The virtualization of the fast auxiliary acceleration hardware device into multiple virtual devices includes:
[0176] Obtaining the maximum number of virtual devices that the fast auxiliary acceleration hardware device can support;
[0177] Virtualizing the fast auxiliary acceleration hardware device into virtual devices less than or equal to a maximum number, which are shared by the PODs in the container orchestration engine cluster;
[0178] Each virtual device is set to have direct memory access mode, interrupt mode and queue mode resources, so as to allocate the virtual device to the ingress controller container for use.
[0179] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0180] The obtaining of a node agent component (kubelet) on the container orchestration engine cluster, and the deployment of a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device includes:
[0181] Obtain a node on the container orchestration engine cluster, and obtain a node agent component that runs on the node and manages containers and PODs;
[0182] Creating a device plug-in based on the fast auxiliary acceleration hardware device, and deploying the device plug-in to the node requiring encryption and decryption acceleration manually or through a background support service set (daemonset);
[0183] The fast auxiliary acceleration hardware device is registered on the node agent component (kubelet), and the registered information includes the operating system socket, application program interface version (APIVersion) and resource name (Resource Name) of the fast auxiliary acceleration hardware device.
[0184] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0185] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the ingress controller container image according to a preset resource quota to accelerate the encryption and decryption operations, including:
[0186] When the target node on the container orchestration engine (Kubernetes) cluster performs encryption and decryption operations, the node agent component on the target node is controlled to call a device list viewing command to the device plug-in through a high-performance remote procedure call protocol (gRPC);
[0187] The device plug-in scans the device resources on the target node and reports them to the node agent component;
[0188] Control the device plug-in to obtain a device resource list on the target node once every first time period, and the device plug-in sends the device resource list to an API server to update the device resource status of the target node;
[0189] The API server identifies, according to the device resource list, whether there is a virtual device that can be scheduled for use in the device resources on the target node;
[0190] In response to the API server acquiring the encrypted and decrypted message of the user, requesting virtual device resources and dispatching them to the target node;
[0191] The node agent component (kubelet) calls a memory allocation function (Allocate function) to allocate virtual device resources through the device plug-in;
[0192] Obtaining a preset resource quota corresponding to the target node, and the device plug-in allocating the virtual device to the ingress controller container image according to the preset resource quota;
[0193] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operations of the encryption and decryption messages.
[0194] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0195] The controlling the device plug-in to obtain the device resource list on the target node once every first time period also includes:
[0196] Obtain the health status of each device in the device resource list on the target node, and the device plug-in determines whether the corresponding device can be used normally;
[0197] The device plug-in simultaneously reports the health status of the device resources when sending the device resource list to the API server.
[0198] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0199] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operation of the encryption and decryption message, including:
[0200] When the target node performs encryption and decryption operations, the file library (lib library) of the open secure socket layer protocol component is called, and the fast auxiliary acceleration hardware device engine component in the image of the ingress controller container is called by executing the application program interface (evp API) to load the encryption and decryption message onto the virtual device;
[0201] The fast auxiliary acceleration hardware device engine component calls the fast auxiliary acceleration hardware device driver on the target node to implement the acceleration of encryption and decryption operations by the fast auxiliary acceleration hardware device.
[0202] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the encryption and decryption acceleration method above, which will not be repeated here.
[0203] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store encryption and decryption acceleration data. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, an encryption and decryption acceleration method is implemented.
[0204] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0205] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0206] Create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine (Kubernetes) cluster;
[0207] Virtualize the fast auxiliary acceleration hardware device into multiple virtual devices;
[0208] Obtain a node agent component (kubelet) on the container orchestration engine cluster, and deploy a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device;
[0209] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to a preset resource quota to accelerate the encryption and decryption operations.
[0210] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0211] The step of making an ingress controller container image capable of using a virtual device and deploying the ingress controller container image on a container orchestration engine (Kubernetes) cluster includes:
[0212] Obtain the ingress controller container (Ingress-Nginx) on the container orchestration engine cluster, and transform the ingress controller container into an asynchronous mode according to the asynchronous model;
[0213] The quick assisted acceleration hardware device engine component (QAT engine), the quick assisted acceleration hardware device driver component (QAT driver) and the open secure socket layer protocol component (openssl) are compiled into the image of the ingress controller container to construct an ingress controller container image integrated with the quick assisted acceleration hardware device.
[0214] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0215] The virtualization of the fast auxiliary acceleration hardware device into multiple virtual devices includes:
[0216] Obtaining the maximum number of virtual devices that the fast auxiliary acceleration hardware device can support;
[0217] Virtualizing the fast auxiliary acceleration hardware device into virtual devices less than or equal to a maximum number, which are shared by the PODs in the container orchestration engine cluster;
[0218] Each virtual device is set to have direct memory access mode, interrupt mode and queue mode resources, so as to allocate the virtual device to the ingress controller container for use.
[0219] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0220] The obtaining of a node agent component (kubelet) on the container orchestration engine cluster, and the deployment of a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device includes:
[0221] Obtain a node on the container orchestration engine cluster, and obtain a node agent component that runs on the node and manages containers and PODs;
[0222] Creating a device plug-in based on the fast auxiliary acceleration hardware device, and deploying the device plug-in to the node requiring encryption and decryption acceleration manually or through a background support service set (daemonset);
[0223] The fast auxiliary acceleration hardware device is registered on the node agent component (kubelet), and the registered information includes the operating system socket, application program interface version (APIVersion) and resource name (Resource Name) of the fast auxiliary acceleration hardware device.
[0224] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0225] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the ingress controller container image according to a preset resource quota to accelerate the encryption and decryption operations, including:
[0226] When the target node on the container orchestration engine (Kubernetes) cluster performs encryption and decryption operations, the node agent component on the target node is controlled to call a device list viewing command to the device plug-in through a high-performance remote procedure call protocol (gRPC);
[0227] The device plug-in scans the device resources on the target node and reports them to the node agent component;
[0228] Control the device plug-in to obtain a device resource list on the target node once every first time period, and the device plug-in sends the device resource list to an API server to update the device resource status of the target node;
[0229] The API server identifies, according to the device resource list, whether there is a virtual device that can be scheduled for use in the device resources on the target node;
[0230] In response to the API server acquiring the encrypted and decrypted message of the user, requesting virtual device resources and dispatching them to the target node;
[0231] The node agent component (kubelet) calls a memory allocation function (Allocate function) to allocate virtual device resources through the device plug-in;
[0232] Obtaining a preset resource quota corresponding to the target node, and the device plug-in allocating the virtual device to the ingress controller container image according to the preset resource quota;
[0233] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operations of the encryption and decryption messages.
[0234] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0235] The controlling the device plug-in to obtain the device resource list on the target node once every first time period also includes:
[0236] Obtain the health status of each device in the device resource list on the target node, and the device plug-in determines whether the corresponding device can be used normally;
[0237] The device plug-in simultaneously reports the health status of the device resources when sending the device resource list to the API server.
[0238] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0239] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operation of the encryption and decryption message, including:
[0240] When the target node performs encryption and decryption operations, the file library (lib library) of the open secure socket layer protocol component is called, and the fast auxiliary acceleration hardware device engine component in the image of the ingress controller container is called by executing the application program interface (evp API) to load the encryption and decryption message onto the virtual device;
[0241] The fast auxiliary acceleration hardware device engine component calls the fast auxiliary acceleration hardware device driver on the target node to implement the acceleration of encryption and decryption operations by the fast auxiliary acceleration hardware device.
[0242] For the specific limitations on the steps implemented when the processor executes the computer program, please refer to the limitations on the encryption and decryption acceleration method above, which will not be repeated here.
[0243] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0244] Create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine (Kubernetes) cluster;
[0245] Virtualize the fast auxiliary acceleration hardware device into multiple virtual devices;
[0246] Obtain a node agent component (kubelet) on the container orchestration engine cluster, and deploy a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device;
[0247] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to a preset resource quota to accelerate the encryption and decryption operations.
[0248] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0249] The step of making an ingress controller container image capable of using a virtual device and deploying the ingress controller container image on a container orchestration engine (Kubernetes) cluster includes:
[0250] Obtain the ingress controller container (Ingress-Nginx) on the container orchestration engine cluster, and transform the ingress controller container into an asynchronous mode according to the asynchronous model;
[0251] The quick assisted acceleration hardware device engine component (QAT engine), the quick assisted acceleration hardware device driver component (QAT driver) and the open secure socket layer protocol component (openssl) are compiled into the image of the ingress controller container to construct an ingress controller container image integrated with the quick assisted acceleration hardware device.
[0252] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0253] The virtualization of the fast auxiliary acceleration hardware device into multiple virtual devices includes:
[0254] Obtaining the maximum number of virtual devices that the fast auxiliary acceleration hardware device can support;
[0255] Virtualizing the fast auxiliary acceleration hardware device into virtual devices less than or equal to a maximum number, which are shared by the PODs in the container orchestration engine cluster;
[0256] Each virtual device is set to have direct memory access mode, interrupt mode and queue mode resources, so as to allocate the virtual device to the ingress controller container for use.
[0257] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0258] The obtaining of a node agent component (kubelet) on the container orchestration engine cluster, and the deployment of a device plugin (device plugin) on the container orchestration engine cluster to implement interaction between the node agent component (kubelet) and the fast auxiliary acceleration hardware device includes:
[0259] Obtain a node on the container orchestration engine cluster, and obtain a node agent component that runs on the node and manages containers and PODs;
[0260] Creating a device plug-in based on the fast auxiliary acceleration hardware device, and deploying the device plug-in to the node requiring encryption and decryption acceleration manually or through a background support service set (daemonset);
[0261] The fast auxiliary acceleration hardware device is registered on the node agent component (kubelet), and the registered information includes the operating system socket, application program interface version (APIVersion) and resource name (Resource Name) of the fast auxiliary acceleration hardware device.
[0262] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0263] When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the ingress controller container image according to a preset resource quota to accelerate the encryption and decryption operations, including:
[0264] When the target node on the container orchestration engine (Kubernetes) cluster performs encryption and decryption operations, the node agent component on the target node is controlled to call a device list viewing command to the device plug-in through a high-performance remote procedure call protocol (gRPC);
[0265] The device plug-in scans the device resources on the target node and reports them to the node agent component;
[0266] Control the device plug-in to obtain a device resource list on the target node once every first time period, and the device plug-in sends the device resource list to an API server to update the device resource status of the target node;
[0267] The API server identifies, according to the device resource list, whether there is a virtual device that can be scheduled for use in the device resources on the target node;
[0268] In response to the API server acquiring the encrypted and decrypted message of the user, requesting virtual device resources and dispatching them to the target node;
[0269] The node agent component (kubelet) calls a memory allocation function (Allocate function) to allocate virtual device resources through the device plug-in;
[0270] Obtaining a preset resource quota corresponding to the target node, and the device plug-in allocating the virtual device to the ingress controller container image according to the preset resource quota;
[0271] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operations of the encryption and decryption messages.
[0272] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0273] The controlling the device plug-in to obtain the device resource list on the target node once every first time period also includes:
[0274] Obtain the health status of each device in the device resource list on the target node, and the device plug-in determines whether the corresponding device can be used normally;
[0275] The device plug-in simultaneously reports the health status of the device resources when sending the device resource list to the API server.
[0276] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:
[0277] The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operation of the encryption and decryption message, including:
[0278] When the target node performs encryption and decryption operations, the file library (lib library) of the open secure socket layer protocol component is called, and the fast auxiliary acceleration hardware device engine component in the image of the ingress controller container is called by executing the application program interface (evp API) to load the encryption and decryption message onto the virtual device;
[0279] The fast auxiliary acceleration hardware device engine component calls the fast auxiliary acceleration hardware device driver on the target node to implement the acceleration of encryption and decryption operations by the fast auxiliary acceleration hardware device.
[0280] For the specific limitations on the steps implemented when the computer program is executed by the processor, please refer to the limitations on the encryption and decryption acceleration method above, which will not be repeated here.
[0281] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0282] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0283] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for accelerating encryption and decryption, characterized in that: include: Create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine cluster; Virtualize the fast auxiliary acceleration hardware device into multiple virtual devices; Obtaining a node agent component on the container orchestration engine cluster, and deploying a device plug-in on the container orchestration engine cluster to implement interaction between the node agent component and the fast auxiliary acceleration hardware device; When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to a preset resource quota to accelerate the encryption and decryption operations.
2. The encryption and decryption acceleration method according to claim 1, characterized in that: The making of an ingress controller container image capable of using a virtual device and deploying the ingress controller container image on a container orchestration engine cluster comprises: obtaining an ingress controller container on the container orchestration engine cluster, and transforming the ingress controller container into an asynchronous mode according to an asynchronous model; The fast-assisted acceleration hardware device engine component, the fast-assisted acceleration hardware device driver component and the open secure socket layer protocol component are compiled into the image of the ingress controller container to construct an ingress controller container image integrated with the fast-assisted acceleration hardware device.
3. The encryption and decryption acceleration method according to claim 2, characterized in that: The virtualization of the fast auxiliary acceleration hardware device into multiple virtual devices includes: Obtaining the maximum number of virtual devices that the fast auxiliary acceleration hardware device can support; Virtualizing the fast auxiliary acceleration hardware device into virtual devices less than or equal to a maximum number, which are shared by the PODs in the container orchestration engine cluster; Each virtual device is set to have direct memory access mode, interrupt mode and queue mode resources, so as to allocate the virtual device to the ingress controller container for use.
4. The encryption and decryption acceleration method according to claim 1, characterized in that: The obtaining of the node agent component on the container orchestration engine cluster and the deployment of a device plug-in on the container orchestration engine cluster to implement the interaction between the node agent component and the fast auxiliary acceleration hardware device includes: Obtain a node on the container orchestration engine cluster, and obtain a node agent component that runs on the node and manages containers and PODs; Creating a device plug-in based on the fast auxiliary acceleration hardware device, and deploying the device plug-in to the node that needs encryption and decryption acceleration manually or through a background support service set; The fast auxiliary acceleration hardware device is registered on the node agent component, and the registration information includes the operating system socket, application program interface version and resource name of the fast auxiliary acceleration hardware device.
5. The encryption and decryption acceleration method according to claim 4, characterized in that: When the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the ingress controller container image according to a preset resource quota to accelerate the encryption and decryption operations, including: When the target node on the container orchestration engine cluster performs encryption and decryption operations, the node agent component on the target node is controlled to call a device list viewing command to the device plug-in through a high-performance remote procedure call protocol; The device plug-in scans the device resources on the target node and reports them to the node agent component; Control the device plug-in to obtain a device resource list on the target node once every first time period, and the device plug-in sends the device resource list to the interface server to update the device resource status of the target node; the interface server identifies whether there is a virtual device that can be scheduled for use in the device resources on the target node according to the device resource list; In response to the interface server acquiring the encrypted and decrypted message of the user, requesting virtual device resources and dispatching them to the target node; The node agent component calls a memory allocation function to allocate virtual device resources through the device plug-in; Obtaining a preset resource quota corresponding to the target node, and the device plug-in allocating the virtual device to the ingress controller container image according to the preset resource quota; The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operations of the encryption and decryption messages.
6. The encryption and decryption acceleration method according to claim 5, characterized in that: The controlling the device plug-in to obtain the device resource list on the target node once every first time period also includes: Obtain the health status of each device in the device resource list on the target node, and the device plug-in determines whether the corresponding device can be used normally; The device plug-in simultaneously reports the health status of the device resources when sending the device resource list to the interface server.
7. The encryption and decryption acceleration method according to claim 5, characterized in that: The ingress controller container image uses the allocated virtual device to accelerate the encryption and decryption operation of the encryption and decryption message, including: When the target node performs encryption and decryption operations, the file library of the open secure socket layer protocol component is called, and the fast auxiliary acceleration hardware device engine component in the image of the ingress controller container is called by executing the application program interface to load the encryption and decryption message onto the virtual device; The fast auxiliary acceleration hardware device engine component calls the fast auxiliary acceleration hardware device driver on the target node to implement the acceleration of encryption and decryption operations by the fast auxiliary acceleration hardware device.
8. An encryption and decryption acceleration device, characterized in that: The device comprises: A container image configuration module, used to create an ingress controller container image that can use virtual devices, and deploy the ingress controller container image on a container orchestration engine cluster; A virtualization processing module, used for virtualizing the fast auxiliary acceleration hardware device into multiple virtual devices; An interaction setting module, used to obtain a node agent component on the container orchestration engine cluster, and deploy a device plug-in on the container orchestration engine cluster to implement interaction between the node agent component and the fast auxiliary acceleration hardware device; The encryption and decryption operation control module is used to, when the target node performs encryption and decryption operations, the container orchestration engine cluster identifies all virtual devices connected to the target node through the device plug-in, and allocates the virtual devices to the entry controller container image according to the preset resource quota to accelerate the encryption and decryption operations.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Container processing method and device, computer equipment and storage medium
CN112616153A
Method and system for realizing cluster virtual nodes based on container instances
CN115185628A
Scheduling method and device of acceleration equipment, electronic equipment and storage medium
CN115731093A
Load balancer creation method and device, equipment and storage medium
CN116991594A
Task processing method, device and equipment and readable storage medium
CN117453404A
Cited By
Method for obtaining network quintuple from SSL object
CN120281533A
