Access request processing method based on server cluster and related equipment
By setting up trusted and ordinary computing nodes in the server cluster, and using control plane components to allocate application access requests, the complexity of SGX cluster management and cross-container cluster mapping problems are solved, flexible task orchestration and resource management are achieved, and operation and maintenance is reduced. cost.
Patent Information
- Application Number
- CN202210958304.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-10
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2042-08-10
AI Technical Summary
When deploying SGX in a container cluster, the SGX cluster needs to be managed separately, which increases operation and maintenance complexity and management costs, and is not conducive to complex task orchestration modes, especially task mapping and network communication overhead across container clusters.
By setting up trusted computing nodes and ordinary computing nodes in the server cluster, and using control plane components to allocate application access requests according to the memory area type and available amount, heterogeneous cluster management of trusted computing resources and ordinary computing resources is achieved, and maintenance costs are reduced. And support more flexible task orchestration.
It enables effective management of SGX resources in container clusters, reduces operation and maintenance costs, supports more complex task orchestration, and avoids wasting SGX resources by CPU-intensive data preprocessing.
Smart Images

Figure CN115269198B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to an access request processing method based on a server cluster and related equipment. Background Art
[0002] SGX (Software Guard Extension) (a set of software protection technologies provided by Intel based on its CPU hardware) is a technology designed to meet the needs of trusted computing.
[0003] When SGX is deployed through a container cluster, it usually requires a separate SGX cluster to be deployed, which increases the complexity of operation and maintenance, increases management costs, and is not conducive to more complex training orchestration modes. Summary of the invention
[0004] In view of this, the purpose of the present disclosure is to propose an access request processing method based on a server cluster and related devices.
[0005] Based on the above purpose, the first aspect of the present disclosure provides an access request processing method based on a server cluster, comprising:
[0006] Receiving a memory area type and a memory area available amount sent by at least one node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area;
[0007] Receiving an application access request sent by a client, parsing the application access request to obtain a usage amount of a trusted memory area and / or a usage amount of a common memory area;
[0008] Based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, the application access request is sent to the trusted computing node, so that the trusted memory area of the trusted computing node responds to the application access request; and / or, based on the usage of the ordinary memory area and the available amount of the memory area of the ordinary computing node, the application access request is sent to the ordinary computing node, so that the ordinary memory area of the ordinary computing node responds to the application access request.
[0009] Optionally, the trusted computing node includes a first trusted computing node and a second trusted computing node; and sending the application access request to the trusted computing node based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node so that the trusted memory area of the trusted computing node responds to the application access request, including:
[0010] Parsing the application access request to obtain a first application access task corresponding to the application access request;
[0011] In response to the available amount of the memory area of the first trusted computing node being greater than or equal to the usage amount of the trusted memory area, sending the first application access task to the first trusted computing node so that the trusted memory area of the first trusted computing node processes the first application access task;
[0012] In response to the available amount of the memory area of the first trusted computing node being less than the usage of the trusted memory area, and the sum of the available amounts of the memory areas of the first trusted computing node and the second trusted computing node being greater than or equal to the usage of the trusted memory area, a portion of the first application access task is sent to the first trusted computing node and another portion of the first application access task is sent to the second trusted computing node, so that the trusted memory areas of the first trusted computing node and the second trusted computing node collaboratively process the first application access task.
[0013] Optionally, the common computing node includes a first common computing node and a second common computing node; and sending the application access request to the common computing node based on the usage of the common memory area and the available amount of the memory area of the common computing node so that the common memory area of the common computing node responds to the application access request, including:
[0014] parsing the application access request to obtain a second application access task corresponding to the application access request;
[0015] In response to the available amount of the memory area of the first ordinary computing node being greater than or equal to the usage amount of the ordinary memory area, sending the second application access task to the first ordinary computing node so that the ordinary memory area of the first ordinary computing node processes the second application access task;
[0016] In response to the fact that the available amount of the memory area of the first ordinary computing node is less than the usage of the ordinary memory area, and the sum of the available amounts of the memory areas of the first ordinary computing node and the second ordinary computing node is greater than or equal to the usage of the ordinary memory area, part of the second application access task is sent to the first ordinary computing node and another part of the second application access task is sent to the second ordinary computing node, so that the trusted memory areas of the first ordinary computing node and the second ordinary computing node jointly process the second application access task.
[0017] A second aspect of the present disclosure provides an access request processing method based on a server cluster, comprising:
[0018] Obtaining a memory area type and an available amount of a memory area of a node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area;
[0019] Sending the memory area type and the available amount of the memory area of the node to the control plane component;
[0020] Receiving an application access request sent by the control plane component;
[0021] In response to the node being a trusted computing node, responding to the application access request based on the trusted memory area of the node; or, in response to the node being a common computing node, responding to the application access request based on the common memory area of the node.
[0022] Optionally, the acquiring of the memory area type and available amount of the memory area of the node includes:
[0023] The memory area type and available amount of the memory area of the node are obtained through the interaction between the device plug-in set in the node and the host kernel of the node.
[0024] Optionally, also include:
[0025] The device plug-in interacts with the host kernel of the node through the assembly instruction set of CPUID to obtain the memory area type and memory area available amount of the node.
[0026] Optionally, after the device plug-in obtains the memory area type and the available amount of the memory area of the node, the device plug-in further includes:
[0027] The memory area type and the available amount of the memory area of the node are sent to the control plane component through the node agent.
[0028] Optionally, in response to the node being a trusted computing node, responding to the application access request based on a trusted memory area of the node includes:
[0029] The node agent of the node receives the application access request, and requests the device plug-in to allocate a trusted memory area based on the application access request;
[0030] The device plug-in returns the service information of the trusted memory area to the node agent; the service information of the trusted memory area is generated based on the deployment of the trusted computing node;
[0031] The node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container.
[0032] Optionally, the service information includes device list information of the trusted memory area and a mount directory of a service management system of an application security container.
[0033] Optionally, the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container, including:
[0034] The node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the remote authentication certificate from the service management system of the application security container to obtain the remote authentication certificate, and remotely authenticates the client based on the remote authentication certificate;
[0035] In response to the remote authentication being successful, the node agent creates and starts a container to run the application included in the application access request through the container.
[0036] Optionally, the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container, including:
[0037] The node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the inter-node authentication certificate from the service management system to obtain the inter-node authentication certificate, and implements inter-node authentication between the current trusted computing node and other trusted computing nodes based on the inter-node authentication certificate;
[0038] In response to the inter-node authentication being successful, the current trusted computing node interacts with other trusted computing nodes to respond to the application access request.
[0039] A third aspect of the present disclosure provides a control plane component, including:
[0040] A receiving unit is configured to: receive a memory area type and an available amount of the memory area sent by at least one node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area;
[0041] A parsing unit is configured to: receive an application access request sent by a client, and parse the application access request to obtain a usage amount of a trusted memory area and / or a usage amount of a common memory area;
[0042] The sending unit is configured to: send the application access request to the trusted computing node based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, so that the trusted memory area of the trusted computing node responds to the application access request; and / or, send the application access request to the ordinary computing node based on the usage of the ordinary memory area and the available amount of the memory area of the ordinary computing node, so that the ordinary memory area of the ordinary computing node responds to the application access request.
[0043] A fourth aspect of the present disclosure provides a node, including:
[0044] an acquisition unit, configured to: acquire a memory area type and an available amount of a memory area of a node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area;
[0045] A sending unit is configured to: send the memory area type and the available amount of the memory area of the node to the control plane component;
[0046] A receiving unit, configured to: receive an application access request sent by the control plane component;
[0047] The response unit is configured to: in response to the node being a trusted computing node, respond to the application access request based on the trusted memory area of the node; or, in response to the node being a common computing node, respond to the application access request based on the common memory area of the node.
[0048] A fifth aspect of the present disclosure provides a server cluster, including:
[0049] The control plane assembly according to the third aspect of the present disclosure; and
[0050] At least one node as described in the fourth aspect of the present disclosure; the node is connected to the control plane component.
[0051] The sixth aspect of the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any one of the first aspect or the second aspect is implemented.
[0052] The present disclosure also provides a non-transitory computer-readable storage medium, which stores computer instructions, wherein the computer instructions are used to enable the computer to execute any one of the methods described in the first aspect or the second aspect.
[0053] As can be seen from the above, the access request processing method based on the server cluster and the related equipment provided by the present disclosure incorporate SGX into the entire container cluster, set trusted computing nodes and ordinary computing nodes in a container cluster, provide trusted computing resources including SGX through trusted computing nodes, and provide ordinary computing resources including CPU through ordinary computing nodes. A heterogeneous cluster including trusted computing nodes and ordinary computing nodes can be maintained through a control plane component to reduce maintenance costs; the memory area type and memory area availability of the node are uploaded to the control plane component through the trusted computing node and the ordinary computing node, so that the control plane component can respond to the application access request sent by the client based on the memory area type and memory area availability of each node without cross-cluster implementation, thereby supporting more flexible heterogeneous task orchestration and avoiding some CPU-intensive data preprocessing work from wasting precious SGX resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] In order to more clearly illustrate the technical solutions in the present disclosure or related technologies, the drawings required for use in the embodiments or related technical descriptions are briefly introduced below. Obviously, the drawings described below are only embodiments of the present disclosure. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0055] Figure 1 A schematic diagram showing an exemplary microservice architecture according to an embodiment of the present disclosure is shown;
[0056] Figure 2 A schematic diagram showing a flow chart of an exemplary method provided by an embodiment of the present disclosure is shown;
[0057] Figure 3 A schematic diagram showing a flow chart of an exemplary method provided by an embodiment of the present disclosure is shown;
[0058] Figure 4 A schematic diagram showing an exemplary device provided by an embodiment of the present disclosure is shown;
[0059] Figure 5 A schematic diagram showing an exemplary device provided by an embodiment of the present disclosure is shown;
[0060] Figure 6 A schematic diagram of the structure of an exemplary electronic device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0061] In order to make the objectives, technical solutions and advantages of the present disclosure more clearly understood, the present disclosure is further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0062] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present disclosure should be understood by people with ordinary skills in the field to which the present disclosure belongs. The "first", "second" and similar words used in the embodiments of the present disclosure do not indicate any order, quantity or importance, but are only used to distinguish different components. "Including" or "comprising" and similar words mean that the elements or objects appearing before the word cover the elements or objects listed after the word and their equivalents, without excluding other elements or objects. "Connect" or "connected" and similar words are not limited to physical or mechanical connections, but can include electrical connections, whether direct or indirect. "Up", "down", "left", "right" and the like are only used to indicate relative positional relationships. When the absolute position of the described object changes, the relative positional relationship may also change accordingly.
[0063] In traditional technologies, applications in container clusters run in ordinary memory. However, with the widespread popularity of SGX (Software Guard Extensions), a set of software protection technologies provided by Intel based on its CPU hardware, and the increasing security requirements of some applications, the management of trusted hardware resources represented by SGX has become very important in the trusted computing scenario.
[0064] Currently, the management of SGX machines and corresponding tasks is mostly done manually. When the driver and kernel version of the SGX machine are appropriate, the container is started through Docker. The service management system service (ASEMService, Intel SGX Application Enclave Services Manager Service) of the application security container needs to be manually started in the container and the address of the authentication certificate (PCCS url) needs to be filled in before the corresponding compiled enclave application can be run. At the same time, the running status of the task also needs to be manually checked on the machine. If there are multiple SGX machines, the specific mapping relationship between tasks and machines needs to be manually maintained.
[0065] However, when SGX technology is introduced into a container cluster, a group of SGX machines usually need to be managed as a separate cluster, which increases the complexity of operation and maintenance and increases management costs. At the same time, if a more complex training orchestration mode needs to be implemented, for example, some subtasks of a task that do not require high security run on pure CPU machines, and other subtasks with high security requirements run on SGX machines, it needs to be implemented across container clusters, which will bring huge network communication overhead.
[0066] In view of this, the present disclosure provides an access request processing method based on a container cluster, wherein each node uploads the memory area type and the available amount of the memory area of the node to the control plane component; wherein the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area; when the control plane component receives an application access request sent by a client, the control plane component parses the application access request to obtain the usage of the trusted memory area and / or the usage of the common memory area; thereafter, the control plane component sends the application access request to the trusted computing node based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, so that the trusted memory area of the trusted computing node responds to the application access request; and / or, based on the usage of the common memory area and the available amount of the memory area of the common computing node, the application access request is sent to the common computing node, so that the common memory area of the common computing node responds to the application access request. In this way, SGX is incorporated into the entire container cluster, and trusted computing nodes and ordinary computing nodes are set in a container cluster. Trusted computing nodes provide trusted computing resources including SGX, and ordinary computing nodes provide ordinary computing resources including CPU. A heterogeneous cluster including trusted computing nodes and ordinary computing nodes can be maintained by a control plane component, thereby reducing maintenance costs. The memory area type and memory area availability of the node are uploaded to the control plane component through the trusted computing nodes and ordinary computing nodes, so that the control plane component can respond to the application access request sent by the client based on the memory area type and memory area availability of each node without the need for cross-cluster implementation, thereby supporting more flexible heterogeneous task orchestration and avoiding some CPU-intensive data preprocessing work from wasting precious SGX resources.
[0067] Figure 1 FIG. 1 is a schematic diagram showing an exemplary microservice architecture 100 of the disclosed embodiment. Figure 1 As shown, the microservice architecture 100 may include a server 200 and a client 300 .
[0068] In some embodiments, Figure 1As shown, the server 200 may be a server cluster, and the server cluster includes a control plane component 201 and at least one node connected to the control plane component 201. The node may include a trusted computing node 202 and an ordinary computing node 203. Among them, the trusted computing node 201 is provided with a trusted memory area, and the trusted memory area may be a secure memory of SGX (i.e., SGX EPC Memory), and applications or requests with relatively high security deployed in the server cluster can be run in the trusted memory area; the ordinary computing node 203 is provided with an ordinary memory area, and the ordinary memory area may be a CPU memory, and references or requests with lower security requirements can be run in the ordinary memory area.
[0069] Optionally, the attributes of each node include a memory area type and a memory area available amount. Among them, the memory area type is used to determine whether the node is a trusted computing node 202 or a common computing node 203; when the node is a trusted computing node 202, the available amount of the node's memory area is the available amount of the trusted memory area in the trusted computing node 202; when the node is a common computing node 203, the available amount of the node's memory area is the available amount of the common memory area in the common computing node 203. In some embodiments, the server cluster further includes a load balancer (LoadBalance), an API server, and the like. Among them, the load balancer can allocate application access requests 302 from the client 300 according to load balancing rules. API server, that is, an application programming interface (API) server. The API server can be implemented as an API gateway and can have a gateway function, and functions unrelated to the business (for example, routing, authentication, current limiting security, etc.) can be processed in the API server. In addition, the server cluster can also include other devices or components, which are not limited in this embodiment.
[0070] In some embodiments, the server cluster is deployed as Kubernetes. Kubernetes, referred to as K8s, is an open source containerized application for managing multiple hosts in a cloud platform.
[0071] The control plane component 201 may be a Kubernetes scheduler, such as kube-scheduler, through which the pod may be placed on a suitable node so that the node runs the pod. Pod is the smallest deployable computing unit that can be created and managed in Kubernetes, such as a container.
[0072] The control plane component 201 is respectively connected to the trusted computing node 202 and the common computing node 203 in the server cluster, and the trusted computing node 202 and the common computing node 203 will obtain the memory area type and the available amount of the memory area of each node, and send the obtained memory area type and the available amount of the memory area to the control plane component 201. Among them, the memory area type of the trusted computing node 202 is the trusted memory area, and the available amount of its memory area is the size of the remaining trusted memory area on the node, for example, the available amount of the trusted memory area in the trusted computing node 202 can be the difference between the total amount of the trusted memory area in the node and the number of the occupied trusted memory area; the memory area type of the common computing node 203 is the common memory area, and the available amount of its memory area is the size of the remaining common memory area on the node, for example, the available amount of the common memory area in the common computing node 203 can be the difference between the total amount of the common memory area in the node and the number of the occupied common memory area, which is not limited in this embodiment.
[0073] In some embodiments, the trusted computing node 202 and the ordinary computing node 203 are both provided with a device plug-in (Device Plugin), and the memory area type and memory area available amount of each node are obtained through the interaction between the device plug-ins provided by the trusted computing node 202 and the ordinary computing node 203 and the host kernel (Host Kernel) of each node.
[0074] like Figure 2 As shown, the trusted computing node 202 is provided with a device plug-in (SGX DevicePlugin, SDP) 2022 of the trusted computing node, and the device plug-in 2022 of the trusted computing node interacts with the host kernel 2023 of the trusted computing node to obtain the memory area type and the available amount of the memory area on the trusted computing node 202, and uploads them to the control plane component 201. Optionally, the device plug-in 2022 of the trusted computing node interacts with the host kernel 2023 of the current trusted computing node 202 through the assembly instruction set of CPUID to obtain the memory area type and the available amount of the memory area of the node.
[0075] Optionally, the trusted computing node 202 is provided with a node agent (kubelet) 2021 of the trusted computing node. After obtaining the memory area type and the available amount of memory area of the node, the device plug-in 2022 of the trusted computing node 202 sends the memory area type and the available amount of memory area of the node to the node agent 2021 of the node, so as to send the memory area type and the available amount of memory area of the node to the control plane component 201 through the node agent 2021.
[0076] like Figure 2As shown, the common computing node 203 is provided with a common computing node device plug-in (CPU DevicePlugin) 2032, and the common computing node device plug-in 2032 interacts with the host kernel 2033 of the common computing node to obtain the memory area type and memory area available amount on the common computing node 203, and uploads them to the control plane component 201. Optionally, the common computing node device plug-in 2032 interacts with the host kernel 2033 of the current common computing node through the assembly instruction set of CPUID to obtain the memory area type and memory area available amount of the node.
[0077] Optionally, the ordinary computing node 203 is provided with a node agent (kubelet) 2031 of the ordinary computing node. After obtaining the memory area type and memory area availability of the node, the device plug-in 2032 of the ordinary computing node 203 sends the memory area type and memory area availability of the node to the node agent 2031 of the node, so as to send the memory area type and memory area availability of the node to the control plane component 201 through the node agent 2031.
[0078] The CPUID opcode is a processor supplementary instruction for the x86 architecture. Its name is derived from CPU identification, and its function is to allow software to discover detailed information about the processor. Therefore, through the interaction between the CPUID assembly instruction set and the host kernel, the memory area type and memory area available amount of the node can be immediately obtained.
[0079] In some embodiments, the device plug-in 2032 of the trusted computing node and the device plug-in 2032 of the common computing node are deployed on each node of the Kubernetes server cluster according to the resources of Daemonset. Daemonset is a way to deploy applications within Kubernetes. It will automatically run a pod on each Node node. When a new Node node joins the cluster, no configuration is required. The new Node node will also automatically run the set process without additional operation.
[0080] In some embodiments, each node connected to the control plane component 201 can obtain the memory area type and memory area available amount of each node, and send the memory area type and memory area available amount of the node to the control plane component 201. Each node can obtain the memory area type and memory area available amount of each node at a predetermined time and send them to the control plane component 201; or each node can also obtain the memory area type and memory area available amount of each node in real time and send them to the control plane component 201; or each node can also obtain the memory area type and memory area available amount of each node when the available amount of its memory area changes and send them to the control plane component 201, which is not limited in this embodiment.
[0081] That is, in this embodiment, the trusted computing node 202 and the ordinary computing node 203 can report the memory area type and the available amount of the memory area of their respective nodes to the control plane component 201 in real time; or, the trusted computing node 202 and the ordinary computing node 203 can report the memory area type and the available amount of the memory area of their respective nodes to the control plane component 201 at a regular interval; or, the trusted computing node 202 and the ordinary computing node 203 report their respective memory area types when they are first deployed, and then report the memory area type and the available amount of the memory area of their respective nodes to the control plane component 201 at a regular interval; or, when the available amount of the memory area changes, the memory area type and the available amount of the memory area of their respective nodes are reported to the control plane component 201, and this embodiment does not impose any restrictions on this.
[0082] After the trusted computing node 202 and the ordinary computing node 203 report the memory area type and the available amount of the memory area of their respective nodes to the control plane component 201, the control plane component 201 receives the memory area type and the available amount of the memory area sent by each node, and can know whether each node in the server cluster belongs to the trusted computing node 202 or the ordinary computing node 203, and can also determine the available amount of the memory area on each node. In this way, the trusted memory area on the trusted computing node 202 and the ordinary memory area on the ordinary computing node 203 can be recognized as a resource by the Kubernetes cluster.
[0083] In this way, when the control plane component 201 receives an application access request 302 sent by the user through the client 300, the control plane component 201 can parse the application access request 302 to obtain the usage of the trusted memory area and / or the usage of the ordinary memory area, and based on the usage of the trusted memory area and the available memory area of the trusted computing node 202, send the application access request to the trusted computing node 202, so that the trusted memory area of the trusted computing node 202 responds to the application access request; and / or, based on the usage of the ordinary memory area and the available memory area of the ordinary computing node, send the application access request to the ordinary computing node 203, so that the ordinary memory area of the ordinary computing node 203 responds to the application access request.
[0084] That is, in this embodiment, when the control plane component 201 parses the application access request 302 and determines that the resource required by the request is a trusted memory area, the control plane component 201 sends the application access request 302 to the trusted computing node 202 based on the usage of the trusted memory area determined by the request, and the trusted computing node 202 responds to the application access request 302; when the available amount of the trusted memory area of a trusted computing node 202 is less than the usage of the trusted memory area required in the request, the application access request 302 can be sent to multiple trusted computing nodes 202, and the multiple trusted computing nodes 202 jointly respond to the application access request 302.
[0085] When the control plane component 201 parses the application access request 302 and determines that the resource required for the request is the ordinary memory area, the control plane component 201 sends the application access request 302 to the ordinary computing node 203 based on the usage of the ordinary memory area determined by the request, and the ordinary computing node 203 responds to the application access request 302; when the available amount of the ordinary memory area of an ordinary computing node 203 is less than the usage of the ordinary memory area required in the request, the application access request 302 can be sent to multiple ordinary computing nodes 203, and multiple ordinary computing nodes 203 jointly respond to the application access request 302.
[0086] When the control plane component 201 parses the application access request 302 and determines that the resources required for the request include both trusted memory areas and ordinary memory areas, the control plane component 201 sends the application access request 302 to one or more of the trusted computing nodes 202 based on the usage of the trusted memory area determined by the request, and sends the application access request 302 to one or more of the ordinary computing nodes 203 based on the usage of the ordinary memory area determined by the request, and one or more of the trusted computing nodes 202 and one or more ordinary computing nodes 203 jointly respond to the application access request 302.
[0087] In some embodiments, the trusted computing node 202 includes a first trusted computing node and a second trusted computing node. The control plane component 201 parses the application access request 302 to obtain a first application access task corresponding to the application access request 302 .
[0088] When the available amount of the memory area of the first trusted computing node is greater than or equal to the usage of the trusted memory area, the first application access task is sent to the first trusted computing node so that the trusted memory area of the first trusted computing node processes the first application access task.
[0089] When the available amount of the memory area of the first trusted computing node is less than the usage of the trusted memory area, and the sum of the available amounts of the memory areas of the first trusted computing node and the second trusted computing node is greater than or equal to the usage of the trusted memory area, part of the first application access task is sent to the first trusted computing node and another part of the first application access task is sent to the second trusted computing node, so that the trusted memory areas of the first trusted computing node and the second trusted computing node can collaboratively process the first application access task.
[0090] Optionally, when the sum of the available amounts of the memory areas of the first trusted computing node and the second trusted computing node is less than the usage of the trusted memory area, part of the first application access task is sent to the first trusted computing node, part of the first application access task is sent to the second trusted computing node, and part of the first application access task is sent to the third trusted computing node in the trusted computing node 202, so that the trusted memory areas of the first trusted computing node, the second trusted computing node, and the third trusted computing node can collaboratively process the first application access task, which is not limited in this embodiment. Alternatively, the first application access task can also be sent to one or more trusted computing nodes according to other rules, and it is only necessary to ensure that the usage of the trusted memory area required for at least part of the first application access task allocated to a certain trusted computing node is less than or equal to the available amount of the memory area of the trusted computing node, which is not limited in this embodiment.
[0091] In some embodiments, the common computing node 203 includes a first common computing node and a second common computing node. The control plane component 201 parses the application access request 302 to obtain a second application access task corresponding to the application access request 302 .
[0092] When the available amount of the memory area of the first ordinary computing node is greater than or equal to the usage of the ordinary memory area, the second application access task is sent to the first ordinary computing node so that the ordinary memory area of the first ordinary computing node processes the second application access task.
[0093] When the available amount of the memory area of the first ordinary computing node is less than the usage of the ordinary memory area, and the sum of the available amounts of the memory areas of the first ordinary computing node and the second ordinary computing node is greater than or equal to the usage of the ordinary memory area, part of the second application access task is sent to the first ordinary computing node and another part of the second application access task is sent to the second ordinary computing node, so that the trusted memory areas of the first ordinary computing node and the second ordinary computing node can collaboratively process the second application access task.
[0094] Optionally, when the sum of the available memory areas of the first ordinary computing node and the second ordinary computing node is less than the usage of the ordinary memory area, part of the second application access task is sent to the first ordinary computing node, part of the second application access task is sent to the second ordinary computing node, and part of the second application access task is sent to the third ordinary computing node in the ordinary computing node 203, so that the trusted memory areas of the first ordinary computing node, the second ordinary computing node and the third ordinary computing node can collaboratively process the second application access task. Alternatively, the second application access task can also be sent to one or more ordinary computing nodes according to other rules, and it is only necessary to ensure that the usage of the ordinary memory area required by at least part of the second application access tasks allocated to a certain ordinary computing node is less than or equal to the available memory area of the ordinary computing node. This embodiment does not impose any restrictions on this.
[0095] Optionally, in the above embodiment, after parsing the application access request 302, the control plane component 201 may obtain only the first application access task or the second application access task, or may obtain both the first application access task and the second application access task at the same time, which is not limited in this embodiment.
[0096] In this embodiment, since the Kubernetes server cluster can already perceive the trusted memory area on the trusted computing node 202 and the ordinary memory area on the ordinary computing node 203, the control plane component 201 can allocate the Pod that requires the trusted memory area resources to the trusted computing node 202, and allocate the Pod that requires the ordinary memory area resources to the ordinary computing node 203.
[0097] In this embodiment, after each node receives an application access request sent by the control plane component 201, when the node is a trusted computing node 202, it responds to the application access request based on the trusted memory area of the node; when the node is an ordinary computing node 203, it responds to the application access request based on the ordinary memory area of the node.
[0098] In some embodiments, when the node is a trusted computing node 202, the node agent 2021 of the trusted computing node 202 receives the application access request 302, and can call the interface of the device plug-in 2022 of the trusted computing node, and request the device plug-in 2022 to allocate a trusted memory area based on the application access request 302.
[0099] The device plug-in 2022 of the trusted computing node returns the service information of the trusted memory area to the node agent 2021 of the trusted computing node based on the allocation request; wherein the service information of the trusted memory area is generated based on the deployment of the trusted computing node 202 in the server cluster. Optionally, the service information includes the device list information of the trusted memory area (for example, taking 10 Mib SGX EPC Memory as a device) and the mount directory of the socket of the application security container service management system (AESM) of the host machine.
[0100] After the node agent 2021 of the trusted computing node obtains the service information based on the trusted memory area, it can create a container based on the service information, and then the node agent 2021 starts a pod through interfaces such as the container network interface (CNI), the container runtime interface (CRI) and the container storage interface (CSI), and the compiled enclave application, that is, the application included in the application access request, can be directly run in the pod.
[0101] In some embodiments, when the node is a common computing node 203 , the node agent 2031 of the common computing node 203 receives the application access request 302 , and requests the device plug-in 2032 to allocate a common memory area based on the application access request 302 .
[0102] In some embodiments, when the trusted computing node 202 is deployed, the mount directory of the service information for starting the SGX trusted memory area can be encapsulated and stored on the device plug-in. In this way, when it is necessary to obtain SGX resources, the node agent 2021 of the trusted computing node 202 obtains the service management system of the application security container (i.e., ASEM service) based on the mount directory of the service management system of the application security container, and obtains the address of the remote authentication certificate (PCCS url) from the service management system of the application security container to obtain the remote authentication certificate according to the address of the remote authentication certificate. The remote authentication certificate can realize remote authentication between platforms and is used for the remote authenticator to authenticate the identity information of the enclave.
[0103] After obtaining the remote authentication certificate, the client 300 can be remotely authenticated based on the remote authentication certificate; when the remote authentication is successful, it proves that the current hardware entity or the combination of hardware and software has gained the trust of the remote service provider, so that the service provider can safely provide the requested secrets to the client, so that the node agent 2021 creates and starts a container to run the application included in the application access request through the container.
[0104] In other embodiments, when interactions between multiple nodes are involved, the node agent 2021 of the trusted computing node 202 obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the inter-node authentication certificate from the service management system, and obtains the inter-node authentication certificate based on the address of the inter-node authentication certificate. The inter-node authentication certificate can realize authentication between nodes, especially between trusted computing nodes 202 in the same server cluster, and is used to verify whether the current trusted computing node and the target trusted computing node are running on the same platform.
[0105] Specifically, when the current trusted computing node reports its identity to other trusted computing nodes in the same server cluster, it first obtains the identity information and attributes of the current trusted computing node, the platform hardware TCB information, and attaches the data that the user wants to interact with to generate a report structure; then it obtains the report key of the target trusted computing node, generates a MAC tag for the report structure, forms the final report structure and passes it to the target trusted computing node, which verifies whether the trusted computing node requesting the identity report is running on the same platform as itself.
[0106] When the inter-node authentication is successful, it proves that the current trusted computing node and the current target trusted computing node are running in the same server cluster, so that the current trusted computing node can interact with the target trusted computing node to respond to the application access request.
[0107] In the above embodiment, SGX is incorporated into the entire Kubernetes server cluster as a special hardware resource. Only one large heterogeneous cluster of SGX / CPU needs to be maintained, thereby reducing maintenance costs. The containerized SGX enclave training process ensures that the host-level AESM service can be reused, reducing the mental burden of using SGX enclave applications. More flexible heterogeneous task scheduling can be supported to avoid some CPU-intensive data preprocessing work from wasting precious SGX machine support work resources. The service management system of the application security container and information such as authentication certificates and SGX startup-related service information are encapsulated in the device plug-in. SGX Enclave tasks are submitted in the heterogeneous cluster through the declarative API of Kubernetes, and the corresponding implementation details are shielded from the user. The user's container does not need to pay attention to anything other than the enclave application code, including the startup of PCCSurl and AESM services. Relying on the capabilities of Kubernetes, tasks on failed nodes can be automatically migrated to other nodes for retraining.
[0108] The disclosed embodiment also provides an access request processing method based on a server cluster. Figure 2FIG. 1 is a flow chart showing a method for processing access requests based on a server cluster according to an embodiment of the present disclosure. Figure 2 As shown, the method is applied to Figure 1 The control plane component 201 in the embodiment of the present invention further comprises the following steps:
[0109] Step S101, receiving a memory area type and a memory area available amount sent by at least one node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area.
[0110] Step S103: receiving an application access request sent by the client, parsing the application access request to obtain a usage amount of the trusted memory area and / or a usage amount of the common memory area.
[0111] Step S105: Based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, the application access request is sent to the trusted computing node, so that the trusted memory area of the trusted computing node responds to the application access request; and / or, based on the usage of the ordinary memory area and the available amount of the memory area of the ordinary computing node, the application access request is sent to the ordinary computing node, so that the ordinary memory area of the ordinary computing node responds to the application access request.
[0112] The access request processing method based on the server cluster described in this embodiment incorporates SGX into the entire container cluster, sets trusted computing nodes and ordinary computing nodes in a container cluster, provides trusted computing resources including SGX through trusted computing nodes, and provides ordinary computing resources including CPU through ordinary computing nodes. A heterogeneous cluster including trusted computing nodes and ordinary computing nodes can be maintained through a control plane component, thereby reducing maintenance costs; the memory area type and memory area availability of the node are uploaded to the control plane component through the trusted computing node and the ordinary computing node, so that the control plane component can respond to the application access request sent by the client based on the memory area type and memory area availability of each node without cross-cluster implementation, thereby supporting more flexible heterogeneous task orchestration and avoiding some CPU-intensive data preprocessing work from wasting precious SGX resources.
[0113] In some embodiments, the trusted computing node includes a first trusted computing node and a second trusted computing node; the step S105 of sending the application access request to the trusted computing node based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node so that the trusted memory area of the trusted computing node responds to the application access request includes:
[0114] Step S201: parsing the application access request to obtain a first application access task corresponding to the application access request.
[0115] Step S203, in response to the available amount of the memory area of the first trusted computing node being greater than or equal to the usage of the trusted memory area, sending the first application access task to the first trusted computing node so that the trusted memory area of the first trusted computing node processes the first application access task.
[0116] Step S205, in response to the available amount of the memory area of the first trusted computing node being less than the usage of the trusted memory area, and the sum of the available amounts of the memory areas of the first trusted computing node and the second trusted computing node being greater than or equal to the usage of the trusted memory area, sending part of the first application access task to the first trusted computing node and sending another part of the first application access task to the second trusted computing node, so that the trusted memory areas of the first trusted computing node and the second trusted computing node collaboratively process the first application access task.
[0117] In some embodiments, the common computing node includes a first common computing node and a second common computing node; in step S105, based on the usage of the common memory area and the available amount of the memory area of the common computing node, sending the application access request to the common computing node so that the common memory area of the common computing node responds to the application access request includes:
[0118] Step S301: parsing the application access request to obtain a second application access task corresponding to the application access request.
[0119] Step S303, in response to the available amount of the memory area of the first ordinary computing node being greater than or equal to the usage of the ordinary memory area, sending the second application access task to the first ordinary computing node so that the ordinary memory area of the first ordinary computing node processes the second application access task.
[0120] Step S305, in response to the available amount of the memory area of the first ordinary computing node being less than the usage of the ordinary memory area, and the sum of the available amounts of the memory areas of the first ordinary computing node and the second ordinary computing node being greater than or equal to the usage of the ordinary memory area, a part of the second application access task is sent to the first ordinary computing node and another part of the second application access task is sent to the second ordinary computing node, so that the trusted memory areas of the first ordinary computing node and the second ordinary computing node can collaboratively process the second application access task.
[0121] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0122] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0123] The disclosed embodiment also provides an access request processing method based on a server cluster. Figure 3 FIG. 1 is a flow chart showing a method for processing access requests based on a server cluster according to an embodiment of the present disclosure. Figure 3 As shown, the method is applied to Figure 1 The trusted computing node 202 and the common computing node 203 in the embodiment further include the following steps:
[0124] Step S401, obtaining the memory area type and available amount of the node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area.
[0125] Step S403: Send the memory area type and available amount of the memory area of the node to the control plane component.
[0126] Step S405: receiving an application access request sent by the control plane component.
[0127] Step S407, in response to the node being a trusted computing node, responding to the application access request based on the trusted memory area of the node; or, in response to the node being a common computing node, responding to the application access request based on the common memory area of the node.
[0128] In some embodiments, the step S401 of obtaining the memory area type and available amount of the memory area of the node includes:
[0129] The memory area type and available amount of the memory area of the node are obtained through the interaction between the device plug-in set in the node and the host kernel of the node.
[0130] In some embodiments, the method further comprises:
[0131] The device plug-in interacts with the host kernel of the node through the assembly instruction set of CPUID to obtain the memory area type and memory area available amount of the node.
[0132] In some embodiments, after the device plug-in obtains the memory area type and the available amount of the memory area of the node, it further includes:
[0133] The memory area type and the available amount of the memory area of the node are sent to the control plane component through the node agent.
[0134] In some embodiments, in step S407, in response to the node being a trusted computing node, responding to the application access request based on the trusted memory area of the node includes:
[0135] Step S501: The node agent of the node receives the application access request, and requests the device plug-in to allocate a trusted memory area based on the application access request.
[0136] Step S503: the device plug-in returns service information of the trusted memory area to the node agent; the service information of the trusted memory area is generated based on the deployment of the trusted computing node.
[0137] Step S505: The node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container.
[0138] In some embodiments, the service information includes device list information of the trusted memory area and a mount directory of a service management system of an application security container.
[0139] In some embodiments, in step S505, the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container, including:
[0140] In step S601, the node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the remote authentication certificate from the service management system of the application security container to obtain the remote authentication certificate, and remotely authenticates the client based on the remote authentication certificate.
[0141] Step S603: in response to the remote authentication being successful, the node agent creates and starts a container to run the application included in the application access request through the container.
[0142] In some embodiments, in step S505, the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container, including:
[0143] In step S701, the node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the inter-node authentication certificate from the service management system to obtain the inter-node authentication certificate, and implements inter-node authentication between the current trusted computing node and other trusted computing nodes based on the inter-node authentication certificate.
[0144] Step S703: In response to the inter-node authentication being successful, the current trusted computing node interacts with other trusted computing nodes to respond to the application access request.
[0145] It should be noted that the method of the embodiment of the present disclosure can be performed by a single device, such as a computer or a server. The method of the present embodiment can also be applied in a distributed scenario and completed by multiple devices cooperating with each other. In the case of such a distributed scenario, one of the multiple devices can only perform one or more steps in the method of the embodiment of the present disclosure, and the multiple devices will interact with each other to complete the described method.
[0146] It should be noted that the above describes some embodiments of the present disclosure. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the above embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0147] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a control plane component. Figure 4 As shown, the control surface component includes:
[0148] The receiving unit 11 is configured to: receive a memory area type and a memory area available amount sent by at least one node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area.
[0149] The parsing unit 13 is configured to: receive an application access request sent by a client, and parse the application access request to obtain a usage amount of the trusted memory area and / or a usage amount of the common memory area.
[0150] The sending unit 15 is configured to: send the application access request to the trusted computing node based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, so that the trusted memory area of the trusted computing node responds to the application access request; and / or, send the application access request to the ordinary computing node based on the usage of the ordinary memory area and the available amount of the memory area of the ordinary computing node, so that the ordinary memory area of the ordinary computing node responds to the application access request.
[0151] In some embodiments, the trusted computing node includes a first trusted computing node and a second trusted computing node; the sending unit 15 is further configured to:
[0152] Parse the application access request to obtain a first application access task corresponding to the application access request; in response to the available amount of the memory area of the first trusted computing node being greater than or equal to the usage of the trusted memory area, send the first application access task to the first trusted computing node, so that the trusted memory area of the first trusted computing node processes the first application access task; in response to the available amount of the memory area of the first trusted computing node being less than the usage of the trusted memory area, and the sum of the available amounts of the memory areas of the first trusted computing node and the second trusted computing node being greater than or equal to the usage of the trusted memory area, send part of the first application access task to the first trusted computing node and send another part of the first application access task to the second trusted computing node, so that the trusted memory areas of the first trusted computing node and the second trusted computing node collaboratively process the first application access task.
[0153] In some embodiments, the common computing node includes a first common computing node and a second common computing node; the sending unit 15 is further configured to:
[0154] Parse the application access request to obtain a second application access task corresponding to the application access request; in response to the available amount of the memory area of the first ordinary computing node being greater than or equal to the usage of the ordinary memory area, send the second application access task to the first ordinary computing node, so that the ordinary memory area of the first ordinary computing node processes the second application access task; in response to the available amount of the memory area of the first ordinary computing node being less than the usage of the ordinary memory area, and the sum of the available amounts of the memory areas of the first ordinary computing node and the second ordinary computing node being greater than or equal to the usage of the ordinary memory area, send part of the second application access task to the first ordinary computing node and send another part of the second application access task to the second ordinary computing node, so that the trusted memory areas of the first ordinary computing node and the second ordinary computing node collaboratively process the second application access task.
[0155] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0156] The device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0157] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure further provides a node. The node may be a trusted computing node or a common computing node. Figure 5 As shown, the node includes:
[0158] The acquisition unit 21 is configured to: acquire the memory area type and the available amount of the memory area of the node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area.
[0159] The sending unit 23 is configured to send the memory area type and the available amount of the memory area of the node to the control plane component.
[0160] The receiving unit 25 is configured to receive an application access request sent by the control plane component.
[0161] The response unit 27 is configured to: in response to the node being a trusted computing node, respond to the application access request based on the trusted memory area of the node; or, in response to the node being a common computing node, respond to the application access request based on the common memory area of the node.
[0162] In some embodiments, the acquisition unit 21 is further configured to:
[0163] The memory area type and available amount of the memory area of the node are obtained through the interaction between the device plug-in set in the node and the host kernel of the node.
[0164] In some embodiments, the apparatus is further configured to:
[0165] The device plug-in interacts with the host kernel of the node through the assembly instruction set of CPUID to obtain the memory area type and memory area available amount of the node.
[0166] In some embodiments, the apparatus is further configured to:
[0167] The memory area type and the available amount of the memory area of the node are sent to the control plane component through the node agent.
[0168] In some embodiments, the response unit 27 is further configured to:
[0169] The node agent of the node receives the application access request, and requests the device plug-in to allocate a trusted memory area based on the application access request; the device plug-in returns service information of the trusted memory area to the node agent; the service information of the trusted memory area is generated based on the deployment of the trusted computing node; the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container.
[0170] In some embodiments, the service information includes device list information of the trusted memory area and a mount directory of a service management system of an application security container.
[0171] In some embodiments, the response unit 27 is further configured to:
[0172] The node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the remote authentication certificate from the service management system of the application security container to obtain the remote authentication certificate, and remotely authenticates the client based on the remote authentication certificate; in response to successful remote authentication, the node agent creates and starts a container to run the application included in the application access request through the container.
[0173] In some embodiments, the response unit 27 is further configured to:
[0174] The node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the inter-node authentication certificate from the service management system to obtain the inter-node authentication certificate, and implements inter-node authentication between the current trusted computing node and other trusted computing nodes based on the inter-node authentication certificate; in response to successful inter-node authentication, the current trusted computing node interacts with other trusted computing nodes to respond to the application access request.
[0175] For the convenience of description, the above device is described by dividing it into various modules according to its functions. Of course, when implementing the present disclosure, the functions of each module can be implemented in the same or multiple software and / or hardware.
[0176] The device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0177] Based on the same inventive concept, corresponding to any of the above-mentioned embodiment methods, the present disclosure also provides a server cluster, including a control plane component as described in the above-mentioned embodiment and at least one node as described in the above-mentioned embodiment; wherein, the node includes at least one trusted computing node and at least one ordinary computing node connected to the control plane component, the trusted computing node is provided with a trusted memory area, and the ordinary computing node is provided with an ordinary memory area.
[0178] The server cluster of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be described in detail here.
[0179] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the method described in any of the above embodiments is implemented.
[0180] Figure 6 A more specific schematic diagram of the hardware structure of an electronic device provided in this embodiment is shown, and the device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. The processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are connected to each other through the bus 1050 in the device.
[0181] The processor 1010 can be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.
[0182] The memory 1020 may be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage device, dynamic storage device, etc. The memory 1020 may store an operating system and other application programs. When the technical solutions provided in the embodiments of this specification are implemented by software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.
[0183] The input / output interface 1030 is used to connect the input / output module to realize information input and output. The input / output module can be configured in the device as a component (not shown in the figure), or it can be externally connected to the device to provide corresponding functions. The input device may include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device may include a display, a speaker, a vibrator, an indicator light, etc.
[0184] The communication interface 1040 is used to connect a communication module (not shown) to realize communication interaction between the device and other devices. The communication module can realize communication through a wired mode (such as USB, network cable, etc.) or a wireless mode (such as mobile network, WIFI, Bluetooth, etc.).
[0185] The bus 1050 includes a path that transmits information between the various components of the device (eg, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).
[0186] It should be noted that, although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040 and the bus 1050, in the specific implementation process, the device may also include other components necessary for normal operation. In addition, it can be understood by those skilled in the art that the above device may also only include the components necessary for implementing the embodiments of the present specification, and does not necessarily include all the components shown in the figure.
[0187] The electronic device of the above embodiment is used to implement the corresponding method in any of the above embodiments, and has the beneficial effects of the corresponding method embodiment, which will not be described in detail here.
[0188] Based on the same inventive concept, corresponding to any of the above-mentioned embodiments and methods, the present disclosure also provides a non-transitory computer-readable storage medium, wherein the non-transitory computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the method described in any of the above embodiments.
[0189] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented 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 technology, read-only compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
[0190] The computer instructions stored in the storage medium of the above embodiments are used to enable the computer to execute the method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be repeated here.
[0191] Those skilled in the art should understand that the discussion of any of the above embodiments is merely illustrative and is not intended to imply that the scope of the present disclosure (including the claims) is limited to these examples. Based on the concept of the present disclosure, the technical features in the above embodiments or different embodiments may be combined, the steps may be implemented in any order, and there are many other variations of the different aspects of the embodiments of the present disclosure as described above, which are not provided in detail for the sake of simplicity.
[0192] In addition, to simplify the description and discussion, and in order not to make the embodiments of the present disclosure difficult to understand, the known power / ground connections to the integrated circuit (IC) chips and other components may or may not be shown in the provided figures. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present disclosure difficult to understand, and this also takes into account the fact that the details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present disclosure will be implemented (that is, these details should be fully within the scope of understanding of those skilled in the art). Where specific details (e.g., circuits) are set forth to describe exemplary embodiments of the present disclosure, it is apparent to those skilled in the art that the embodiments of the present disclosure can be implemented without these specific details or with changes in these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.
[0193] Although the present disclosure has been described in conjunction with specific embodiments of the present disclosure, many replacements, modifications and variations of these embodiments will be apparent to those skilled in the art from the foregoing description. For example, other memory architectures (e.g., dynamic RAM (DRAM)) may use the embodiments discussed.
[0194] The embodiments of the present disclosure are intended to cover all such substitutions, modifications and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present disclosure should be included in the scope of protection of the present disclosure.
Claims
1. A method for processing access requests based on a server cluster, characterized in that: Applied to a server cluster, the server cluster comprising a control plane component and at least one node connected to the control plane component; The control plane component executing the method includes: Receiving a memory area type and a memory area available amount sent by at least one node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area; Receiving an application access request sent by a client, parsing the application access request to obtain a usage amount of a trusted memory area and a usage amount of a common memory area; Based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, the application access request is sent to the trusted computing node so that the trusted memory area of the trusted computing node responds to the application access request, including: the node agent of the node receives the application access request, and requests the device plug-in to allocate the trusted memory area based on the application access request; the device plug-in returns service information of the trusted memory area to the node agent; the service information of the trusted memory area is generated based on the deployment of the trusted computing node; the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container; based on the usage of the ordinary memory area and the available amount of the memory area of the ordinary computing node, the application access request is sent to the ordinary computing node so that the ordinary memory area of the ordinary computing node responds to the application access request.
2. The method according to claim 1, characterized in that The trusted computing node includes a first trusted computing node and a second trusted computing node; the sending the application access request to the trusted computing node based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, so that the trusted memory area of the trusted computing node responds to the application access request, includes: Parsing the application access request to obtain a first application access task corresponding to the application access request; In response to the available amount of the memory area of the first trusted computing node being greater than or equal to the usage amount of the trusted memory area, sending the first application access task to the first trusted computing node so that the trusted memory area of the first trusted computing node processes the first application access task; In response to the available amount of the memory area of the first trusted computing node being less than the usage of the trusted memory area, and the sum of the available amounts of the memory areas of the first trusted computing node and the second trusted computing node being greater than or equal to the usage of the trusted memory area, a portion of the first application access task is sent to the first trusted computing node and another portion of the first application access task is sent to the second trusted computing node, so that the trusted memory areas of the first trusted computing node and the second trusted computing node collaboratively process the first application access task.
3. The method according to claim 1, characterized in that The common computing node includes a first common computing node and a second common computing node; the sending the application access request to the common computing node based on the usage of the common memory area and the available amount of the memory area of the common computing node, so that the common memory area of the common computing node responds to the application access request, includes: parsing the application access request to obtain a second application access task corresponding to the application access request; In response to the available amount of the memory area of the first ordinary computing node being greater than or equal to the usage amount of the ordinary memory area, sending the second application access task to the first ordinary computing node so that the ordinary memory area of the first ordinary computing node processes the second application access task; In response to the fact that the available amount of the memory area of the first ordinary computing node is less than the usage of the ordinary memory area, and the sum of the available amounts of the memory areas of the first ordinary computing node and the second ordinary computing node is greater than or equal to the usage of the ordinary memory area, part of the second application access task is sent to the first ordinary computing node and another part of the second application access task is sent to the second ordinary computing node, so that the trusted memory areas of the first ordinary computing node and the second ordinary computing node jointly process the second application access task.
4. A method for processing access requests based on a server cluster, characterized in that: Applied to a server cluster, the server cluster comprising a control plane component and at least one node connected to the control plane component; The at least one node executing the method comprises: Obtaining a memory area type and an available amount of the memory area of the node; the memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area; Sending the memory area type and the available amount of the memory area of the node to the control plane component; Receiving an application access request sent by the control plane component; In response to the node being a trusted computing node, responding to the application access request based on the trusted memory area of the node, including: the node agent of the node receives the application access request, and requests the device plug-in to allocate a trusted memory area based on the application access request; the device plug-in returns service information of the trusted memory area to the node agent; the service information of the trusted memory area is generated based on the deployment of the trusted computing node; the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container; in response to the node being a common computing node, responding to the application access request based on the common memory area of the node.
5. The method according to claim 4, characterized in that The method of obtaining the memory area type and available amount of the memory area of the node includes: The memory area type and available amount of the memory area of the node are obtained through the interaction between the device plug-in set in the node and the host kernel of the node.
6. The method according to claim 5, characterized in that Also includes: The device plug-in interacts with the host kernel of the node through the assembly instruction set of CPUID to obtain the memory area type and memory area available amount of the node.
7. The method according to claim 5, characterized in that After the device plug-in obtains the memory area type and the available amount of the memory area of the node, the device plug-in further includes: The memory area type and the available amount of the memory area of the node are sent to the control plane component through the node agent.
8. The method according to claim 4, characterized in that The service information includes the device list information of the trusted memory area and the mount directory of the service management system of the application security container.
9. The method according to claim 8, characterized in that The node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container, including: The node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the remote authentication certificate from the service management system of the application security container to obtain the remote authentication certificate, and remotely authenticates the client based on the remote authentication certificate; In response to the remote authentication being successful, the node agent creates and starts a container to run the application included in the application access request through the container.
10. The method according to claim 8, characterized in that The node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container, including: The node agent obtains the service management system of the application security container based on the mount directory of the service management system of the application security container, obtains the address of the inter-node authentication certificate from the service management system to obtain the inter-node authentication certificate, and implements inter-node authentication between the current trusted computing node and other trusted computing nodes based on the inter-node authentication certificate; In response to the inter-node authentication being successful, the current trusted computing node interacts with other trusted computing nodes to respond to the application access request.
11. A control surface assembly, characterized in that: include: The receiving unit is configured to: receive a memory area type and an available amount of the memory area sent by at least one node; The memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area; The parsing unit is configured to: receive an application access request sent by a client, and parse the application access request to obtain a usage amount of a trusted memory area and a usage amount of a common memory area; A sending unit is configured to: send the application access request to the trusted computing node based on the usage of the trusted memory area and the available amount of the memory area of the trusted computing node, so that the trusted memory area of the trusted computing node responds to the application access request, including: the node agent of the node receives the application access request, and requests the device plug-in to allocate the trusted memory area based on the application access request; the device plug-in returns service information of the trusted memory area to the node agent; the service information of the trusted memory area is generated based on the deployment of the trusted computing node; the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container; based on the usage of the ordinary memory area and the available amount of the memory area of the ordinary computing node, send the application access request to the ordinary computing node, so that the ordinary memory area of the ordinary computing node responds to the application access request.
12. A node, characterized in that: include: The acquisition unit is configured to: acquire the memory area type and available amount of the memory area of the node; The memory area type is used to determine whether the node is a trusted computing node or a common computing node, the trusted computing node is provided with a trusted memory area, and the common computing node is provided with a common memory area; A sending unit is configured to: send the memory area type and the available amount of the memory area of the node to the control plane component; A receiving unit, configured to: receive an application access request sent by the control plane component; A response unit is configured to: in response to the node being a trusted computing node, respond to the application access request based on the trusted memory area of the node, including: the node agent of the node receives the application access request, and requests the device plug-in to allocate a trusted memory area based on the application access request; the device plug-in returns service information of the trusted memory area to the node agent; the service information of the trusted memory area is generated based on the deployment of the trusted computing node; the node agent creates and starts a container based on the service information of the trusted memory area to run the application included in the application access request through the container; in response to the node being a common computing node, respond to the application access request based on the common memory area of the node.
13. A server cluster, characterized in that: include: The control surface assembly according to claim 11; as well as At least one node as claimed in claim 12; The node is connected to the control plane component.
14. An electronic 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 program, the method according to any one of claims 1 to 3 or 4 to 10 is implemented.
15. A non-transitory computer-readable storage medium storing computer instructions, characterized in that: The computer instructions are used to cause the computer to execute the method according to any one of claims 1 to 3 or 4 to 10.
