Service mesh-based data processing and resource management methods, devices, and systems
By storing resource objects and generating metadata in the service mesh control plane, the problem of linking the lifecycle of resource objects with the lifecycle of the cluster is solved, the management of resource objects and cluster management are decoupled, and the consistency and reliability of resource objects in the data plane cluster are ensured.
Patent Information
- Application Number
- CN202211312250.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-25
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2042-10-25
AI Technical Summary
In a service mesh, the lifecycle of resource objects is closely linked to the lifecycle of the cluster, which makes resource object management inconvenient and prone to data inconsistency.
By storing resource objects in the service mesh control plane and generating corresponding resource object metadata, which is then distributed to the data plane cluster, the management of resource objects is decoupled from cluster management, ensuring the consistency of resource objects in the data plane cluster.
This decouples resource object management from cluster management, avoiding inconsistencies in resource object data across different clusters. Users can manage resource objects while maintaining their existing usage habits, improving resource object reliability and user experience.
Smart Images

Figure CN115686841B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cloud computing technology, and in particular to data processing and resource management methods, apparatus, and systems based on service mesh. Background Technology
[0002] As an architecture in a cloud computing environment, a service mesh refers to a configurable infrastructure layer used for managing microservice applications. A service mesh can be divided into a control plane and a data plane. The control plane is typically used to manage application configurations and rules. By distributing configurations, the data plane is controlled to perform different tasks, supporting various requirements. The data plane is typically used to process application data requests and can be configured with multiple clusters, each dedicated to implementing different functionalities.
[0003] Generally, users can configure resource objects in a cluster to achieve the functions they need. However, if a cluster is added or deleted in the mesh, the resource objects in the cluster also need to be redeployed or deleted accordingly, so that the lifecycle of the resource objects is related to the lifecycle of the cluster. If a resource object is modified, the resource objects in different clusters need to be modified accordingly, otherwise data inconsistency may occur, leading to inconvenience in resource object management. Summary of the Invention
[0004] In view of the above problems, embodiments of the present invention are proposed to provide a service mesh-based data processing method, a service mesh-based resource management method, a service mesh-based data processing apparatus, a service mesh-based resource management apparatus, a service mesh-based resource management system, an electronic device, and a machine-readable medium that overcome or at least partially solve the above problems.
[0005] To address the aforementioned problems, this invention discloses a resource management method based on a service mesh. The service mesh includes a service mesh control plane and a service mesh data plane, wherein the service mesh data plane has at least one data plane cluster. The method is applied to the service mesh control plane and includes:
[0006] Obtain resource objects from the service mesh control plane or the service mesh data plane;
[0007] Configure corresponding resource object metadata for different types of resource objects;
[0008] The resource object metadata is distributed to the data plane cluster in the service mesh data plane.
[0009] Optionally, the step of obtaining resource objects from the service mesh control plane or the service mesh data plane includes:
[0010] Obtain data processing requests from the service mesh control plane or the service mesh data plane;
[0011] Generate the resource object corresponding to the data processing request.
[0012] Optionally, the method further includes:
[0013] The resource object is stored in a preset storage space in the service mesh control plane.
[0014] Optionally, the method further includes:
[0015] Receive data processing requests sent by the service mesh data plane;
[0016] Based on the data processing request, perform corresponding data processing on the resource object corresponding to the data processing request.
[0017] Optionally, the resource object metadata records the resource group information and version information of the resource object.
[0018] This invention also discloses a data processing method based on a service mesh, wherein the service mesh includes a service mesh control plane and a service mesh data plane, and at least one data plane cluster is configured in the service mesh data plane; the method is applied to the data plane cluster and includes:
[0019] Get the data processing request sent by the user;
[0020] The target path of the data processing request is determined based on the preset resource object metadata; wherein, the target path is the access path of the resource object corresponding to the data processing request; the resource object metadata is obtained from the service mesh control plane;
[0021] Based on the target path, the data processing request is forwarded to the grid service control plane, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request.
[0022] Optionally, the step of obtaining the data processing request sent by the user includes:
[0023] Detect data processing requests issued by users for resource objects in the data plane cluster;
[0024] If the data processing request is detected, the data processing request is intercepted.
[0025] Optionally, the step of determining the target path of the data processing request based on preset resource object metadata includes:
[0026] Retrieve resource group information and version information of resource objects from preset resource object metadata;
[0027] Using the resource group information and the version information, the target path of the resource object corresponding to the data processing request is determined.
[0028] This invention discloses a resource management device based on a service mesh, wherein the service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster; the device is applied to the service mesh control plane and includes:
[0029] The resource acquisition module is used to acquire resource objects from the service mesh control plane or the service mesh data plane;
[0030] The metadata configuration module is used to configure the corresponding resource object metadata for different types of resource objects.
[0031] The metadata distribution module is used to distribute the metadata of the resource object to the data plane cluster in the service mesh data plane.
[0032] Optionally, the resource acquisition module includes:
[0033] The Acquisition submodule is used to obtain data processing requests from the service mesh control plane or the service mesh data plane.
[0034] The object generation submodule is used to generate the resource object corresponding to the data processing request.
[0035] Optionally, the device further includes:
[0036] The storage module is used to store the resource objects in a preset storage space in the service mesh control plane.
[0037] This invention also discloses a data processing apparatus based on a service mesh, wherein the service mesh includes a service mesh control plane and a service mesh data plane, and at least one data plane cluster is provided in the service mesh data plane; the apparatus is applied to the data plane cluster and includes:
[0038] The request retrieval module is used to retrieve data processing requests sent by users;
[0039] The path determination module is used to determine the target path of the data processing request based on preset resource object metadata; wherein, the target path is the access path of the resource object corresponding to the data processing request; and the resource object metadata is obtained from the service mesh control plane.
[0040] The forwarding module is used to forward the data processing request to the grid service control plane based on the target path, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request.
[0041] Optionally, the request acquisition module includes:
[0042] The request detection submodule is used to detect data processing requests issued by users for resource objects in the data plane cluster;
[0043] An interception submodule is used to intercept the data processing request if the data processing request is detected.
[0044] Optionally, the path determination module includes:
[0045] The information extraction submodule is used to obtain resource group information and version information of resource objects from preset resource object metadata;
[0046] The path determination submodule is used to determine the target path of the resource object corresponding to the data processing request using the resource group information and the version information.
[0047] This invention also discloses a service mesh-based resource management system, wherein the service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster; the service mesh control plane includes a first resource controller, a resource storage, and a data generator; the data plane cluster includes a resource registrar and a second resource controller;
[0048] The first resource controller is used to obtain resource objects from the service mesh control plane and store the resource objects in the resource storage.
[0049] The metadata generator is used to configure corresponding resource object metadata for different types of resource objects, and to distribute the resource object metadata to the data plane cluster in the service mesh data plane;
[0050] The resource registrar is used to receive resource object metadata issued by the metadata generator and register the resource object metadata to the second resource controller;
[0051] The second resource controller is used to acquire data processing requests sent by users; determine the target path of the data processing request based on the resource object metadata; and forward the data processing request to the grid service control plane based on the target path, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request.
[0052] Optionally, the service mesh data plane further includes a resource aggregator; the data plane cluster further includes a resource forwarder.
[0053] If the data processing request is used to generate a resource object, the second resource controller is specifically used to send the data processing request to the resource forwarder;
[0054] The resource forwarder is used to forward the data processing request to the resource aggregator;
[0055] The resource aggregator is used to send the data processing request to the first resource controller;
[0056] The first resource controller is used to generate a resource object based on the data processing request and store the resource object in the resource storage.
[0057] This invention also discloses an electronic device, comprising:
[0058] One or more processors; and
[0059] One or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of the embodiments of the present invention.
[0060] Embodiments of the present invention also disclose one or more machine-readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform one or more methods as described in any one of the embodiments.
[0061] The embodiments of the present invention have the following advantages:
[0062] The service mesh-based resource management method of this invention obtains resource objects from the service mesh control plane or the service mesh data plane; configures corresponding resource object metadata for different types of resource objects; and distributes the resource object metadata to the data plane cluster in the service mesh data plane. This allows resource objects to be actually stored in the service mesh control plane, decoupling resource object management from cluster management and preventing inconsistencies in resource object data across different clusters. Simultaneously, users can maintain their existing usage habits and manage resource objects within the data plane cluster based on the resource object metadata. Attached Figure Description
[0063] Figure 1 This is a schematic diagram of a service mesh according to an embodiment of the present invention;
[0064] Figure 2 This is a flowchart illustrating the steps of an embodiment of a resource management method based on a service mesh according to the present invention.
[0065] Figure 3 This is a flowchart illustrating the steps of an embodiment of a data processing method based on a service mesh according to the present invention.
[0066] Figure 4 This is a schematic diagram of a service mesh-based resource management system according to an embodiment of the present invention;
[0067] Figure 5 This is a structural block diagram of an embodiment of a service mesh-based resource management device according to an embodiment of the present invention;
[0068] Figure 6 This is a structural block diagram of an embodiment of a service mesh-based data processing device according to an embodiment of the present invention. Detailed Implementation
[0069] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0070] Container Service provides high-performance, scalable container application management services, supporting application lifecycle management via containers across a cluster of cloud servers. Container Service greatly simplifies the setup of container management clusters, seamlessly integrating virtualization, storage, networking, and security capabilities to create an optimized runtime environment in the cloud. Within Container Service, service meshes can be used to achieve unified traffic management across multiple clusters, providing consistent communication control for container and virtual machine application services.
[0071] Specifically, a service mesh refers to a configurable infrastructure layer used for managing microservice applications. It is commonly used to describe the services that make up an application (such as microservices) and the interactions between these services. A service mesh typically consists of a control plane and a data plane. The service mesh control plane is a set of services running in a dedicated namespace. These services perform control and management functions, such as aggregating telemetry data, providing user-facing application programming interfaces (APIs), and providing control data to the data plane. The service mesh data plane consists of a series of transparent proxies running alongside each service instance.
[0072] Generally, service meshes offer a managed mode to facilitate cluster management. In managed mode, a service mesh can be configured with at least one managed instance. Resource objects within the service mesh can be deployed on the managed instance. The platform running the managed instance provides high availability guarantees, making it less likely that a user's cluster failure will cause the entire service mesh to malfunction.
[0073] However, users are usually accustomed to running resource objects from their own clusters. In managed mode, since the resource objects are located in managed instances, users cannot easily manage resource objects in their own clusters, which disrupts users' usage habits and results in a poor user experience.
[0074] One of the core concepts of this invention is that by storing resource objects in the service mesh control plane and generating corresponding resource object metadata, which is then distributed to each cluster in the service mesh data plane, users can maintain their existing habits and operate on resource objects within their own clusters when they need to manage resource objects using managed mode or other modes. The service mesh, based on user operations and resource object metadata in the clusters, performs corresponding operations on the resource objects in the service mesh control plane, thereby achieving different functions or managing resource objects. Simultaneously, since resource objects are actually stored in the service mesh control plane, the lifecycle management of resource objects and clusters is decoupled. Furthermore, operations on resource objects in multiple clusters are all directed at the resource objects in the service mesh control plane, preventing inconsistencies in resource object data across different clusters.
[0075] Reference Figure 1 The diagram illustrates a service mesh 100 according to an embodiment of the present invention. This service mesh can be primarily used to facilitate secure and reliable communication between multiple microservices. A microservice refers to an application being decomposed into multiple smaller services or instances, distributed across different clusters / machines. A cluster can refer to a group of node computers used to run containerized applications, and a cluster can contain at least one container (Pod).
[0076] Microservices may include application service instance A and application service instance B, which together form the service mesh application plane of service mesh 600. In one implementation, application service instance A runs as a container / process on machine / workload container group 108, and application service instance B runs as a container / process on machine / workload container group 110.
[0077] Application service instance A and mesh agent (sidecar) 101 coexist in machine / workload container group 114, and application service instance B and mesh agent 105 coexist in machine / workload container group 116. Containerized mesh agents 103 and 105 can form the service mesh data plane of service mesh 100.
[0078] Among them, grid agents 103 and 105 run as containers / processes 104 and 106 respectively, and grid agent 103 can communicate bidirectionally with application service instance A, and grid agent 105 can communicate bidirectionally with application service instance B.
[0079] In one embodiment, all traffic from application service example A can be routed to the appropriate destination via mesh proxy 103, and all network traffic from application service example B can be routed to the appropriate destination via mesh proxy 105. It should be noted that the network traffic mentioned herein includes, but is not limited to, Hypertext Transfer Protocol (HTTP), Representational State Transfer (REST), and Remote Procedure Call (RPC, such as gRPC).
[0080] In one implementation, custom filters can be written using the proxy (Envoy) in service mesh 100 to extend the service mesh data plane. The service mesh proxy configuration can be used to ensure the service mesh correctly proxies service traffic, enabling service interoperability and service governance. Mesh proxies 103 and 105 can be configured to perform at least one of the following functions: service discovery, health checking, routing, load balancing, authentication and authorization, and observability.
[0081] Service mesh 100 may include a service mesh control plane. This control plane may be a set of services running in a dedicated namespace, managed by control plane component 101 on machine / workload container group (machine / Pod) 102. Control plane component 101 communicates bidirectionally with mesh agents 103 and 105. Control plane component 101 is configured to perform control and management functions. For example, control plane component 101 receives telemetry data from mesh agents 103 and 105 and can further aggregate this telemetry data. For these services, control plane component 101 may also provide a user-facing Application Programming Interface (API) to facilitate manipulation of network behavior and provision of configuration data to mesh agents 103 and 105.
[0082] Reference Figure 2 The diagram illustrates a step flowchart of a resource management method based on a service mesh according to an embodiment of the present invention. The service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster.
[0083] Specifically, the service mesh control plane can be a collection of control plane components within a service mesh, whether in managed or unmanaged mode. Each control plane component can run on a separate server, rather than within a cluster located on the data plane. The service mesh control plane is responsible for managing and configuring the data plane cluster within the service mesh data plane.
[0084] A service mesh data plane can be a logical partition comprising multiple service mesh data plane clusters, uniformly managed by the service mesh control plane. These data plane clusters can be Kubernetes container service clusters or other types of computing environment clusters.
[0085] The method is applied to the service mesh control plane and may specifically include the following steps:
[0086] Step 201: Obtain resource objects from the service mesh control plane or the service mesh data plane;
[0087] Specifically, in a cloud computing environment, resource objects refer to persistent entities that represent the state of the entire cluster. They can describe what containerized applications are running, the resources available to these applications, and the application's behavior strategies, such as restart, upgrade, and fault tolerance policies. Through resource objects, the cluster can be controlled to maintain the desired state as required by the user. In a specific example of this invention, resource objects can be stateless workloads (Deployments), stateful workloads (StatefulSets), job workloads, and custom resource definitions. In particular, custom resources are typically managed by the user within the cluster, and users are accustomed to managing custom resources within the cluster itself. In a managed model, storing custom resources on a managed instance can easily cause inconvenience for users.
[0088] To better manage the service mesh as a whole, resource objects can be stored in the service mesh control plane. In this case, users can write resource objects through the service mesh control plane, which can then directly retrieve the user-provided resource objects. Users can also write resource objects through the data plane cluster in the service mesh data plane. In this case, the data plane cluster can forward the user-written resource objects to the service mesh control plane, allowing the service mesh to retrieve the user-written resource objects.
[0089] Step 202: Configure corresponding resource object metadata for different types of resource objects;
[0090] After obtaining the resource objects, the service mesh control plane can generate corresponding resource object metadata. Resource object metadata can be data describing the resource objects. Each type of resource object can be configured with its own resource object metadata so that similar logic can be used to manage resource objects of the same type.
[0091] As a specific example of the present invention, the resource object metadata may at least record information associated with the access path of the resource object, so as to determine the access path of the resource object through the resource object metadata. The resource object metadata may also record the methods for adding, deleting, and updating different types of resource objects, so that the data plane cluster can request the service mesh control plane to perform corresponding processing on the resource object using the methods indicated in the resource object metadata. The resource object metadata may also record information such as the corresponding data processing methods for different types of resource objects, so that when users need to implement different functions based on resource objects, they can transmit user requests to the resource objects for processing in a specified manner.
[0092] In one embodiment of the present invention, the resource object metadata may record resource group information and version information of the resource object.
[0093] Specifically, the resource object metadata can store the resource specification (Spec) of each resource object, which can record the resource group information (Group) and version information (Version) of the resource object.
[0094] In a cloud computing environment, the access path of a resource object can be represented using resource group information and version information. For example, the access path can be represented as " / apis / <resource group> / <version>". Therefore, after obtaining the resource group information and version information of the resource object from the resource object's metadata, the path corresponding to each resource object can be generated.
[0095] Step 203: Distribute the resource object metadata to the data plane cluster in the service mesh data plane.
[0096] Specifically, since resource objects are actually transferred to the service mesh control plane for storage, in order to facilitate users to manage resource objects from the data plane cluster, the resource object metadata can be distributed to the data plane cluster in the service mesh data plane, so that users can manage resource objects in the data plane cluster based on the resource object metadata.
[0097] In one embodiment of the present invention, the step of obtaining a resource object from the service mesh control plane or the service mesh data plane includes: obtaining a data processing request from the service mesh control plane or the service mesh data plane; and generating a resource object corresponding to the data processing request.
[0098] Specifically, users can manage resource objects using data processing requests. Therefore, when adding, deleting, or updating resource objects, users can issue data processing requests from the service mesh control plane or the data plane cluster within the service mesh data plane. If the data plane cluster receives a data processing request, it can forward it to the service mesh control plane, allowing the service mesh control plane to obtain the data processing request corresponding to at least one resource object.
[0099] The data processing request may correspond to a specific resource object or a resource object of a certain type; this invention does not impose any restrictions on this.
[0100] In practical implementations, within a cloud computing environment, data processing requests can be resource configuration information. This resource configuration information defines resource objects using a declarative object configuration approach, describing the states that these resource objects need to present. The service mesh control plane can create or manage resource objects based on the information recorded in the resource configuration information, thus achieving lifecycle management of resource objects.
[0101] Therefore, if the resource configuration information records new resource objects, the service mesh control plane can generate the corresponding resource objects according to the requirements in the resource configuration information, thereby obtaining the new resource objects. If the resource configuration information records changes to existing resource objects, the service mesh control plane can modify the resource objects according to the requirements in the resource configuration information, thereby obtaining the modified resource objects.
[0102] As a specific example of the present invention, if a user needs to manage the traffic policy of at least one resource object using resource configuration information, the resource configuration information may include resource object selection information (workloadSelector), traffic mode information, and location information. The resource object selection information can be used to select which resource objects need to use the traffic policy. In a specific implementation, a label-based filtering method can be used. The traffic mode information can provide different traffic configuration modes. For example, the traffic mode may include a general mode and a specific mode. The location information can be used to set the priority of configuring resource objects to different locations, so that resource objects can preferentially process traffic originating from different locations. In the general mode, the location information may include three different priorities: rack, availability zone, and region. In the specific mode, it may include three different priorities: specific rack name, specific availability zone name, and specific region name.
[0103] In one embodiment of the present invention, the method further includes: storing the resource object in a preset storage space in the service mesh control plane.
[0104] Specifically, to further improve the reliability of resource objects, they can be stored in a pre-defined storage space. When resource objects need to be managed, the data processing requests can be analyzed through the pre-defined resource object controller in the service mesh control plane, and the resource objects in the storage space can be adjusted accordingly to meet different user resource management needs.
[0105] In one embodiment of the present invention, the method further includes: receiving a data processing request sent by the service mesh data plane; and performing corresponding data processing on the resource object corresponding to the data processing request based on the data processing request.
[0106] If a user needs to manage resource objects, they can issue a data processing request from the data plane cluster in the service mesh data plane. The data plane cluster can forward the data processing request to the service mesh control plane. After receiving the data processing request, the service mesh control plane can process the resource object corresponding to the data processing request, thereby changing the state of the resource object and controlling the cluster to maintain the desired state required by the user.
[0107] The service mesh-based resource management method of this invention obtains resource objects from the service mesh control plane or the service mesh data plane; configures corresponding resource object metadata for different types of resource objects; and distributes the resource object metadata to the data plane cluster in the service mesh data plane. This allows resource objects to be actually stored in the service mesh control plane, decoupling resource object management from cluster management and preventing inconsistencies in resource object data across different clusters. Simultaneously, users can maintain their existing usage habits and manage resource objects within the data plane cluster based on the resource object metadata.
[0108] Reference Figure 3 The diagram illustrates a step flowchart of a data processing method based on a service mesh according to an embodiment of the present invention. The service mesh includes a service mesh control plane and a service mesh data plane, and at least one data plane cluster is provided in the service mesh data plane.
[0109] The method is applied to a data plane cluster and may specifically include the following steps:
[0110] Step 301: Obtain the data processing request sent by the user;
[0111] In this embodiment of the invention, when a user needs to manage a resource object, they can issue a data processing request. When sending a data processing request, the user can assume that the resource object corresponding to the data processing request is in the data plane cluster, or the user knows that the resource object is in the service mesh control plane, but the user is accustomed to managing resource objects in the service mesh data plane. In this case, the data plane cluster can forward the data processing request to the service mesh control plane, so that the resource object in the service mesh control plane can process the data processing request.
[0112] In one embodiment of the present invention, the step of obtaining a data processing request sent by a user includes: detecting a data processing request sent by a user for a resource object in the data plane cluster; and if the data processing request is detected, intercepting the data processing request.
[0113] Specifically, users can maintain their existing operating habits and issue data processing requests within the data plane cluster to request corresponding processing of resource objects within the cluster. However, since the data processing requests do not actually exist within the data plane cluster, they cannot be processed.
[0114] In a practical implementation, the data plane cluster can detect when a user issues a data processing request. Subsequently, based on the resource object name, resource object access path, and other information associated with the resource object recorded in the data processing request, it can determine that the data processing request is issued for a resource object originally configured in the data plane cluster.
[0115] If the data plane cluster detects that a user has issued a data processing request for a resource object in the data plane cluster, the data plane cluster can intercept the data processing request so that it can be forwarded to the service mesh control plane later.
[0116] Step 302: Determine the target path of the data processing request based on the preset resource object metadata; wherein, the target path is the access path of the resource object corresponding to the data processing request; the resource object metadata is obtained from the service mesh control plane;
[0117] Specifically, the resource object metadata can record information about different types of resource objects, including access path information. Therefore, the data plane cluster can determine the access path corresponding to the resource object that handles the data processing request based on the information recorded in the resource object metadata.
[0118] In practical implementation, after obtaining the metadata of resource objects, the data plane cluster can register the access paths of different resource objects to the data plane cluster. After obtaining a data processing request, the data processing request can contain information associated with the access path. If the data plane cluster determines that the data processing request matches the access path based on the information associated with the access path, it can determine that the data processing request needs to be forwarded to the grid service control plane, and the access path will be used as the target path.
[0119] As a specific example of the present invention, for resource objects of the API Service type, the access path of the resource object can first be registered in the aggregation layer of the data plane cluster. This aggregation layer allows the API servers in the data plane cluster to use extended functions. Subsequently, when the aggregation layer obtains a data processing request, it can determine that the data processing request matches the access path based on the information associated with the access path, and determine that the data processing request needs to be forwarded to the mesh service control plane.
[0120] In one embodiment of the present invention, the step of determining the target path of the data processing request based on preset resource object metadata includes: obtaining resource group information and version information of the resource object from preset target resource object metadata; and using the resource group information and the version information to determine the target path of the resource object corresponding to the data processing request.
[0121] After obtaining the resource group information and version information of the resource object from the resource object metadata, the path corresponding to each resource object can be generated. The access path can be represented as " / apis / <resource group> / <version>". Thus, after determining the resource object corresponding to the data processing request, the target path corresponding to the data processing request can be determined.
[0122] Step 303: Based on the target path, forward the data processing request to the grid service control plane so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request.
[0123] When the data plane cluster determines the target path corresponding to a data processing request, it can determine, based on the target path, that the data processing request needs to be processed by a resource object in the grid service control plane. Thus, the data processing request can be forwarded to the grid service control plane, which can then further determine the resource object corresponding to the data processing request based on the target path. Subsequently, the grid service control plane can perform data processing on the resource object based on the data processing request.
[0124] In practical implementation, the service mesh control plane can be pre-configured with processing service information corresponding to different data processing requests. Upon receiving a data processing request, it can perform specific logical processing such as adding or deleting attribute field values, thereby changing the state of the resource object. The changed resource object can then meet the user's needs, and the control cluster can maintain the expected state required by the user.
[0125] The data processing method of this invention obtains a data processing request sent by a user; determines the target path of the data processing request based on preset resource object metadata; and forwards the data processing request to the grid service control plane based on the target path, so that data processing can be performed on the resource object corresponding to the data processing request through the grid service control plane. This allows data processing to be achieved through resource objects in the service grid control plane while maintaining the user's original operating habits. Because the lifecycle management of resource objects is decoupled from the lifecycle management of the cluster, and the cluster uniformly uses resource objects in the service grid control plane, the resource objects can have high reliability, allowing users to reliably process data and providing a better overall user experience.
[0126] This invention also provides a service mesh-based resource management system, wherein the service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster; the service mesh control plane includes a first resource controller, a resource storage, and a data generator; the data plane cluster includes a resource registrar and a second resource controller;
[0127] Users can write resource objects through the service mesh control plane. At this time, the first resource controller can obtain the resource objects from the service mesh control plane. Subsequently, the first resource controller can store the resource objects in the resource storage for later management.
[0128] The metadata generator can configure corresponding resource object metadata for different types of acquired resource objects, so that similar logic can be used to manage resource objects of the same type. Subsequently, the metadata generator can distribute the resource object metadata to the data plane cluster within the service mesh data plane, enabling users to manage resource objects within the data plane cluster based on the resource object metadata.
[0129] The resource registrar in the data plane cluster can obtain the resource object metadata issued by the metadata generator and register the resource object metadata with the second resource controller, so that the second resource controller can process the user operations related to the resource objects in the data plane cluster based on the resource object metadata.
[0130] If a user needs to manage a resource object, they can send a data processing request from the data plane cluster in the service network data plane. The second resource controller can obtain the data processing request sent by the user; determine the target path of the data processing request based on the resource object metadata; and forward the data processing request to the grid service control plane based on the target path, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request.
[0131] Simultaneously, users can add resource objects to the data plane cluster, and users can issue data requests from the data plane cluster using declarative object configuration. At this time, the second resource controller can obtain the data processing request for generating resource objects from the data plane cluster and send the data processing request to the resource forwarder;
[0132] Subsequently, the resource forwarder can forward the data processing request to the resource aggregator in the service mesh control plane, so that the service mesh control plane can obtain the resource object generation request from the data plane cluster; the resource aggregator can further send the data processing request to the first resource controller; the first resource controller generates resource objects based on the data processing request and stores them in the resource storage.
[0133] Optionally, data processing requests issued by users from the data plane cluster for modifying or deleting resource objects can also be sent to the resource forwarder through the second resource controller, and then forwarded by the resource forwarder to the resource aggregator, and then sent by the resource aggregator to the first resource controller, so that the first resource controller can perform management operations such as modification or deletion on resource objects in the resource storage based on the data processing requests issued by users.
[0134] As a specific example of the present invention Figure 4 This is a schematic diagram of another service mesh according to an embodiment of the present invention. The service mesh 400 includes at least a service mesh control plane 401 and service mesh data 402. Data plane clusters 403a and 403b may be configured in the service mesh data plane.
[0135] The service mesh control plane may deploy a first resource controller 405, a resource storage 406, a metadata generator 407, and a resource aggregator 413.
[0136] Data plane cluster 403a can be configured with a resource registrar 409a, a second resource controller 411a, and a resource forwarder 412a. Data plane cluster 403b can be configured with a resource registrar 409b, a second resource controller 411b, and a resource forwarder 412b.
[0137] In its implementation, users can issue data processing requests from the service mesh control plane 401 using declarative object configuration. The service mesh control plane 401 can then generate a first resource object 404. The first resource controller 405 can analyze the resource configuration information recorded in the data processing request and manage the resource object based on this information, such as creating, deleting, and updating it. Simultaneously, the first resource controller 405 stores the resource object in the resource storage 406, thus achieving storage management of the resource object.
[0138] Subsequently, the metadata generator 407 can generate resource object metadata for resource objects in the resource storage, with each type of resource object corresponding to one set of resource object metadata. Then, the resource object metadata can be distributed to data plane clusters 403a and 403b respectively, so that data plane cluster 403a can store resource object metadata 408a, and data plane cluster 403b can store resource object metadata 408b.
[0139] The resource registrar 409a in the data plane cluster 403a can register resource object metadata 408a with the second resource controller 411a. The second resource controller 411a is responsible for managing resource objects in the data plane cluster 403a. If a user issues a data processing request from the data plane cluster 403a, the second resource controller 411a can intercept the user's data processing request and send it to the resource forwarder 412a. If a user requests the generation of a second resource object 410a through a data processing request in the data plane cluster 403a, the second resource controller 411a can also intercept the data processing request and send it to the resource forwarder 412a. The resource object metadata for each resource type can support different logical implementations, allowing for different processing of different resource objects. The resource forwarder 412a can forward the intercepted data processing request to the mirror resource aggregator 413 according to the mapping relationship registered based on the resource object metadata 408a. The mirror resource aggregator 413 then calls the first resource controller 405 to perform corresponding processing on the resource object.
[0140] The resource registrar 409b in the data plane cluster 403b can register the resource object metadata 408b to the second resource controller 411b. The second resource controller 411b is responsible for managing resource objects in the data plane cluster 403b. If a user issues a data processing request from the data plane cluster 403b, the second resource controller 411b can intercept the user's data processing request and send it to the resource forwarder 412b. If a user requests the generation of a second resource object 410b through a data processing request in the data plane cluster 403b, the second resource controller 411b can also intercept the data processing request and send it to the resource forwarder 412b. The resource object metadata for each resource type can support different logical implementations, thus allowing for different processing for different resource objects. The resource forwarder 412b can forward the intercepted data processing request to the mirror resource aggregator 413 according to the mapping relationship registered based on the resource object metadata 408b. Subsequently, the mirror resource aggregator 413 performs corresponding processing on the resource object by calling the first resource controller 405.
[0141] It should be noted that, for the sake of simplicity, the method embodiments are all described as a series of actions. However, those skilled in the art should understand that the embodiments of the present invention are not limited to the described order of actions, because according to the embodiments of the present invention, some steps can be performed in other orders or simultaneously. Furthermore, those skilled in the art should also understand that the embodiments described in the specification are preferred embodiments, and the actions involved are not necessarily essential to the embodiments of the present invention.
[0142] Reference Figure 5 This diagram illustrates a structural block diagram of a resource management device based on a service mesh according to an embodiment of the present invention. The service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster. The device is applied to the service mesh control plane and may specifically include the following modules:
[0143] Resource acquisition module 501 is used to acquire resource objects from the service mesh control plane or the service mesh data plane;
[0144] Metadata configuration module 502 is used to configure corresponding resource object metadata for different types of resource objects;
[0145] Metadata distribution module 503 is used to distribute the resource object metadata to the data plane cluster in the service mesh data plane.
[0146] Optionally, the resource acquisition module includes:
[0147] The Acquisition submodule is used to obtain data processing requests from the service mesh control plane or the service mesh data plane.
[0148] The object generation submodule is used to generate the resource object corresponding to the data processing request.
[0149] Optionally, the device further includes:
[0150] The storage module is used to store the resource objects in a preset storage space in the service mesh control plane.
[0151] Reference Figure 6 This diagram illustrates a structural block diagram of a data processing device based on a service mesh according to an embodiment of the present invention. The service mesh includes a service mesh control plane and a service mesh data plane, and at least one data plane cluster is provided in the service mesh data plane. The device is applied to the data plane cluster and may specifically include the following modules:
[0152] The request acquisition module 601 is used to acquire data processing requests sent by users.
[0153] The path determination module 602 is used to determine the target path of the data processing request based on preset resource object metadata; wherein, the target path is the access path of the resource object corresponding to the data processing request; and the resource object metadata is obtained from the service mesh control plane.
[0154] The forwarding module 603 is used to forward the data processing request to the grid service control plane based on the target path, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request.
[0155] Optionally, the request acquisition module includes:
[0156] The request detection submodule is used to detect data processing requests issued by users for resource objects in the data plane cluster;
[0157] An interception submodule is used to intercept the data processing request if the data processing request is detected.
[0158] Optionally, the path determination module includes:
[0159] The information extraction submodule is used to obtain resource group information and version information of resource objects from preset resource object metadata;
[0160] The path determination submodule is used to determine the target path of the resource object corresponding to the data processing request using the resource group information and the version information.
[0161] As the device embodiment is basically similar to the method embodiment, the description is relatively simple, and relevant parts can be found in the description of the method embodiment.
[0162] This invention also provides an electronic device, comprising:
[0163] One or more processors; and
[0164] One or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform the methods described in the embodiments of the present invention.
[0165] This invention also provides one or more machine-readable media storing instructions that, when executed by one or more processors, cause the processors to perform the methods described in this invention.
[0166] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0167] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, embodiments of the present invention can take the form of entirely hardware embodiments, entirely software embodiments, or embodiments combining software and hardware aspects. Furthermore, embodiments of the present invention can take the form of computer program products implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0168] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0169] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing terminal device to operate in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0170] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal equipment, causing a series of operational steps to be performed on the computer or other programmable terminal equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable terminal equipment for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0171] Although preferred embodiments of the present invention have been described, those skilled in the art, upon learning the basic inventive concept, can make further updates and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including both the preferred embodiments and all updates and modifications falling within the scope of the present invention.
[0172] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.
[0173] The foregoing has provided a detailed description of a service mesh-based data processing method, a service mesh-based resource management method, a service mesh-based data processing apparatus, a service mesh-based resource management apparatus, an electronic device, and a machine-readable medium provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. Furthermore, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A resource management method based on service mesh, characterized in that, The service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster. The method is applied to the service mesh control plane, including: Obtain resource objects from the service mesh control plane or the service mesh data plane; Configure corresponding resource object metadata for different types of resource objects; The resource object metadata is distributed to the data plane cluster in the service mesh data plane; the resource object metadata is used to manage the resource objects stored in the service mesh control plane in the data plane cluster.
2. The method according to claim 1, characterized in that, The step of obtaining resource objects from the service mesh control plane or the service mesh data plane includes: Obtain data processing requests from the service mesh control plane or the service mesh data plane; Generate the resource object corresponding to the data processing request.
3. The method according to claim 1, characterized in that, The method further includes: The resource object is stored in a preset storage space in the service mesh control plane.
4. The method according to claim 1, characterized in that, The method further includes: Receive data processing requests sent by the service mesh data plane; Based on the data processing request, perform corresponding data processing on the resource object corresponding to the data processing request.
5. The method according to any one of claims 1 to 4, characterized in that, The resource object metadata records the resource group information and version information of the resource object.
6. A data processing method based on service mesh, characterized in that, The service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster. The method is applied in a data plane cluster and includes: Get the data processing request sent by the user; The target path of the data processing request is determined based on the preset resource object metadata; wherein, the target path is the access path of the resource object corresponding to the data processing request; the resource object metadata is obtained from the service mesh control plane; Based on the target path, the data processing request is forwarded to the grid service control plane, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request; the resource object is stored in the grid service control plane.
7. The method according to claim 6, characterized in that, The step of determining the target path of the data processing request based on preset resource object metadata includes: Retrieve resource group information and version information of resource objects from preset resource object metadata; Using the resource group information and the version information, the target path of the resource object corresponding to the data processing request is determined.
8. A resource management device based on service mesh, characterized in that, The service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster. The device is applied in the service mesh control plane and includes: The resource acquisition module is used to acquire resource objects from the service mesh control plane or the service mesh data plane; The metadata configuration module is used to configure the corresponding resource object metadata for different types of resource objects. The metadata distribution module is used to distribute the resource object metadata to the data plane cluster in the service mesh data plane; the resource object metadata is used to manage the resource objects stored in the service mesh control plane in the data plane cluster.
9. A data processing apparatus based on a service mesh, characterized in that, The service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster. The device is used in a data plane cluster and includes: The request retrieval module is used to retrieve data processing requests sent by users; The path determination module is used to determine the target path of the data processing request based on preset resource object metadata; wherein, the target path is the access path of the resource object corresponding to the data processing request; and the resource object metadata is obtained from the service mesh control plane. The forwarding module is used to forward the data processing request to the grid service control plane based on the target path, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request; the resource object is stored in the grid service control plane.
10. A service mesh-based resource management system, characterized in that, The service mesh includes a service mesh control plane and a service mesh data plane, and the service mesh data plane is provided with at least one data plane cluster; the service mesh control plane includes a first resource controller, a resource storage, and a metadata generator; the data plane cluster includes a resource registrar and a second resource controller; The first resource controller is used to obtain resource objects from the service mesh control plane and store the resource objects in the resource storage. The metadata generator is used to configure corresponding resource object metadata for different types of resource objects, and to distribute the resource object metadata to the data plane cluster in the service mesh data plane; The resource registrar is used to receive resource object metadata issued by the metadata generator and register the resource object metadata to the second resource controller; The second resource controller is used to obtain data processing requests sent by users; The target path of the data processing request is determined based on the metadata of the resource object. Based on the target path, the data processing request is forwarded to the grid service control plane, so that the grid service control plane can perform data processing on the resource object corresponding to the data processing request.
11. An electronic device, characterized in that, include: One or more processors; and One or more machine-readable media having instructions stored thereon, which, when executed by the one or more processors, cause the electronic device to perform the method as described in any one of claims 1-7.
12. One or more machine-readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method as described in any one of claims 1-7.
Citation Information
Patent Citations
Service processing method and device and electronic equipment
CN112052014A