Micro-service management method, system and device
By separating and deploying the microservice control plane and data plane in different clusters in the microservice architecture, the operation and maintenance difficulty caused by the deployment of the microservice control plane and data plane in the same cluster in the existing technology is solved, and higher business stability and operation and maintenance convenience are achieved.
Patent Information
- Application Number
- CN202411877445.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-18
- Publication Date
- 2025-04-25
AI Technical Summary
In the microservice architecture, the microservice control surface and data surface are deployed in the same user cluster, making it difficult for operation and maintenance personnel to directly troubleshoot abnormal problems, and tenants are prone to risk operations, increasing the difficulty of operation and maintenance.
By deploying the microservice control plane in the first cluster and deploying the microservice data plane in the second cluster, the microservice control plane realizes that the microservice configuration data and instance data of the target tenant from the first cluster, and distributes these data to the microservice data plane in the second cluster, so that the data plane manages microservices based on these data.
It realizes the decoupling of the microservice control plane and the data plane, reduces the risk operation probability of tenants on the control plane, improves business stability, and facilitates the ability of operation and maintenance personnel to manage and troubleshoot microservice abnormalities, and reduces the difficulty of operation and maintenance.
Smart Images

Figure CN119892588A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to the field of cloud computing technology. Background Art
[0002] Microservices architecture is an application architecture pattern that decomposes applications into small, autonomous service units that can be independently deployed, expanded, and maintained. Since microservices architecture can make application development more flexible and easier, more and more companies choose to use microservices architecture to develop applications in clusters.
[0003] Service Mesh technology is a technology used to manage communication between microservices. It aims to provide a platform-independent, language-independent, lightweight and non-intrusive microservice management solution.
[0004] In related technologies, when an enterprise applies service grid technology to manage microservices, it generally needs to build an instance of the microservice control plane and an instance of the microservice data plane in the user cluster it purchases or rents. The microservice control plane is responsible for sending management policies between microservices to the microservice data plane, including communication policies, security policies, etc.; the microservice data plane is used to perform specific microservice management operations according to the management policies issued by the microservice control plane. Summary of the invention
[0005] The present disclosure provides a microservice management method, system and device.
[0006] According to a first aspect of the present disclosure, a microservice management method is provided, which is applied to a first microservice control plane deployed in a first cluster in a microservice management system, wherein the microservice management system includes the first cluster and multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, and the method includes:
[0007] Acquire microservice configuration data of a target tenant stored in the first cluster, wherein the target tenant is: a tenant to which the first microservice control plane belongs;
[0008] Acquire microservice instance data of the target tenant stored in a third cluster, wherein the third cluster is: a second cluster in which a first microservice data plane of the target tenant is deployed;
[0009] The microservice configuration data and the microservice instance data are delivered to the first microservice data plane, so that the first microservice data plane manages the microservice based on the configuration data and the service data.
[0010] According to a second aspect of the present disclosure, a microservice management method is provided, which is applied to a first microservice data plane deployed in a third cluster in a microservice management system, wherein the microservice management system includes a first cluster and multiple second clusters, the third cluster is one of the multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, and the method includes:
[0011] Receive microservice configuration data and microservice instance data sent by a first microservice control plane of a target tenant, wherein the target tenant is: the tenant to which the first microservice data plane belongs;
[0012] The microservices are managed based on the configuration data and the service data.
[0013] According to a third aspect of the present disclosure, a microservice management system is provided, the microservice management system comprising a first cluster and multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, each second cluster is deployed with a microservice data plane of a tenant, wherein:
[0014] The first microservice control plane is used to read the microservice configuration data of the target tenant stored in the first cluster, and read the microservice instance data of the target tenant stored in the third cluster, and send the microservice configuration data and microservice instance data to the first microservice data plane of the target tenant, wherein the first microservice control plane is one of multiple microservice control planes, the target tenant is: the tenant to which the first microservice control plane belongs, and the third cluster is: the second cluster where the first microservice data plane is deployed;
[0015] The first microservice data plane is used to manage microservices based on the received configuration data and service data.
[0016] According to a fourth aspect of the present disclosure, a microservice management device is provided, which is applied to a first microservice control plane deployed in a first cluster in a microservice management system, wherein the microservice management system includes the first cluster and multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, and the device includes:
[0017] A configuration data acquisition module, used to obtain microservice configuration data of a target tenant stored in the first cluster, wherein the target tenant is: a tenant to which the first microservice control plane belongs;
[0018] An instance data acquisition module is configured to acquire microservice instance data of the target tenant stored in a third cluster, wherein the third cluster is a second cluster in which a first microservice data plane of the target tenant is deployed;
[0019] The data sending module is used to send the microservice configuration data and the microservice instance data to the first microservice data plane, so that the first microservice data plane manages the microservice based on the configuration data and the service data.
[0020] According to a fifth aspect of the present disclosure, a microservice management device is provided, which is applied to a first microservice data plane deployed in a third cluster in a microservice management system, wherein the microservice management system includes a first cluster and multiple second clusters, the third cluster is one of the multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, and the device includes:
[0021] An instance data receiving module, used to receive microservice configuration data and microservice instance data issued by a first microservice control plane of a target tenant, wherein the target tenant is: the tenant to which the first microservice data plane belongs;
[0022] A management module is used to manage microservices based on the configuration data and service data.
[0023] According to a sixth aspect of the present disclosure, there is provided an electronic device, including:
[0024] at least one processor; and
[0025] a memory communicatively connected to the at least one processor; wherein,
[0026] The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method described in the first aspect or the second aspect.
[0027] According to a seventh aspect of the present disclosure, a non-transitory computer-readable storage medium storing computer instructions is provided, wherein the computer instructions are used to cause the computer to execute the method described in the first aspect or the second aspect.
[0028] According to an eighth aspect of the present disclosure, a computer program product is provided, including a computer program, wherein the computer program implements the method described in the first aspect or the second aspect when executed by a processor.
[0029] From the above, it can be seen that in the solution provided by the embodiment of the present disclosure, the first microservice control plane of the target tenant can obtain the microservice configuration data of the target tenant from the first cluster, and obtain the microservice instance data of the target tenant from the third cluster, and then, the microservice configuration data and the microservice instance data can be sent to the first microservice data plane of the target tenant, so that the first microservice data plane manages the microservice based on the microservice configuration data and the microservice instance data.
[0030] It should be understood that the content described in this section is not intended to identify the key or important features of the embodiments of the present disclosure, nor is it intended to limit the scope of the present disclosure. Other features of the present disclosure will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0032] Figure 1 It is a structural diagram of a microservice management system in the related technology;
[0033] Figure 2 A flowchart of a first microservice management method provided in an embodiment of the present disclosure;
[0034] Figure 3 A flowchart of a second microservice management method provided in an embodiment of the present disclosure;
[0035] Figure 4 A schematic diagram of the structure of a first microservice management system provided in an embodiment of the present disclosure;
[0036] Figure 5 A schematic diagram of the structure of a second microservice management system provided in an embodiment of the present disclosure;
[0037] Figure 6 A schematic diagram of the structure of a third microservice management system provided in an embodiment of the present disclosure;
[0038] Figure 7 A schematic diagram of the structure of a fourth microservice management system provided in an embodiment of the present disclosure;
[0039] Figure 8 A schematic diagram of the structure of a first microservice management device provided in an embodiment of the present disclosure;
[0040] Fig. 9 A schematic diagram of the structure of a second microservice management device provided in an embodiment of the present disclosure;
[0041] Fig.10 It is a block diagram of an electronic device used to implement the microservice management method provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0042] The following is a description of exemplary embodiments of the present disclosure in conjunction with the accompanying drawings, including various details of the embodiments of the present disclosure to facilitate understanding, which should be considered as merely exemplary. Therefore, it should be recognized by those of ordinary skill in the art that various changes and modifications may be made to the embodiments described herein without departing from the scope and spirit of the present disclosure. Similarly, for the sake of clarity and conciseness, the description of well-known functions and structures is omitted in the following description.
[0043] First, the application scenarios of the solutions provided by the embodiments of the present disclosure are introduced.
[0044] The application scenario of the solution provided by the embodiment of the present disclosure is: a scenario of managing microservices created in a cluster.
[0045] In the related art, after tenants such as enterprises or individuals rent a user cluster on a cloud service platform, they can build instances of the microservice control plane and the microservice data plane in the user cluster to manage the microservices they create in the user cluster.
[0046] See also Figure 1 , which is a structural diagram of a microservice management system in the related art, wherein the microservice data plane includes multiple containers (Pod), such as container 1 and container 2, and each container includes a microservice and a microservice agent (Sidecar).
[0047] Among them, the microservice control plane and the microservice data plane are both deployed in the user cluster. The microservice control plane obtains the microservice configuration data and microservice instance data from the data acquisition service in the user cluster, and sends the above data to the microservice data plane. In this way, the microservice data plane can implement microservice management based on the above data, such as communication between microservices.
[0048] It can be seen that in the existing technical architecture, the microservice control plane and the microservice data plane are both deployed in the user cluster. This makes it difficult for the operation and maintenance personnel of the cloud service platform to directly troubleshoot abnormal problems that occur in microservices in the user cluster, and tenants are prone to perform risky operations on the control plane, resulting in greater difficulty in operation and maintenance.
[0049] In view of the above situation, an embodiment of the present disclosure provides a microservice management solution.
[0050] Some concepts involved in the embodiments of the present disclosure are introduced below.
[0051] 1. Cluster
[0052] A cluster is a group of independent computers connected via a network. They form a group and are managed as a single system. Enterprises or individuals (hereinafter referred to as tenants) can rent a cluster on a cloud service platform. For tenants, a cluster is like an independent device.
[0053] The cluster in the embodiments of the present disclosure may refer to a Kubernetes (K8s) cluster.
[0054] 2. The first cluster:
[0055] The first cluster refers to a cluster used to deploy a microservice control plane of a tenant, and microservice control planes of multiple tenants are deployed in the first cluster.
[0056] In the disclosed embodiment, the first cluster may be a cluster of a cloud service platform, which may be referred to as a hosted cluster, or an external cluster (external_cluster); it may also be referred to as a hosted virtual private cloud (Virtual Private Cloud, VPC).
[0057] 3. Second cluster:
[0058] The second cluster refers to a cluster used to deploy the microservice data plane of a tenant, and a microservice data plane of a tenant is deployed in each second cluster.
[0059] In the embodiment of the present disclosure, the first cluster is a cluster rented by a tenant on the cloud service platform, which may be called a user cluster, a business cluster, a tenant cluster, or a remote cluster (remote_cluster), etc.; it may also be called a user VPC.
[0060] The microservice management solution provided in the embodiment of the present disclosure is described in detail below. It should be noted that the microservice control plane in the embodiment of the present disclosure may also be called a control plane, a control plane, etc., and the microservice data plane may also be called a data plane, a data plane, etc.
[0061] See also Figure 2 , which is a flow chart of a first microservice management method provided in an embodiment of the present disclosure. The method is applied to a first microservice control plane deployed in a first cluster in a microservice management system. The method includes the following steps S201-S203.
[0062] Step S201: Acquire microservice configuration data of a target tenant stored in the first cluster.
[0063] The target tenant is the tenant to which the first microservice control plane belongs. In other words, the first microservice control plane is used to control the microservices created by the target tenant.
[0064] The above-mentioned microservice configuration data may include traffic forwarding policy data, security control policy data, etc. of the microservice, which is not limited in the embodiments of the present disclosure.
[0065] Among them, traffic forwarding policy data may include configuration data such as service routing, service fuse, and service current limiting, which are used to indicate the traffic forwarding method between microservices.
[0066] For example, the request forwarding policy data D1 is used to indicate that the traffic from microservice S1 to microservice S2 is distributed to different instances of microservice S2 according to a certain ratio, such as allocating 70% of the traffic to instance E1 of microservice S2 and 30% of the traffic to instance E2 of microservice S2.
[0067] Security control policy data can be used to indicate the authorization and authentication methods and fault handling methods between microservices, which will not be described in detail here.
[0068] Specifically, the microservice configuration data of the target tenant can be read in the following manner.
[0069] In one implementation, the storage location of the target tenant's microservice configuration data may be determined from the configuration data stored in the first cluster based on the target tenant's namespace, and then the target tenant's microservice configuration data may be read based on the storage location.
[0070] The staff can pre-set the namespaces of different tenants in the first cluster, and the microservice configuration data of each tenant can be defined in their respective corresponding namespaces. In this way, based on the namespaces of each tenant, the location of the microservice configuration data defined in the namespace can be determined.
[0071] Therefore, based on the namespace of the target tenant, the storage location of the microservice configuration data of the target tenant can be determined. The above storage location can be the starting address of the microservice configuration data, so that data can be read from the starting address until the data of the set length is read or the set data end mark is read, and the read data is used as the microservice configuration data of the target tenant.
[0072] It can be seen that in this way, the microservice configuration data of different tenants can be isolated by dividing different namespaces, so that the microservice configuration data of different tenants do not affect each other, and the logical isolation between the microservice configuration data of different tenants is achieved.
[0073] In another implementation, the first microservice data plane can directly read the microservice configuration data of the target tenant on the first setting node in the first cluster. That is, the microservice configuration data of the target tenant can be pre-stored in the first setting node in the first cluster, so that the first microservice data plane can directly read the microservice configuration data from the first setting node.
[0074] In another embodiment, a first network card corresponding to the first microservice control plane is deployed in the first cluster, so that the first microservice control plane can generate a first access request and send the first access request to the first network card, so that the first network card forwards the first access request to the configuration data acquisition service in the first cluster, and then obtains the microservice configuration data of the target tenant sent by the configuration information acquisition service.
[0075] The first network card deployed in the first cluster may be a virtual network card; the first access request is a request for obtaining microservice configuration data of a target tenant, and the destination address of the first access request belongs to the network segment of the first cluster.
[0076] After the first microservice control plane generates the first access request and sends the first access request to the first network card, the first network card can determine whether the destination address of the first access request belongs to the network segment of the first cluster according to the set routing policy. If so, it is determined that the first access request is a request for accessing the microservice configuration data, and therefore the first access request can be forwarded to the configuration data acquisition service.
[0077] The above-mentioned configuration data acquisition service can be understood as a component within the first cluster, which can be called the first interface service (APIServer). It provides a series of interfaces to the outside. After the first network card sends a first access request to the configuration data acquisition service, the interface for obtaining configuration data is called, and then the configuration data acquisition service can obtain the microservice configuration data of the target tenant and send the above-mentioned microservice configuration data to the first microservice control plane.
[0078] Among them, the configuration data acquisition service can read the microservice configuration data of the target tenant according to the previous implementation method, which will not be repeated here.
[0079] It can be seen that when the first microservice control plane obtains the microservice configuration data of the target tenant, it can first generate a first access request whose destination address belongs to the network segment of the first cluster. In this way, the first network card can determine that the first access request is a request for accessing the microservice configuration data according to the set routing rules. Therefore, the first network card can forward the first access request to the configuration data acquisition service in the first cluster, thereby enabling the first microservice control plane to conveniently obtain the microservice configuration data of the target tenant from the first cluster where it is located.
[0080] Step S202: Acquire the microservice instance data of the target tenant stored in the third cluster.
[0081] The third cluster is: the second cluster where the first microservice data plane of the target tenant is deployed.
[0082] The above-mentioned microservice instance data may include the instance name, microservice name, access address of the instance, etc. to which the instance belongs, which is not limited in the embodiments of the present disclosure.
[0083] Specifically, the microservice instance data of the target tenant stored in the third cluster may be obtained in the following manner.
[0084] In one implementation, a second network card corresponding to the first microservice control plane is deployed in the first cluster, so that the first microservice control plane can generate a second access request and send the second access request to the second network card, so that the second network card forwards the second access request to the instance data acquisition service in the third cluster.
[0085] The second access request is a request for obtaining microservice instance data of a target tenant, and the destination address of the second access request belongs to the network segment of the third cluster.
[0086] After the first microservice control plane generates a second access request and sends the second access request to the second network card, the second network card can determine whether the destination address of the second access request belongs to the network segment of the third cluster according to the set routing policy. If so, it is determined that the second access request is a request for accessing the microservice instance data in the third cluster, and therefore the second access request can be forwarded to the instance data acquisition service.
[0087] Similarly, the above-mentioned instance data acquisition service can be understood as a component within the first cluster, which can be called a second interface service. After the second network card sends a second access request to the instance data acquisition service, the interface for obtaining instance data is called, and then the instance data acquisition service can obtain the microservice instance data of the target tenant and send the above-mentioned microservice instance data to the first microservice control plane.
[0088] It can be seen that when the first microservice control plane obtains the microservice instance data of the target tenant, it can first generate a second access request whose destination address belongs to the network segment of the third cluster. In this way, the second network card can determine that the second access request is a request for accessing the microservice instance data in the third cluster according to the set routing rules. Therefore, the second network card can forward the second access request to the instance data acquisition service in the third cluster, thereby enabling the first microservice control plane to conveniently obtain the microservice instance data of the target tenant from the third cluster where the first microservice data plane is located.
[0089] In one embodiment of the present disclosure, the second network card is an elastic network card of an instance data acquisition service in the third cluster that is mounted in the first cluster.
[0090] The above elastic network card can also be called elastic network interface (Elastic Network Interfaces.ENI), which is a virtual network interface that provides a network interface and IP address for a service instance.
[0091] After the elastic network card of the instance data acquisition service in the third cluster is mounted in the first cluster, the first microservice control plane deployed in the first cluster can conveniently and efficiently access the instance data acquisition service in the third cluster based on the elastic network card, thereby efficiently acquiring the microservice instance data of the target tenant.
[0092] In another implementation, the first microservice data plane can directly read the microservice instance data of the target tenant on a set node in the third cluster. That is, the microservice instance data of the target tenant can be pre-stored in a set node of the third cluster, so that the first microservice data plane can directly read the microservice instance data from the above node.
[0093] Step S203: Send the microservice configuration data and the microservice instance data to the first microservice data plane, so that the first microservice data plane manages the microservice based on the microservice configuration data and the microservice instance data.
[0094] The meanings of the microservice configuration data and the microservice instance data have been introduced in the aforementioned steps S201 and S202. After the microservice configuration data and the microservice instance data are sent to the first microservice data plane, the first microservice data plane can execute corresponding traffic forwarding strategies, security control strategies, etc. according to the microservice configuration data and the microservice instance data, that is, manage the microservices.
[0095] From the above, it can be seen that in the solution provided by the embodiment of the present disclosure, the first microservice control plane of the target tenant can obtain the microservice configuration data of the target tenant from the first cluster, and obtain the microservice instance data of the target tenant from the third cluster, and then, the microservice configuration data and the microservice instance data can be sent to the first microservice data plane of the target tenant, so that the first microservice data plane manages the microservice based on the microservice configuration data and the microservice instance data.
[0096] Among them, the first microservice control plane of the target tenant is deployed in the first cluster, and the first microservice data plane of the target tenant is deployed in the third cluster. It can be seen that the first microservice control plane of the target tenant and the first microservice data plane are not located in the same cluster. In other words, the first microservice control plane of the target tenant and the first microservice data plane are deployed separately and isolated from each other, realizing the decoupling between the microservice control plane and the microservice data plane. In this way, without affecting the normal microservice management, the microservice control plane that the tenant does not need to perceive is split out from the cluster to which the microservice is deployed, reducing the probability of tenants performing risky operations on the control plane, improving the business stability of the tenant, and enabling operation and maintenance personnel to conveniently manage and troubleshoot microservice anomalies based on the microservice control plane, reducing the difficulty of operation and maintenance of microservices.
[0097] In addition, each microservice control plane can independently control the microservice data plane of the tenant to which it belongs. In this way, the microservice control planes of multiple tenants can be deployed in the first cluster through logical isolation, rather than the microservice control plane of one tenant monopolizing a cluster, thereby improving the utilization efficiency of cluster resources.
[0098] In one embodiment of the present disclosure, Figure 1 The method of the illustrated embodiment may further include the following steps A-B:
[0099] Step A: Receive management status information of the microservice reported by the first microservice data plane.
[0100] Among them, the above-mentioned management status information may include various status information such as traffic throughput, number of microservice instance connections, etc., which is not limited in the embodiments of the present disclosure.
[0101] Step B: Based on the management status information, update the microservice configuration data of the target tenant stored in the first cluster.
[0102] After receiving the above management status information, the first microservice control plane can update the microservice configuration data of the target tenant according to a preset optimization strategy.
[0103] In this embodiment, the first microservice data plane can report the management status information of the microservice to the first microservice control plane. The first microservice control plane can timely update the microservice configuration data of the target tenant according to the above management status information, thereby being able to dynamically adjust the management strategy of the microservice according to the changes in the microservice status, thereby improving the flexibility of the solution.
[0104] Corresponding to the above-mentioned microservice management method applied to the first microservice control plane, the embodiment of the present disclosure also provides a microservice management method applied to the first microservice data plane.
[0105] See also Figure 3 , which is a flow chart of a second microservice management method provided in an embodiment of the present disclosure. The above method is applied to the first microservice data plane deployed in the third cluster, and includes the following steps S301-S302.
[0106] Step S301: Receive microservice configuration data and microservice instance data sent by the first microservice control plane of the target tenant.
[0107] The meanings of microservice configuration data and microservice instance data are as mentioned above. Figure 2 Step S201 and step S202 of the illustrated embodiment are introduced and will not be repeated here.
[0108] Step S302: managing microservices based on microservice configuration data and microservice instance data.
[0109] After obtaining the microservice configuration data and the microservice instance data to manage the microservice, the first microservice data plane can execute corresponding traffic forwarding strategies, security control strategies, etc. according to the microservice configuration data and the microservice instance data, that is, manage the microservice.
[0110] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the first microservice control plane of the target tenant can send microservice configuration data and microservice instance data to the first microservice data plane of the target tenant, so that the first microservice data plane can manage microservices based on the microservice configuration data and microservice instance data.
[0111] Among them, the first microservice control plane of the target tenant is deployed in the first cluster, and the first microservice data plane of the target tenant is deployed in the third cluster. It can be seen that the first microservice control plane of the target tenant and the first microservice data plane are not located in the same cluster. In other words, the first microservice control plane of the target tenant and the first microservice data plane are deployed separately and isolated from each other, realizing the decoupling between the microservice control plane and the microservice data plane. In this way, without affecting the normal microservice management, the microservice control plane that the tenant does not need to perceive is separated from the cluster to which the microservice is deployed, reducing the probability of tenants generating risk operations on the control plane, and enabling operation and maintenance personnel to conveniently manage and troubleshoot abnormalities in microservices based on the microservice control plane, reducing the difficulty of operation and maintenance of microservices. In addition, each microservice control plane can independently control the microservice data plane of the tenant to which it belongs. In this way, the microservice control planes of multiple tenants can be deployed in the first cluster by logical isolation, rather than the microservice control plane of a tenant monopolizing a cluster, thereby improving the utilization efficiency of cluster resources.
[0112] In one embodiment of the present disclosure, the first microservice data plane may also report management status information of the microservice to the first microservice control plane, so that the first microservice control plane updates the microservice configuration data of the target tenant stored in the first cluster based on the management status information.
[0113] Among them, the meaning of the management status information and the way in which the first microservice control plane updates the microservice configuration data based on the management status information have been introduced in the aforementioned steps A and B, and will not be repeated here.
[0114] In this embodiment, the first microservice data plane can report the management status information of the microservice to the first microservice control plane, so that the first microservice control plane can timely update the microservice configuration data of the target tenant according to the above management status information, thereby being able to dynamically adjust the management strategy of the microservice according to the changes in the microservice status, thereby improving the flexibility of the solution.
[0115] In one embodiment of the present disclosure, a third network card corresponding to the first microservice data plane is deployed in the second cluster. In this way, after the first microservice data plane generates a third access request for the first microservice control plane, the third access request can be sent to the third network card, so that the third network card forwards the third access request to the first microservice control plane.
[0116] The third access request may be any type of access request to the first microservice control plane, such as a configuration data upload request, a configuration data acquisition request, a microservice instance data acquisition request, etc., which is not limited in the embodiment of the present disclosure.
[0117] The third network card may be a virtual network card, and the address of the third network card belongs to the network segment of the third cluster.
[0118] In this embodiment, when the first microservice data plane deployed in the third cluster accesses the first microservice control plane deployed in the first cluster, it is accessed indirectly through the third network card. Because the address of the third network card belongs to the network segment of the third cluster, for the target tenant of the third cluster, it is equivalent to accessing the first microservice control plane in the cluster it rents, thereby improving the tenant experience.
[0119] Corresponding to the above-mentioned microservice management method, the embodiment of the present disclosure also provides a microservice management system.
[0120] See also Figure 4, which is a structural diagram of a microservice management system provided by an embodiment of the present disclosure, wherein the microservice management system includes a first cluster and multiple second clusters, wherein the multiple second clusters include second cluster 1, second cluster 2, ... second cluster N; wherein the first cluster is deployed with multiple tenants' microservice control planes, such as microservice control plane 1, microservice control plane 2, ... microservice control plane N; each second cluster is deployed with a tenant's microservice data plane, such as second cluster 1 is deployed with microservice data plane 1, second cluster 2 is deployed with microservice data plane 2, ... second cluster N is deployed with microservice data plane N.
[0121] The first microservice control plane is used to read the microservice configuration data of the target tenant stored in the first cluster, and read the microservice instance data of the target tenant stored in the third cluster, and send the microservice configuration data and the microservice instance data to the first microservice data plane of the target tenant, wherein the first microservice control plane is one of the multiple microservice control planes, the target tenant is: the tenant to which the first microservice control plane belongs, and the third cluster is: the second cluster where the first microservice data plane is deployed;
[0122] The first microservice data plane is used to manage microservices based on the received configuration data and service data.
[0123] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the first microservice control plane of the target tenant is deployed in the first cluster, and the first microservice data plane of the target tenant is deployed in the third cluster. It can be seen that the first microservice control plane of the target tenant and the first microservice data plane are not located in the same cluster. In other words, the first microservice control plane and the first microservice data plane of the target tenant are deployed separately and isolated from each other, thereby achieving decoupling between the microservice control plane and the microservice data plane. In this way, while not affecting the normal management of microservices, the microservice control plane that the tenant does not need to perceive is split out from the cluster to which the microservice is deployed, reducing the probability of tenants performing risky operations on the control plane, and enabling operation and maintenance personnel to conveniently manage and troubleshoot anomalies in microservices based on the microservice control plane, thereby reducing the difficulty of operation and maintenance of microservices.
[0124] In addition, each microservice control plane can independently control the microservice data plane of the tenant to which it belongs. In this way, the microservice control planes of multiple tenants can be deployed in the first cluster through logical isolation, rather than the microservice control plane of one tenant monopolizing a cluster, thereby improving the utilization efficiency of cluster resources.
[0125] In one embodiment of the present disclosure, a load balancing module corresponding to the first microservice control plane is also deployed in the first cluster, and at least one replica control plane corresponding to the first microservice control plane is deployed. In this case,
[0126] The first microservice data plane is further used to generate a fourth access request of the first microservice control plane, and send the fourth access request to the load balancing module.
[0127] The load balancing module is used to execute the set load balancing strategy, determine the target control plane from the first microservice control plane and the replica control plane, and forward the fourth access request to the target control plane.
[0128] In this embodiment, when the first microservice data plane deployed in the third cluster accesses the first microservice control plane deployed in the first cluster, the generated fourth access request is first sent to the load balancing module corresponding to the first microservice control plane. In this way, the load balancing module can determine the target control plane in the space state according to the load conditions of the first microservice control plane and the replica control plane, and then forward the fourth access request to the target control plane, thereby reducing the access pressure of the first microservice control plane and improving the stability and reliability of microservice management.
[0129] According to the description in the above embodiments, Figure 5-Figure 7 , a more intuitive description is given of the microservice management system provided in the embodiments of the present disclosure.
[0130] See first Figure 5 , provides an intuitive introduction to the deployment relationship between the microservice control plane and the microservice data plane.
[0131] It can be seen that the microservice control plane 51 is deployed in the hosting cluster, and the microservice data plane 54 is still deployed in the user cluster; the microservice data plane 54 includes microservice 541, proxy 542, microservice 543, and proxy 544, among which microservice 541 and proxy 542 are located in the same container, and microservice 543 and proxy 544 are located in the same container; the requests between the hosting cluster and the user cluster are forwarded through the gateway 53. Through this architecture, the operation and maintenance (operate) and management (admin) of the service grid are decoupled from each other at the cluster level, and the related components of the microservice control plane are managed and invisible to tenants. In this way, the operation and maintenance personnel can easily manage the microservice control plane in the hosting cluster, which has the characteristics of simplicity, low cost, high availability, and low difficulty in operation and maintenance.
[0132] Among them, the microservice governance policies (configuration data) submitted by the tenants are uniformly stored in the configuration data acquisition service 52 of the hosting cluster, and the instance data acquisition service 55 in the user cluster is used to provide instance data for the microservice control plane 51 to discover microservice instances.
[0133] See also Figure 6 , a method for connecting the network between the microservice control plane and the microservice data plane is introduced, wherein the elastic network card 57 of the instance data acquisition service 55 of the user cluster is mounted in the hosting cluster.
[0134] It can be seen that the microservice control plane 51 in the hosted cluster sends policies to the service network card 59 and the service network card 510 of the microservice data plane 54 through the load balancing module 58 corresponding to the gateway 53. The request of the microservice data plane 54 is also sent to the load balancing module 58 via the service network card 59 and the service network card 510. The load balancing module 58 forwards the request to the microservice control plane 51 or the replica control plane of the hosted cluster based on the set load balancing strategy.
[0135] Among them, the hosting cluster can use a special network segment, such as 7.0.0.0 / 8; the user cluster can use a common network segment, such as 172 / 192 / 10.
[0136] In this way, the request for the microservice control plane 51 to access the above-mentioned 172 / 192 / 10 network segment is issued from the elastic network card 57 mounted on the hosting cluster, so that the microservice control plane 51 can access the instance data acquisition service 55 in the user cluster to obtain the instance data; the request for the microservice control plane 51 to access the above-mentioned 7.0.0.0 / 8 network segment is issued from the default network card 56, so that the microservice control plane 51 can access the configuration data acquisition service 52 in the hosting business cluster to obtain the configuration data.
[0137] It can be seen that the above method realizes the connection between the microservice data plane in the user cluster and the microservice control plane in the hosting cluster, and realizes the two-way network connection between the hosting cluster and the user cluster, and realizes network mutual access across tenants and VPCs.
[0138] It should be noted that, compared with the related art, after the microservice control plane and the microservice data plane are deployed separately in the embodiment of the present disclosure, the microservice control plane obtains configuration data from the user cluster instead of obtaining configuration data from the cluster in which it is located. In this way, although obtaining configuration data generates additional communication overhead, the hosting of the microservice control plane is successfully realized.
[0139] Last seen Figure 7 , an introduction to the way to host a multi-tenant microservice control plane.
[0140] It can be seen that the microservice control planes of multiple tenants (such as microservice control plane 711 and microservice control plane 721) share a hosting cluster, and the microservice control plane of non-tenant occupies a hosting cluster exclusively; each microservice control plane is used to manage the microservice data plane of the tenant to which it belongs, such as microservice control plane 711 is used to manage microservice data plane 74 in user cluster 1, and microservice control plane 721 is used to manage microservice data plane 76 in user cluster 2. Among them, microservice data plane 74 includes microservice 741, proxy 742, microservice 743, and proxy 744, and microservice data plane 76 includes microservice 761, proxy 762, microservice 763, and proxy 764.
[0141] With the aforementioned Figure 6 Similar to the introduction, the request for microservice control plane 711 to access configuration data is issued from the default network card 712, and the request for microservice control plane 711 to access instance data is issued from the elastic network card 713; the request for microservice control plane 721 to access configuration data is issued from the default network card 722, and the request for microservice control plane 721 to access instance data is issued from the elastic network card 723.
[0142] In addition, the microservice control plane 711 sends policies to the service network card 745 and the service network card 746 of the microservice data plane 74 through the load balancing module 715 corresponding to the gateway 714, and the request of the microservice data plane 74 is also sent to the load balancing module 715 via the service network card 745 and the service network card 746, so that the load balancing module 715 executes the set load balancing policy; the microservice control plane 721 sends policies to the service network card 765 and the service network card 766 of the microservice data plane 76 through the load balancing module 725 corresponding to the gateway 724, and the request of the microservice data plane 76 is also sent to the load balancing module 725 via the service network card 765 and the service network card 766, so that the load balancing module 725 executes the set load balancing policy.
[0143] The microservice control plane of each tenant is logically isolated according to different namespaces (such as namespace 71 and namespace 72), and there is no conflict between the microservice control planes of each tenant. Specifically, namespace filtering is set for resources such as proxy injection and validation information, so that the above resources are only effective in the corresponding namespace.
[0144] The microservice control plane of each tenant obtains instance data from the instance data acquisition service of the user cluster of the tenant to which it belongs, such as microservice control plane 711 obtains instance data from instance data acquisition service 75, and microservice control plane 721 obtains instance data from instance data acquisition service 77; and for configuration data, both microservice control plane 711 and microservice control plane 721 obtain it from the configuration data acquisition service 73 in the above-mentioned hosting cluster, but different microservice control planes only obtain the configuration data of the namespace they are responsible for.
[0145] From the above, it can be seen that the managed grid implementation solution in the multi-tenant scenario provided by the present disclosure realizes the hosting of the core component of the control plane in the service grid scenario, which significantly improves the stability of the control plane and the stability of the entire microservice architecture, thereby improving the stability of the tenant business, meeting the technical implementation requirements in the public cloud scenario, and helping to realize the large-scale implementation of service grid technology.
[0146] Corresponding to the above-mentioned microservice management method, the embodiment of the present disclosure also provides a microservice management device.
[0147] See also Figure 8 , is a structural diagram of a first microservice management device provided in an embodiment of the present disclosure, which is applied to a first microservice control plane deployed in a first cluster in a microservice management system, wherein the microservice management system includes the first cluster and multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, including the following modules:
[0148] The configuration data acquisition module 801 is used to obtain the microservice configuration data of the target tenant stored in the first cluster, wherein the target tenant is: the tenant to which the first microservice control plane belongs;
[0149] The instance data obtaining module 802 obtains the microservice instance data of the target tenant stored in the third cluster, wherein the third cluster is: the second cluster where the first microservice data plane of the target tenant is deployed;
[0150] The data sending module 803 is used to send the microservice configuration data and the microservice instance data to the first microservice data plane, so that the first microservice data plane manages the microservice based on the configuration data and the service data.
[0151] From the above, it can be seen that in the solution provided by the embodiment of the present disclosure, the first microservice control plane of the target tenant can obtain the microservice configuration data of the target tenant from the first cluster, and obtain the microservice instance data of the target tenant from the third cluster, and then, the microservice configuration data and the microservice instance data can be sent to the first microservice data plane of the target tenant, so that the first microservice data plane manages the microservice based on the microservice configuration data and the microservice instance data.
[0152] Among them, the first microservice control plane of the target tenant is deployed in the first cluster, and the first microservice data plane of the target tenant is deployed in the third cluster. It can be seen that the first microservice control plane of the target tenant and the first microservice data plane are not located in the same cluster. In other words, the first microservice control plane of the target tenant and the first microservice data plane are deployed separately and isolated from each other, realizing the decoupling between the microservice control plane and the microservice data plane. In this way, without affecting the normal microservice management, the microservice control plane that the tenant does not need to perceive is split out from the cluster to which the microservice is deployed, reducing the probability of tenants performing risky operations on the control plane, improving the business stability of the tenant, and enabling operation and maintenance personnel to conveniently manage and troubleshoot microservice anomalies based on the microservice control plane, reducing the difficulty of operation and maintenance of microservices.
[0153] In addition, each microservice control plane can independently control the microservice data plane of the tenant to which it belongs. In this way, the microservice control planes of multiple tenants can be deployed in the first cluster through logical isolation, rather than the microservice control plane of one tenant monopolizing a cluster, thereby improving the utilization efficiency of cluster resources.
[0154] In one embodiment of the present disclosure,
[0155] The configuration data obtaining module 801 is specifically used to determine the storage location of the microservice configuration data of the target tenant from the configuration data stored in the first cluster based on the namespace of the target tenant; and read the microservice configuration data of the target tenant based on the storage location.
[0156] It can be seen that in this way, the microservice configuration data of different tenants can be isolated by dividing different namespaces, so that the microservice configuration data of different tenants do not affect each other, and the logical isolation between the microservice configuration data of different tenants is achieved.
[0157] In one embodiment of the present disclosure,
[0158] A first network card corresponding to the first microservice control plane is deployed in the first cluster.
[0159] The configuration data acquisition module 801 is specifically used to generate a first access request, send the first access request to the first network card, so that the first network card forwards the first access request to the configuration data acquisition service in the first cluster, wherein the destination address of the first access request belongs to the network segment of the first cluster; and obtain the microservice configuration data of the target tenant sent by the configuration information acquisition service.
[0160] It can be seen that when the first microservice control plane obtains the microservice configuration data of the target tenant, it can first generate a first access request whose destination address belongs to the network segment of the first cluster. In this way, the first network card can determine that the first access request is a request for accessing the microservice configuration data according to the set routing rules. Therefore, the first network card can forward the first access request to the configuration data acquisition service in the first cluster, thereby enabling the first microservice control plane to conveniently obtain the microservice configuration data of the target tenant from the first cluster where it is located.
[0161] In one embodiment of the present disclosure,
[0162] A second network card corresponding to the first microservice control plane is deployed in the first cluster,
[0163] The instance data acquisition module 802 is specifically used to generate a second access request, send the second access request to the second network card, so that the second network card forwards the second access request to the instance data acquisition service in the third cluster, wherein the destination address of the second request belongs to the network segment of the third cluster; and obtain the microservice instance data of the target tenant sent by the instance data acquisition service.
[0164] It can be seen that when the first microservice control plane obtains the microservice instance data of the target tenant, it can first generate a second access request whose destination address belongs to the network segment of the third cluster. In this way, the second network card can determine that the second access request is a request for accessing the microservice instance data in the third cluster according to the set routing rules. Therefore, the second network card can forward the second access request to the instance data acquisition service in the third cluster, thereby enabling the first microservice control plane to conveniently obtain the microservice instance data of the target tenant from the third cluster where the first microservice data plane is located.
[0165] In one embodiment of the present disclosure,
[0166] The second network card is an elastic network card of an instance data acquisition service in the third cluster mounted in the first cluster.
[0167] After the elastic network card of the instance data acquisition service in the third cluster is mounted in the first cluster, the first microservice control plane deployed in the first cluster can conveniently and efficiently access the instance data acquisition service in the third cluster based on the elastic network card, thereby efficiently acquiring the microservice instance data of the target tenant.
[0168] In one embodiment of the present disclosure, the device further includes:
[0169] A status information receiving module is used to receive the management status information of the microservice reported by the microservice data plane;
[0170] A configuration data updating module is used to update the microservice configuration data of the target tenant stored in the first cluster based on the management status information.
[0171] In this embodiment, the first microservice data plane can report the management status information of the microservice to the first microservice control plane. The first microservice control plane can timely update the microservice configuration data of the target tenant according to the above management status information, thereby being able to dynamically adjust the management strategy of the microservice according to the changes in the microservice status, thereby improving the flexibility of the solution.
[0172] See also Fig. 9 , is a structural diagram of a second microservice management device provided in an embodiment of the present disclosure, which is applied to a first microservice data plane deployed in a third cluster in a microservice management system, wherein the microservice management system includes a first cluster and multiple second clusters, the third cluster is one of the multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, including the following modules:
[0173] The instance data receiving module 901 is used to receive the microservice configuration data and microservice instance data sent by the first microservice control plane of the target tenant, wherein the target tenant is: the tenant to which the first microservice data plane belongs;
[0174] The management module 902 is used to manage microservices based on the configuration data and service data.
[0175] As can be seen from the above, in the solution provided by the embodiment of the present disclosure, the first microservice control plane of the target tenant can send microservice configuration data and microservice instance data to the first microservice data plane of the target tenant, so that the first microservice data plane can manage microservices based on the microservice configuration data and microservice instance data.
[0176] Among them, the first microservice control plane of the target tenant is deployed in the first cluster, and the first microservice data plane of the target tenant is deployed in the third cluster. It can be seen that the first microservice control plane of the target tenant and the first microservice data plane are not located in the same cluster. In other words, the first microservice control plane of the target tenant and the first microservice data plane are deployed separately and isolated from each other, realizing the decoupling between the microservice control plane and the microservice data plane. In this way, without affecting the normal microservice management, the microservice control plane that the tenant does not need to perceive is separated from the cluster to which the microservice is deployed, reducing the probability of tenants generating risk operations on the control plane, and enabling operation and maintenance personnel to conveniently manage and troubleshoot abnormalities in microservices based on the microservice control plane, reducing the difficulty of operation and maintenance of microservices. In addition, each microservice control plane can independently control the microservice data plane of the tenant to which it belongs. In this way, the microservice control planes of multiple tenants can be deployed in the first cluster by logical isolation, rather than the microservice control plane of a tenant monopolizing a cluster, thereby improving the utilization efficiency of cluster resources.
[0177] In one embodiment of the present disclosure, the device further includes:
[0178] A status information reporting module is used to report the management status information of the microservice to the first microservice control plane, so that the first microservice control plane updates the microservice configuration data of the target tenant stored in the first cluster based on the management status information.
[0179] In this embodiment, the first microservice data plane can report the management status information of the microservice to the first microservice control plane, so that the first microservice control plane can timely update the microservice configuration data of the target tenant according to the above management status information, thereby being able to dynamically adjust the management strategy of the microservice according to the changes in the microservice status, thereby improving the flexibility of the solution.
[0180] In one embodiment of the present disclosure, a third network card corresponding to the first microservice data plane is deployed in the second cluster, and the device further includes:
[0181] A request generation module is used to generate a third access request for the first microservice control plane, and send the third access request to the third network card, so that the third network card forwards the third access request to the first microservice control plane, wherein the address of the third network card belongs to the network segment of the third cluster.
[0182] In this embodiment, when the first microservice data plane deployed in the third cluster accesses the first microservice control plane deployed in the first cluster, it is accessed indirectly through the third network card. Because the address of the third network card belongs to the network segment of the third cluster, for the target tenant of the third cluster, it is equivalent to accessing the first microservice control plane in the cluster it rents, thereby improving the tenant experience.
[0183] In the technical solution of the present disclosure, the collection, storage, use, processing, transmission, provision and disclosure of user personal information involved are in compliance with the provisions of relevant laws and regulations and do not violate public order and good morals.
[0184] According to an embodiment of the present disclosure, the present disclosure also provides an electronic device, a readable storage medium and a computer program product.
[0185] Fig.10 A schematic block diagram of an example electronic device 1000 that can be used to implement an embodiment of the present disclosure is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present disclosure described and / or required herein.
[0186] like Fig.10 As shown, the electronic device 1000 includes a computing unit 1001, which can perform various appropriate actions and processes according to a computer program stored in a read-only memory (ROM) 1002 or a computer program loaded from a storage unit 1008 into a random access memory (RAM) 1003. In the RAM 1003, various programs and data required for the operation of the electronic device 1000 can also be stored. The computing unit 1001, the ROM 1002, and the RAM 1003 are connected to each other via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0187] Multiple components in the electronic device 1000 are connected to the I / O interface 1005, including: an input unit 1006, such as a keyboard, a mouse, etc.; an output unit 1007, such as various types of displays, speakers, etc.; a storage unit 1008, such as a disk, an optical disk, etc.; and a communication unit 1009, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 1009 allows the electronic device 1000 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.
[0188] The computing unit 1001 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the computing unit 1001 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various computing units running machine learning model algorithms, digital signal processors (DSPs), and any appropriate processors, controllers, microcontrollers, etc. The computing unit 1001 performs the various methods and processes described above, such as the microservice management method. For example, in some embodiments, the microservice management method may be implemented as a computer software program, which is tangibly included in a machine-readable medium, such as a storage unit 1008. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 1000 via the ROM 1002 and / or the communication unit 1009. When the computer program is loaded into the RAM 1003 and executed by the computing unit 1001, one or more steps of the microservice management method described above may be performed. Alternatively, in other embodiments, the computing unit 1001 may be configured to execute the microservice management method in any other appropriate manner (for example, by means of firmware).
[0189] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.
[0190] The program code for implementing the method of the present disclosure may be written in any combination of one or more programming languages. These program codes may be provided to a processor or controller of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that the program code, when executed by the processor or controller, enables the functions / operations specified in the flow chart and / or block diagram to be implemented. The program code may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.
[0191] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any suitable combination of the foregoing. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0192] To provide interaction with a user, the systems and techniques described herein can be implemented on a computer having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and pointing device (e.g., a mouse or trackball) through which the user can provide input to the computer. Other types of devices can also be used to provide interaction with the user; for example, the feedback provided to the user can be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user can be received in any form (including acoustic input, voice input, or tactile input).
[0193] The systems and techniques described herein may be implemented in a computing system that includes back-end components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes front-end components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such back-end components, middleware components, or front-end components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), and the Internet.
[0194] A computer system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The relationship of client and server is generated by computer programs running on respective computers and having a client-server relationship with each other. The server may be a cloud server, a server of a distributed system, or a server combined with a blockchain.
[0195] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps recorded in this disclosure can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solutions disclosed in this disclosure can be achieved, and this document does not limit this.
[0196] The above specific implementations do not constitute a limitation on the protection scope of the present disclosure. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present disclosure shall be included in the protection scope of the present disclosure.
Claims
1. A microservice management method, applied to a first microservice control plane deployed in a first cluster in a microservice management system, wherein: The microservice management system includes the first cluster and multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of one tenant, and the method includes: Acquire microservice configuration data of a target tenant stored in the first cluster, wherein the target tenant is: a tenant to which the first microservice control plane belongs; Acquire microservice instance data of the target tenant stored in a third cluster, wherein the third cluster is: a second cluster in which a first microservice data plane of the target tenant is deployed; The microservice configuration data and the microservice instance data are issued to the first microservice data plane, so that the first microservice data plane manages the microservice based on the microservice configuration data and the microservice instance data.
2. The method according to claim 1, wherein: The obtaining the microservice configuration data of the target tenant stored in the first cluster includes: Based on the namespace of the target tenant, determine the storage location of the microservice configuration data of the target tenant from the configuration data stored in the first cluster; Based on the storage location, the microservice configuration data of the target tenant is read.
3. The method according to claim 1, wherein: A first network card corresponding to the first microservice control plane is deployed in the first cluster, and obtaining the microservice configuration data of the target tenant stored in the first cluster includes: Generate a first access request, and send the first access request to the first network card, so that the first network card forwards the first access request to the configuration data acquisition service in the first cluster, wherein the destination address of the first access request belongs to the network segment of the first cluster; Obtain the microservice configuration data of the target tenant sent by the configuration information acquisition service.
4. The method according to claim 1, wherein: A second network card corresponding to the first microservice control plane is deployed in the first cluster, and the acquiring the microservice instance data of the target tenant stored in the third cluster includes: Generate a second access request, and send the second access request to the second network card, so that the second network card forwards the second access request to the instance data acquisition service in the third cluster, wherein the destination address of the second request belongs to the network segment of the third cluster; Obtain the microservice instance data of the target tenant sent by the instance data acquisition service.
5. The method according to claim 4, wherein: The second network card is an elastic network card of an instance data acquisition service in the third cluster mounted in the first cluster.
6. The method according to any one of claims 1 to 5, wherein: The method further comprises: Receive management status information of the microservice reported by the first microservice data plane; Based on the management status information, the microservice configuration data of the target tenant stored in the first cluster is updated.
7. A microservice management method, applied to a first microservice data plane deployed in a third cluster in a microservice management system, wherein: The microservice management system includes a first cluster and multiple second clusters, the third cluster is one of the multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, and the method includes: Receive microservice configuration data and microservice instance data sent by a first microservice control plane of a target tenant, wherein the target tenant is: the tenant to which the first microservice data plane belongs; The microservices are managed based on the microservice configuration data and the microservice instance data.
8. The method according to claim 7, wherein: The method further comprises: Reporting management status information of the microservice to the first microservice control plane, so that the first microservice control plane updates the microservice configuration data of the target tenant stored in the first cluster based on the management status information.
9. The method according to claim 7, wherein: A third network card corresponding to the first microservice data plane is deployed in the second cluster, and the method further includes: Generate a third access request of the first microservice control plane, and send the third access request to the third network card, so that the third network card forwards the third access request to the first microservice control plane, wherein the address of the third network card belongs to the network segment of the third cluster.
10. A microservice management system, comprising a first cluster and multiple second clusters, wherein the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, wherein: The first microservice control plane is used to obtain the microservice configuration data of the target tenant stored in the first cluster, and obtain the microservice instance data of the target tenant stored in the third cluster, and send the microservice configuration data and microservice instance data to the first microservice data plane of the target tenant, wherein the first microservice control plane is one of multiple microservice control planes, the target tenant is: the tenant to which the first microservice control plane belongs, and the third cluster is: the second cluster where the first microservice data plane is deployed; The first microservice data plane is used to manage microservices based on the received configuration data and service data.
11. The system according to claim 10, wherein: A load balancing module corresponding to the first microservice control plane is deployed in the first cluster, and at least one replica control plane corresponding to the first microservice control plane is deployed, The first microservice data plane is further used to generate a fourth access request of the first microservice control plane, and send the fourth access request to the load balancing module; The load balancing module is used to execute the set load balancing strategy, determine the target control plane from the first microservice control plane and the replica control plane, and forward the fourth access request to the target control plane.
12. A microservice management device, applied to a first microservice control plane deployed in a first cluster in a microservice management system, wherein: The microservice management system includes the first cluster and multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of one tenant, and the device includes: A configuration data acquisition module, used to obtain microservice configuration data of a target tenant stored in the first cluster, wherein the target tenant is: a tenant to which the first microservice control plane belongs; An instance data acquisition module is configured to acquire microservice instance data of the target tenant stored in a third cluster, wherein the third cluster is a second cluster in which a first microservice data plane of the target tenant is deployed; The data sending module is used to send the microservice configuration data and the microservice instance data to the first microservice data plane, so that the first microservice data plane manages the microservice based on the configuration data and the service data.
13. The device according to claim 12, wherein: The configuration data acquisition module is specifically used to determine the storage location of the microservice configuration data of the target tenant from the configuration data stored in the first cluster based on the namespace of the target tenant; and read the microservice configuration data of the target tenant based on the storage location.
14. The device according to claim 12, wherein: A first network card corresponding to the first microservice control plane is deployed in the first cluster. The configuration data acquisition module is specifically used to generate a first access request, send the first access request to the first network card, so that the first network card forwards the first access request to the configuration data acquisition service in the first cluster, wherein the destination address of the first access request belongs to the network segment of the first cluster; and obtain the microservice configuration data of the target tenant sent by the configuration information acquisition service.
15. The device according to claim 12, wherein: A second network card corresponding to the first microservice control plane is deployed in the first cluster, The instance data acquisition module is specifically used to generate a second access request, send the second access request to the second network card, so that the second network card forwards the second access request to the instance data acquisition service in the third cluster, wherein the destination address of the second request belongs to the network segment of the third cluster; and obtain the microservice instance data of the target tenant sent by the instance data acquisition service.
16. The device according to claim 15, wherein: The second network card is an elastic network card of an instance data acquisition service in the third cluster mounted in the first cluster.
17. The device according to any one of claims 12 to 16, wherein: The device also includes: A status information receiving module is used to receive the management status information of the microservice reported by the microservice data plane; A configuration data updating module is used to update the microservice configuration data of the target tenant stored in the first cluster based on the management status information.
18. A microservice management device, applied to a first microservice data plane deployed in a third cluster in a microservice management system, wherein: The microservice management system includes a first cluster and multiple second clusters, the third cluster is one of the multiple second clusters, the first cluster is deployed with microservice control planes of multiple tenants, and each second cluster is deployed with a microservice data plane of a tenant, and the device includes: An instance data receiving module, used to receive microservice configuration data and microservice instance data issued by a first microservice control plane of a target tenant, wherein the target tenant is: the tenant to which the first microservice data plane belongs; A management module is used to manage microservices based on the configuration data and the service data.
19. The device according to claim 18, wherein: The device also includes: A status information reporting module is used to report the management status information of the microservice to the first microservice control plane, so that the first microservice control plane updates the microservice configuration data of the target tenant stored in the first cluster based on the management status information.
20. The device according to claim 18, wherein A third network card corresponding to the first microservice data plane is deployed in the second cluster, and the device further includes: A request generation module is used to generate a third access request for the first microservice control plane, and send the third access request to the third network card, so that the third network card forwards the third access request to the first microservice control plane, wherein the address of the third network card belongs to the network segment of the third cluster.
21. An electronic device, comprising: at least one processor; as well as a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the method of any one of claims 1-6 or 7-9.
22. A non-transitory computer-readable storage medium storing computer instructions, wherein: The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6 or 7-9.
23. A computer program product comprising a computer program, which, when executed by a processor, implements the method according to any one of claims 1-6 or 7-9.