Service management method and assembly of cloud management and control system, equipment, storage medium and product
By introducing service governance agents and management centers into the cloud management and control system, the problem of the inability to develop service governance functions in heterogeneous cloud management and control systems is solved, and unified management and efficient development of service governance functions are achieved.
Patent Information
- Application Number
- CN202510096401.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2045-01-21
AI Technical Summary
Due to the differences in the technology stack, the service governance functions cannot be developed in a coordinated manner, and there is a problem of repeated development. The service governance components are encapsulated in the application's business code and cannot be used as independent operation and maintenance objects.
The service governance agent and management center are introduced. The service governance agent is deployed in the application of the cloud management system, associated with the management and control services, and used to perform service governance functions; the service governance management center is used to store and manage service governance policies, and the policy synchronization and update is achieved through configuration information and message queues.
It realizes unified management of the service governance function of the cloud management system, avoids duplicate development, improves development efficiency and operation and maintenance efficiency, and service governance components can be managed as independent operation and maintenance objects.
Smart Images

Figure CN119922187A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to distributed application technology, and in particular to a service governance method and components, equipment, storage media and products of a cloud management and control system. Background Art
[0002] A distributed application is composed of several independently executed application modules, each of which is distributed and runs on one or more computers in a distributed processing system, and completes a task together through network interconnection. Distributed applications usually have service governance functions, which are based on service discovery, load balancing, traffic management, security control, link monitoring and service management functions to manage and control the interactions and behaviors between the services of distributed applications. Specifically, the service governance function is usually implemented based on a cloud management and control system.
[0003] In related technologies, cloud management and control systems are usually heterogeneous distributed applications, that is, each application of the cloud management and control system is developed based on an independent technology stack. For example, based on the cloud management and control system of the Remote Dictionary Server (Redis) database, the management and control services usually include the console service, the instance configuration (ConfigAPI) service, the data migration (DTS) service and the timer (Crontab) service. The four services work together to provide management and control functions for the cloud Redis instance; among them, the Console service is developed using the Java technology stack, and the service governance function is realized through the service governance component of the Java ecosystem; the ConfigAPI service, the DTS service and the Crontab service are developed using the Go technology stack, and the service governance function is realized through the service governance component of the Go ecosystem.
[0004] However, in related technologies, heterogeneous cloud management and control systems usually have the following problems: due to the differences in technology stacks, the service governance functions of various applications cannot be developed collaboratively, resulting in the problem of duplicate development; during the development process of each application based on different technology stacks, it is necessary to introduce corresponding service governance components into the business code to implement the service governance function, which makes development difficult; since the service governance component is encapsulated in the business code of the application, the service governance component of the cloud management and control system cannot be used as an independent operation and maintenance object. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a service governance method and components, devices, storage media and products of a cloud management and control system, aiming to improve the development efficiency of the cloud management and control system.
[0006] The technical solution of the embodiment of the present application is implemented as follows:
[0007] In a first aspect, an embodiment of the present application provides a service governance method for a cloud management and control system, which is applied to a service governance agent, wherein the service governance agent is deployed in an application of the cloud management and control system, and the method includes:
[0008] Receiving configuration information sent by the service governance management center, wherein the configuration information carries a service governance policy;
[0009] Configuring the service governance policy carried by the configuration information;
[0010] After determining that all the service governance policies carried by the configuration information are configured successfully, sending a first confirmation message to the service governance management center;
[0011] Among them, the service governance agent is associated with the management and control service in the application and is used to perform service governance functions; the service governance management center is used to store the service governance policy of the cloud management and control system.
[0012] In the above solution, the method further includes:
[0013] When the service governance agent is started, a first request message is sent to the service governance management center, where the first request message is used to request to obtain all the service governance policies that the service governance agent needs to configure;
[0014] Among them, the first request information carries the service identifier of the associated management and control service; the service governance management center sends the configuration information to the corresponding service governance agent based on the first request information.
[0015] In the above solution, the method further includes:
[0016] After determining that the service governance policies carried by the configuration information have not all been configured successfully, based on the service governance policies that failed to be configured, deleting the corresponding original service governance policies;
[0017] Sending a second confirmation message to the service governance management center;
[0018] The second confirmation information carries the service identifier of the associated management and control service and the service governance policy of the configuration failure.
[0019] In the above solution, the method further includes:
[0020] After sending the second confirmation information, monitoring the message queue;
[0021] Receiving a first message sent by the service governance management center in a message queue, where the first message carries a service governance policy;
[0022] Among them, the service governance management center sends the first message to the message queue based on the second confirmation information.
[0023] In the above solution, the method further includes:
[0024] During the period of monitoring the message queue, if an access request sent by the requester is received, a second request message is sent to the service governance management center, where the second request message carries the service identifier of the associated management and control service and the service governance policy of the configuration failure;
[0025] Among them, the service governance management center sends the configuration information to the corresponding service governance agent based on the second request information.
[0026] In the above solution, the method further includes:
[0027] After receiving the first message, configure the service governance policy carried by the first message.
[0028] In the above solution, the method further includes:
[0029] Get the current indicator data of each service replica of the associated control service;
[0030] Based on the indicator data, calculate the health of each service replica;
[0031] The indicator data includes at least one of the following: load data, request delay data and network path data.
[0032] In the above solution, the method further includes:
[0033] Receiving an access request sent by a requesting party;
[0034] After determining that all service governance policies that need to be configured are configured successfully, the access request is filtered based on the configured service governance policies;
[0035] After the access request passes the filtering, the target service replica is determined based on the health of each service replica of the associated management and control service;
[0036] The access request is sent to the target service replica.
[0037] In a second aspect, an embodiment of the present application provides a service governance method of a cloud management and control system, which is applied to a service governance management center, and the method includes:
[0038] Based on preset rules, determine the service governance policy that the service governance agent needs to configure;
[0039] Generate configuration information based on the service governance policy required to be configured;
[0040] Sending the configuration information to the corresponding service governance agent;
[0041] Among them, the service governance agent is associated with the management and control service in the application of the cloud management and control system, and is used to perform service governance functions; the service governance management center is used to store the service governance policy of the distributed cloud management and control system.
[0042] In the above solution, the service governance policy that needs to be configured by the service governance agent is determined based on preset rules, including:
[0043] Receive a first request message sent by the service governance agent, determine the service governance policy that the service governance agent needs to configure, the first request message carries the service identifier of the associated management and control service, and is used to request to obtain all the service governance policies that the service governance agent needs to configure; and / or,
[0044] Receive a second request message sent by the service governance agent, determine the service governance policy that the service governance agent needs to configure, the second request message carries the service identifier of the associated management and control service and the service governance policy that failed to be configured, and is used to request to re-acquire the service governance policy that failed to be configured; and / or,
[0045] Determine the stored service governance policy update and determine the service governance policy that the service governance agent needs to configure.
[0046] In the above solution, the method further includes:
[0047] After sending the configuration information, receiving a second confirmation message sent by the service governance agent, the second confirmation message carries a service identifier of the associated management and control service and a service governance policy that failed to be configured, indicating that the service governance policy carried by the configuration information was not fully configured successfully;
[0048] Generate a first message based on the service identifier of the associated control service and the service governance policy that failed to configure;
[0049] Send the first message to a message queue.
[0050] In a third aspect, an embodiment of the present application provides a service governance component of a cloud management and control system, the service governance component comprising a service governance management center and at least one service governance agent, the service governance agent is deployed in an application of the cloud management and control system and is associated with a management service in the application, and is used to perform a service governance function; the service governance management center is used to store a service governance policy of the cloud management and control system;
[0051] Among them, the service governance agent is used to execute the method as described in the first aspect; the service governance management center is used to execute the method as described in the second aspect.
[0052] In a fourth aspect, an embodiment of the present application provides a network device, comprising a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method described in the first and second aspects.
[0053] In a fifth aspect, an embodiment of the present application provides a storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps of the method described in the first aspect and the second aspect are implemented.
[0054] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the method described in the first and second aspects.
[0055] The service governance method of the cloud control system applied to the service governance agent provided in the embodiment of the present application includes: receiving configuration information sent by the service governance management center, the configuration information carrying the service governance policy; configuring the service governance policy carried by the configuration information; after determining that all the service governance policies carried by the configuration information are successfully configured, sending a first confirmation message to the service governance management center; wherein the service governance agent is associated with the control service in the application for executing the service governance function; the service governance management center is used to store the service governance policy of the cloud control system. In this way, the embodiment of the present application sinks the service governance function to the service governance agent through the service governance component of the cloud control system and the consistency protocol of the service governance policy, and the business function and service governance function of the cloud control system are separated from each other, so that the service governance capabilities of the heterogeneous cloud control system are no longer limited to the internal ecology of each technology stack, and the service governance function of the cloud control system is unified. Management, improve the development efficiency of the cloud control system. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 This is a schematic diagram of the architecture of the cloud Redis control system in the related technology;
[0057] Figure 2 This is a schematic diagram of the architecture of the cloud Redis management and control system in an example of this application;
[0058] Figure 3 This is a flow chart of a service governance method of a cloud management and control system according to an embodiment of the present application;
[0059] Figure 4 This is a flow chart of a service governance method of a cloud management and control system according to another embodiment of the present application;
[0060] Figure 5 A flowchart of a service governance method for a cloud management and control system in an application example of this application;
[0061] Figure 6 This is a flow chart of a service governance method of a cloud management and control system according to another embodiment of the present application;
[0062] Figure 7 A schematic diagram of filtering access requests in an embodiment of the present application;
[0063] Figure 8 This is a schematic diagram of the structure of the network device according to an embodiment of the present application. DETAILED DESCRIPTION
[0064] The present application is further described in detail below in conjunction with the accompanying drawings and embodiments.
[0065] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein in the specification of this application are only for the purpose of describing specific embodiments and are not intended to limit this application.
[0066] Before describing the service governance method of the cloud management and control system provided in the embodiment of the present application, the service governance component of the cloud management and control system used to execute the service governance method is first described.
[0067] An embodiment of the present application provides a service governance component of a cloud management and control system, which includes a service governance management center and at least one service governance proxy. The service governance proxy is deployed in an application of the cloud management and control system and is associated with the management and control services in the application, and is used to perform service governance functions; the service governance management center is used to store the service governance policies of the cloud management and control system.
[0068] Here, the cloud management and control system is a cloud service based on distributed application architecture deployment and unified operation and management, which is used to manage and monitor service instances in the cloud environment. Among them, the cloud management and control system can provide governance functions such as service discovery, load balancing, traffic management, security control, link monitoring and service management.
[0069] It should be noted that in related technologies, cloud management and control systems are usually heterogeneous distributed applications, that is, each application of the cloud management and control system is developed based on an independent technology stack. Take the cloud management and control system developed based on the Redis database as an example. Figure 1As shown in the figure, the cloud Redis management and control system usually includes Console service, ConfigAPI service, DTS service and Crontab service. The four services work together to provide management and control functions for the cloud Redis instance. Among them, the Console service is developed using the Java technology stack, while the ConfigAPI service, DTS service and Crontab service are developed using the Go technology stack.
[0070] It should be noted that when developing the business functions of each application of the cloud control system, it is necessary to take into account the development of the service governance functions of each application at the same time, and introduce the corresponding service governance components and / or software development kits (SDK) in the business code of each application to realize the service governance function; for heterogeneous cloud control systems, due to the differences in the technology stacks of the development of each application, the service governance functions of each application cannot be developed collaboratively. Taking the cloud Redis control system as an example, the service governance function of the Console service is realized by configuring the official service governance dependency package of the Java ecosystem; the service governance functions of the ConfigAPI service, DTS service and Crontab service rely on frameworks such as Go-micro and Go-zero, and are realized by configuring service governance components. Obviously, since the service governance functions of each application of the heterogeneous cloud control system are limited to the internal technology stack ecosystem, and the service governance components developed based on different languages cannot be shared, there are problems of repeated development in the actual development process of the service governance function, which increases the difficulty of application development; since the service governance component is encapsulated in the business code of the application, the service governance component of the cloud control system cannot be used as an independent operation and maintenance object.
[0071] It should be noted that in the embodiment of the present application, the service governance function of the cloud control system is not implemented based on the control service, but is implemented based on the newly introduced service governance component. Specifically, a service governance agent runs in each application of the cloud control system in the embodiment of the present application. The service governance agent is associated with the control service in the application and is responsible for supervising the import and export traffic of the associated control service. The service governance management center is used to store the service governance policies that each service governance agent needs to configure for the associated control service. Based on the interaction between the service governance management center and the service governance agent, the service governance agent can obtain and configure the corresponding service governance policy when it is started, and can sense and update the service governance policy in time when it is updated. Taking the cloud Redis system as an example, after introducing the service governance component of the embodiment of the present application, the cloud Redis system architecture is as follows: Figure 2 shown.
[0072] It can be understood that the embodiments of the present application shift the implementation of the service governance function from the interaction between management services to the interaction between service governance agents, so that the service governance capabilities of heterogeneous cloud management systems are no longer limited to the internal ecology of each technology stack. Based on the interaction between the service governance management center and the service governance agent, the service governance function of the cloud management system is uniformly managed; and the business functions and service governance functions of the cloud management system are separated from each other. The operation and maintenance personnel only need to pay attention to the service governance agent architecture layer, and do not need to pay attention to the various applications of the cloud management system. Application developers do not need to pay attention to the service governance framework of each technology stack, but only need to pay attention to application business development, thereby improving the development efficiency and operation and maintenance efficiency of the cloud management system.
[0073] It is understandable that since the cloud platform has service discovery capabilities, the service governance component of the embodiment of the present application does not need to set up a registration center.
[0074] It should be noted that the service governance component of the embodiment of the present application is not only applicable to cloud management and control systems developed based on Redis. Heterogeneous cloud management and control systems developed based on other databases can also solve the problem that the service governance function cannot be developed collaboratively due to differences in technology stacks based on the service governance component of the embodiment of the present application; the service governance component of the embodiment of the present application is also applicable to non-heterogeneous cloud management and control systems to perform service governance functions.
[0075] Based on the above service governance components, the embodiment of the present application also provides a service governance method for a cloud management and control system, which is applied to a service governance agent and a service governance management center. Figure 3 As shown, the service governance methods applied to the service governance agent include:
[0076] Step 301: Receive configuration information sent by the service governance management center, where the configuration information carries the service governance policy.
[0077] Step 302: configure the service governance policy carried by the configuration information.
[0078] Step 303: After determining that all service governance policies carried in the configuration information are configured successfully, send a first confirmation message to the service governance management center.
[0079] Here, the embodiment of the present application provides an interactive process between a service governance agent and a service governance management center, and full-duplex communication is established between the service governance agent and the service governance management center to realize the configuration and update of the service governance policy of the service governance agent. After the service governance agent receives the configuration information sent by the service governance management center, it configures the received service governance policy, and after determining that all the received service governance policies have been successfully configured, it sends a first confirmation message to indicate that the synchronization of this service governance policy is successful.
[0080] Here, after the service governance agent determines that all the required service governance policies are successfully configured, it executes the service governance function based on the configured service governance policies. Among them, the service governance policy includes filtering policy (Filter) and routing policy (Router). When the service governance agent receives the access request sent by the requester, it filters the access request based on the configured Filter, and then routes the access request to the target service replica based on the configured Router.
[0081] It should be noted that in an embodiment of the present application, the service governance management center generates and sends configuration information to the corresponding service governance agent based on preset rules, and the preset rules include at least one of the following: responding to information sent by the service governance agent and determining service governance policy updates.
[0082] Exemplarily, the method further includes: when the service governance agent is started, sending a first request message to the service governance management center, the first request message is used to request to obtain all the service governance policies that the service governance agent needs to configure. The first request message carries the service identifier of the associated control service; based on the first request message, the service governance management center sends the configuration information to the corresponding service governance agent.
[0083] It is understandable that after the service governance agent is started, since the service governance policy is not configured, the service governance agent initiates service governance policy synchronization and sends a first request message to request to obtain all the configured service governance policies; the preset rules of the service governance management center may include receiving the first request message sent by the service governance agent, and after receiving the first request message, the service governance management center determines all the service governance policies that need to be configured for the corresponding service governance agent from the stored service governance policies, and sends configuration information carrying all the service governance policies that need to be configured to the corresponding service governance agent.
[0084] It is understandable that since the service governance management center may communicate with multiple service governance agents, the information sent by the service governance agent carries the service identifier of the associated management and control service. The service governance management center can determine the interacting service governance agent based on the service identifier of the management and control service.
[0085] Here, the service governance management center can determine the type of information based on the specific fields carried in the information sent by the service governance agent. In some embodiments, the information sent by the service governance agent includes a service version number, wherein the service version number of the first request information is empty, indicating that the service governance agent is not currently configured with a service governance policy. The service governance management center can determine that the received information is the first request information based on the fact that the version number of the received information is empty, and configure the initial service version number when generating the configuration information. The service governance agent and the service governance management center can determine the current interaction process based on the change of the version number in subsequent interactions.
[0086] It should be noted that the service governance policy synchronization can also be initiated by the service governance management center. Specifically, after the service governance management center determines that the service governance policy is updated, it sends the configuration information carrying the updated service governance policy to the corresponding service governance agent. The service governance agent configures the received service governance policy and, after determining that all received service governance policies have been successfully configured, sends the first confirmation information to indicate that the dynamic update of the service governance policy is successful.
[0087] Exemplarily, the method further includes: after determining that the service governance policies carried by the configuration information have not been fully configured successfully, based on the service governance policies that failed to be configured, deleting the corresponding original service governance policies; and sending a second confirmation message to the service governance management center. The second confirmation message carries the service identifier of the associated control service and the service governance policy that failed to be configured.
[0088] It should be noted that after the service governance agent receives the configuration information, all the service governance policies carried in the configuration information may not be configured successfully. For the situation where the service governance policy configuration fails, the embodiment of the present application also provides a configuration compensation mechanism. Specifically, if it is determined that the service governance policy has not been configured successfully, the service governance agent erases the local cache of the original service governance policy corresponding to the failed service governance policy before sending the second request information for requesting the failed configuration service governance policy, in order to ensure the consistency of the currently configured service governance policy, so as to avoid receiving the access request sent by the requester at this time, and the service governance agent performs service governance functions based on the inconsistent version of the locally cached service governance policy.
[0089] It should be noted that if the service governance agent determines that the service governance policy carried by the configuration information in response to the first request information has not been fully configured successfully, the service governance policy deletion step will not be executed because the service governance agent has not cached the corresponding original service governance policy at this time.
[0090] Exemplarily, the method also includes: after sending the second confirmation information, monitoring the message queue; receiving the first message sent by the service governance management center in the message queue, the first message carrying the service governance policy; wherein the service governance management center sends the first message to the message queue based on the second confirmation information.
[0091] Exemplarily, the method further includes: after receiving the first message, configuring the service governance policy carried by the first message.
[0092] It should be noted that, since the service governance management center may communicate with multiple service governance agents, and the data packets of the service governance policies that the service governance agents need to configure may be large, in order to avoid resource congestion caused by the frequent sending and receiving of service governance policies, in the embodiment of the present application, the service governance management center resends the service governance policy that failed to be configured to the service governance agent through a lazy-loaded configuration compensation mechanism. Specifically, based on the service identifier of the associated management and control service carried in the second confirmation information and the service governance policy that failed to be configured, the service governance management center pushes the service governance policy that failed to be configured to the message queue in the form of a message. After sending the second confirmation information, the service governance agent monitors the message queue, waits for the consumption of the corresponding first message, and locally reconfigures the service governance policy that failed to be configured last time.
[0093] It is understandable that re-pushing the service governance policy that failed to be configured based on the lazy loading delayed update method can reduce the resource loss caused by the interaction between the service governance agent and the service governance management center.
[0094] Here, after the service governance agent determines that all service governance policies carried in the first message have been configured successfully, it returns the message queue successfully.
[0095] Exemplarily, the method further includes: during the monitoring of the message queue, if an access request sent by the requester is received, a second request message is sent to the service governance management center, the second request message carries the service identifier of the associated management service and the service governance policy of the failed configuration. The service governance management center sends the configuration information to the corresponding service governance agent based on the second request message.
[0096] It should be noted that when re-pushing the service governance policy that failed to be configured based on the lazy loading method, there may be a situation where the service governance agent receives an access request while listening to the message queue. Since the service governance policies that the service governance agent needs to configure at this time have not been fully configured successfully, the service governance function cannot be performed normally. In response to the above situation, the embodiment of the present application adopts a delayed loading method, and only sends a second request information to the service governance management center when the service governance agent needs to process the access request; the preset rules of the service governance management center may include receiving the second request information sent by the service governance agent. After receiving the second request information, the service governance management center determines the service governance policy that failed to be configured based on the second request information, and pushes the service governance policy that failed to be configured directly to the corresponding service governance agent in the form of configuration information.
[0097] It should be noted that when the service governance agent receives an access request while listening to the queue, it will not process the access request immediately, but will process the access request after successfully configuring all the service governance policies that previously failed to configure based on the first message or configuration information.
[0098] It is understandable that in the embodiment of the present application, in the case of a service governance policy configuration failure, a lazy loading + delayed loading method is used to re-push the service governance policy that failed to be configured, so as to reduce resource loss. While the service governance agent is waiting to receive the service governance policy, if there is no need to process the access request, it queues and waits to obtain the service governance policy that needs to be reconfigured from the message queue; if there is a need to process the access request, a second request message is sent to the service governance management center, and the service governance policy that needs to be reconfigured is directly obtained through the configuration information in response to the second request message.
[0099] It should be noted that after the service governance agent sends the second request information, there is a situation where the first message and the configuration information carry the same service governance policy. In some embodiments, when the service governance agent receives the first message, if it is determined that the service governance policies carried by the first message are not configured at all, then the service governance policy carried by the first message is configured, and the access request is processed after all configurations are successful. After the service governance agent receives the configuration information in response to the second request information, it determines that the service governance policies carried by the configuration information have been successfully configured, and directly sends the first confirmation information to the service governance management center without reconfiguring. When the service governance agent receives the configuration information in response to the second request information, if it is determined that the service governance policies carried by the configuration information are not configured at all, then the service governance policy carried by the configuration information is configured, and the access request is processed after all configurations are successful. After the service governance agent receives the first message, it determines that the service governance policies carried by the first message have been successfully configured, and directly consumes the first message without reconfiguring.
[0100] Exemplarily, based on the above service governance method applied to the service governance agent, as Figure 4 As shown in the figure, the service governance methods applied to the service governance management center include:
[0101] Step 401, based on preset rules, determine the service governance policy that the service governance agent needs to configure.
[0102] Step 402: Generate configuration information based on the service governance policy that needs to be configured.
[0103] Step 403: Send configuration information to the corresponding service governance agent.
[0104] Here, the preset rule includes at least one of the following: responding to information sent by the service governance agent and determining a service governance policy update.
[0105] It can be understood that the embodiment of the present application performs unified coordination and management of the service governance function of the cloud management and control system through the service governance management center, and pushes the service governance policy to the corresponding service governance agent.
[0106] Specifically, based on preset rules, the service governance policy that the service governance agent needs to configure is determined, including: receiving a first request message sent by the service governance agent to determine the service governance policy that the service governance agent needs to configure, the first request message carries the service identifier of the associated control service, and is used to request to obtain all the service governance policies that the service governance agent needs to configure; and / or, receiving a second request message sent by the service governance agent to determine the service governance policy that the service governance agent needs to configure, the second request message carries the service identifier of the associated control service and the service governance policy that failed to be configured, and is used to request to re-acquire the service governance policy that failed to be configured; and / or, determining the stored service governance policy update, and determining the service governance policy that the service governance agent needs to configure.
[0107] It can be understood that after receiving the first request information, the service governance management center determines all the service governance policies that need to be configured by the corresponding service governance agent from the stored service governance policies based on the service identifier carried in the first request information, and sends the configuration information carrying all the service governance policies that need to be configured to the corresponding service governance agent; after receiving the second request information, the service governance management center sends the configuration information carrying the service governance policy that failed to be configured to the corresponding service governance agent based on the service identifier carried in the second request information and the service governance policy that failed to be configured; after determining that the stored service governance policy is updated, the service governance management center determines the service governance agent corresponding to the updated service governance policy, and sends the configuration information carrying the updated service governance policy to the corresponding service governance agent.
[0108] Here, the configuration information carries the service identifier of the management and control service associated with the target service governance agent, and the service governance agent authenticates the configuration information based on the service identifier carried by the configuration information.
[0109] In some embodiments, the service governance management center may communicate with multiple service governance agents at the same time, and the configuration information may carry multiple service identifiers. The service governance agent determines whether to receive the configuration information based on whether it carries the service identifier of the associated management and control service.
[0110] In this column, if the information sent by the service governance agent carries the service version number, the configuration information also carries the service version number. Specifically, after receiving the first request information, the service governance management center generates an initial service version number and configures it in the configuration information in response to the first request information. The service governance management center and the service governance agent authenticate the interaction process based on the version number carried in the information; after receiving the first confirmation information, the service governance management center determines that the synchronization of this service governance policy is successful, and then updates the corresponding version number. The service governance management center and the corresponding service governance agent subsequently interact based on the updated version number.
[0111] Exemplarily, the method also includes: after sending the configuration information, receiving a second confirmation message sent by the service governance agent, the second confirmation message carrying the service identifier of the associated control service and the service governance policy that failed to be configured, indicating that the service governance policy carried by the configuration information has not been fully configured successfully; generating a first message based on the service identifier of the associated control service and the service governance policy that failed to be configured; and sending the first message to the message queue.
[0112] Here, the service governance management center determines that the service governance agent has failed to configure the service governance policy based on the receipt of the second confirmation information, and pushes the service governance policy that needs to be reconfigured through the message queue based on the service identifier and the failed service governance policy carried in the second confirmation information.
[0113] Here, the message queue sets a retransmission mechanism to retransmit the first message that carries a service governance policy that has not been fully configured successfully.
[0114] The following is a detailed description of the cloud management and control system service management method of the present application in combination with specific application examples.
[0115] In an application example of the present application, a service governance method of a cloud management and control system is as follows: Figure 5 As shown, including:
[0116] Step 501: The service governance agent sends a first request message to the service governance management center.
[0117] Here, step 501 is executed when the service governance agent is started.
[0118] Here, the field protocol of the first request information is shown in Table 1.
[0119] Table 1
[0120] Property name type describe ServiceVersion string Service version number Node Node Node Information ServiceNames []string Service Name Type string Resource type: Filter, Router Nonce string Random Key
[0121] Here, the service version number and random key of the first request information are empty.
[0122] Here, the service name is the service identifier of the control service associated with the service governance agent.
[0123] Step 502: The service governance management center generates and sends configuration information to the service governance agent based on the first request information.
[0124] Here, the field protocol of the configuration information is shown in Table 2.
[0125] Table 2
[0126]
[0127]
[0128] Here, the service governance management center adds all the required filters and / or routers to the configuration information based on the resource type requested by the first request information, and configures the initial service version number and the key for this interaction.
[0129] Step 503: The service governance agent configures the service governance policy carried in the configuration information.
[0130] Here, the service governance agent determines all the filters and / or routers that carry the request in the configuration information based on the service name of the associated management and control service carried in the configuration information.
[0131] Step 504: After the service governance agent determines that all service governance policies have been configured successfully, it sends a first confirmation message to the service governance management center.
[0132] Here, the protocol field of the first confirmation information includes at least: service version number SerivceVersion, service name ServiceNames and key Nonce. Among them, the service version number and key carried in the first confirmation information are consistent with the service version number and key carried in the configuration information sent by the service governance management center in step 502.
[0133] Here, steps 501 to 504 are performed in a scenario where the service governance agent is started.
[0134] Step 505: The service governance management center determines that the filtering policy Filter is updated.
[0135] Step 506: The service governance management center sends configuration information to the service governance agent.
[0136] Here, the configuration information carries the updated Filter.
[0137] Here, the service governance management center determines the target service governance agent based on the updated Filter, and the configuration information carries the service name of the management and control service associated with the target service governance agent.
[0138] Step 507: The service governance agent configures the filtering policy Filter carried in the configuration information.
[0139] Step 508: After the service governance agent determines that all updated filtering policies Filter are configured successfully, it sends a first confirmation message to the service governance management center.
[0140] Here, the configuration information and the first confirmation information in step 506 and step 508 carry the same key.
[0141] Here, step 505 to step 508 are performed in the scenario where the filtering policy Filter is updated.
[0142] Step 509: The service governance management center determines that the routing policy Router is updated.
[0143] Step 510: The service governance management center sends configuration information to the service governance agent.
[0144] Here, the configuration information carries the updated Router.
[0145] Here, the service governance management center determines the target service governance agent based on the updated Router, and the configuration information carries the service name of the management and control service associated with the target service governance agent.
[0146] Step 511, the service governance agent configures the routing policy Router carried in the configuration information.
[0147] Step 512: After the service governance agent determines that the updated routing policy Router is not fully configured successfully, it sends a second confirmation message to the service governance management center.
[0148] Here, the field protocol of the second confirmation information is shown in Table 3.
[0149] Table 3
[0150] Property name type describe ServiceVersion string Service version number ServiceNames []string Service Name Type string Failure Type Nonce string Random Key Detail string Cause of failure
[0151] Here, after receiving the second confirmation information of the service, the service governance management center generates a first message and pushes it to the message queue based on the failed configuration routing policy Router and service name.
[0152] Here, steps 509 to 512 are performed in a scenario where the routing policy Router is updated.
[0153] Exemplarily, after the service governance agent determines that all the service governance policies to be configured are successfully configured, it executes the service governance function based on the configured service governance policies. Figure 6 As shown, the service governance method applied to the service governance agent also includes:
[0154] Step 601: Receive an access request sent by a requester.
[0155] Step 602: After determining that all service governance policies that need to be configured are configured successfully, access requests are filtered based on the configured service governance policies.
[0156] Step 603: After the access request passes the filtering, the target service replica is determined based on the health of each service replica of the associated management and control service.
[0157] Step 604, sending an access request to the target service replica.
[0158] It should be noted that if the service governance agent receives an access request while listening to the message queue, it will not process the access request immediately because the service governance policies that the service governance agent needs to configure have not been fully configured at this time. Instead, it will process the access request after determining that all the service governance policies that need to be configured are fully configured.
[0159] Specifically, based on the configured service governance policy, the access request is filtered, including: based on the configured filtering policy Filter, the access request is filtered.
[0160] It should be noted that the service governance agent of the embodiment of the present application has a built-in filter policy chain Filter Chain, which may include at least the basic filter policy BaseFilter set during initialization. Each time the service governance agent obtains the filter policy Filter based on the configuration information, the obtained filter policy Filter is added to the filter policy chain Filter Chain. The filter policy Filter may also include: IP filter policy IP-Filter, authentication filter policy Authencation-Filter and fuse filter policy Hystrix-Filter. Figure 7As shown, the service governance agent filters the access request in turn based on each filter policy in the filter policy chain Filter Chain. After the access request passes the filter policy chain Filter Chain, the access request is sent to the target service copy based on the routing policy Router.
[0161] It should be noted that although the service governance component introduced in the cloud management and control system in the embodiment of the present application can realize the unified management of the service governance function, the service governance component will also cause additional resource loss. In the related technology, after the cloud management and control system receives the access request, the forwarding mechanism of the service copy usually relies on the polling strategy to randomly forward the access request to any accessible service copy; in order to compensate for the resource loss caused by the service governance component, the embodiment of the present application also provides a service copy health assessment method, which determines the target service copy based on the health of each service copy to reduce the resource loss caused by forwarding the access request.
[0162] Exemplarily, the method also includes: obtaining current indicator data of each service copy of the associated management service; based on the indicator data, calculating the health of each service copy; wherein the indicator data includes at least one of the following: load data, request latency data, and network path data.
[0163] It should be noted that in the embodiment of the present application, the service governance agent, as the request entry of the associated control service, can directly monitor the load data, request latency data, network path data and other indicator data of each copy of the associated control service; the service governance agent caches the acquired indicator data and calculates the health of each service copy through a preset health assessment model. After the access request is filtered by the filter chain Filter Chain of the service governance agent, the service governance agent determines that the service copy with the best current health assessment result is the target service copy, and sends the access request to the target service copy.
[0164] In some embodiments, the health assessment model preset by the service governance agent is specifically as follows:
[0165]
[0166] Among them, Factor is the health assessment result, Load is the load factor, ResT is the request delay factor, is the network path loss factor, and α, β and γ are the weights corresponding to each factor.
[0167] Here, the load data includes at least CPU utilization, memory utilization, network utilization, current connection utilization and processing capacity factor indicators. Among them, the load factor of the service replica is calculated based on the following model:
[0168]
[0169] Among them, C is the CPU utilization, R is the memory utilization, N is the network utilization, P is the current connection utilization, Ability is the processing capability factor indicator, and the weights c, r, n, p, and b are pre-configured based on the type of management and control service.
[0170] It is understandable that the service governance agent can calculate the load factor of each service replica based on the cached load data of each service replica.
[0171] Here, the request latency data includes at least: average request response time, error rate and 95% request response time. The request latency factor of the service replica is calculated based on the following model:
[0172] ResT=x*A(t)+e*E*100+z*P(t)
[0173] Where t is the total time of the access request, A(t) is the average request response time, E is the error rate, and P(t) is the 95% request response time.
[0174] It can be understood that the service governance agent can calculate the request delay factor of each service copy based on the cached request delay data of each service copy.
[0175] Here, since the cloud management and control service is deployed based on a distributed application architecture, when routing traffic, the routing path may cross availability zones (AZs) and regions (Regions). When determining the routing path, the routing path will be screened by the number of hops in the routing path. Among them, the network path loss factor The i in the equation is the number of hops in the routing path. The network loss caused by each hop is calculated by the function C(i). The overall network loss caused by the routing path is the network path loss factor.
[0176] It can be understood that the lower the score of the health assessment result Factor of the service copy, the higher the health of the service copy, and the service governance agent will preferentially send access requests to the service copy with the best current health.
[0177] It should be noted that each time the service governance agent forwards an access request to the target service replica, it recalculates the health of each service replica of the associated management and control service based on the data returned by the target service replica.
[0178] In order to implement the method of the embodiment of the present application, the embodiment of the present application also provides a network device. Figure 8 Only an exemplary structure of the network device is shown, not all structures, and can be implemented as needed. Figure 8Partial or complete structure shown.
[0179] like Figure 8 As shown, the network device 800 provided in the embodiment of the present application includes: at least one processor 801, a memory 802, a user interface 803 and at least one network interface 804. The various components in the network device 800 are coupled together through a bus system 805. It can be understood that the bus system 805 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 805 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 8 Various buses are labeled as bus system 805 .
[0180] The user interface 803 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0181] The memory 802 in the embodiment of the present application is used to store various types of data to support the operation of the network device 800. Examples of such data include: any computer program used to operate on the network device 800.
[0182] The service governance method of the cloud management and control system disclosed in the embodiment of the present application can be applied to the processor 801, or implemented by the processor 801. The processor 801 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the service governance method of the cloud management and control system can be completed by the hardware integrated logic circuit or software instructions in the processor 801. The above-mentioned processor 801 can be a general-purpose processor, a digital signal processor (DSP, Digital Signal Processor), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 801 can implement or execute the various methods, steps and logic block diagrams of the cloud management and control system disclosed in the embodiment of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the method disclosed in the embodiment of the present application, it can be directly embodied as a hardware decoding processor to execute, or it can be executed by a combination of hardware and software modules in the decoding processor. The software module can be located in a storage medium, which is located in the memory 802. The processor 801 reads the information in the memory 802 and completes the steps of the service governance method of the cloud management and control system provided in the embodiment of the present application in combination with its hardware.
[0183] In an exemplary embodiment, the network device 800 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), FPGAs, general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to execute the aforementioned service governance method of the cloud management and control system.
[0184] It can be understood that the memory 802 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. Among them, the non-volatile memory can be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a magnetic random access memory (FRAM), a flash memory, a magnetic surface memory, an optical disk, or a compact disc read-only memory (CD-ROM); the magnetic surface memory can be a disk memory or a tape memory. The volatile memory can be a random access memory (RAM), which is used as an external cache. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM), synchronous static random access memory (SSRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct rambus random access memory (DRRAM).The memories described in the embodiments of the present application are intended to include, but are not limited to, these and any other suitable types of memories.
[0185] In an exemplary embodiment, the present application also provides a storage medium, namely a computer storage medium, which may be a computer-readable storage medium, for example, a memory 802 storing a computer program, which may be executed by a processor 801 of a network device 800 to complete the steps described in the service governance method of the cloud management and control system of the present application embodiment. The computer-readable storage medium may be a memory such as a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disk, or a CD-ROM.
[0186] In an exemplary embodiment, the embodiment of the present application also provides a computer program product, including a computer program, which can be executed by the processor 801 of the network device 800 to complete the steps described in the service governance method of the cloud management and control system of the embodiment of the present application.
[0187] It should be noted that: "first", "second", etc. are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0188] In addition, the technical solutions described in the embodiments of the present application can be combined arbitrarily without conflict.
[0189] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
Claims
1. A service governance method for a cloud management and control system, characterized in that: Applied to a service governance agent, the service governance agent is deployed in an application of the cloud management and control system, and the method includes: Receiving configuration information sent by the service governance management center, wherein the configuration information carries a service governance policy; Configuring the service governance policy carried by the configuration information; After determining that all the service governance policies carried by the configuration information are configured successfully, sending a first confirmation message to the service governance management center; Among them, the service governance agent is associated with the management and control service in the application and is used to perform service governance functions; the service governance management center is used to store the service governance policy of the cloud management and control system.
2. The method according to claim 1, characterized in that The method further comprises: When the service governance agent is started, a first request message is sent to the service governance management center, where the first request message is used to request to obtain all the service governance policies that the service governance agent needs to configure; Among them, the first request information carries the service identifier of the associated management and control service; the service governance management center sends the configuration information to the corresponding service governance agent based on the first request information.
3. The method according to claim 1, characterized in that The method further comprises: After determining that the service governance policies carried by the configuration information have not all been configured successfully, based on the service governance policies that failed to be configured, deleting the corresponding original service governance policies; Sending a second confirmation message to the service governance management center; The second confirmation information carries the service identifier of the associated management and control service and the service governance policy of the configuration failure.
4. The method according to claim 3, characterized in that: The method further comprises: After sending the second confirmation information, monitoring the message queue; Receiving a first message sent by the service governance management center in a message queue, where the first message carries a service governance policy; Among them, the service governance management center sends the first message to the message queue based on the second confirmation information.
5. The method according to claim 4, characterized in that The method further comprises: During the period of monitoring the message queue, if an access request sent by the requester is received, a second request message is sent to the service governance management center, where the second request message carries the service identifier of the associated management and control service and the service governance policy of the configuration failure; Among them, the service governance management center sends the configuration information to the corresponding service governance agent based on the second request information.
6. The method according to claim 4, characterized in that The method further comprises: After receiving the first message, configure the service governance policy carried by the first message.
7. The method according to any one of claims 1 to 6, characterized in that: The method further comprises: Get the current indicator data of each service replica of the associated control service; Based on the indicator data, calculate the health of each service replica; The indicator data includes at least one of the following: load data, request delay data and network path data.
8. The method according to claim 7, characterized in that The method further comprises: Receiving an access request sent by a requesting party; After determining that all service governance policies that need to be configured are configured successfully, the access request is filtered based on the configured service governance policies; After the access request passes the filtering, the target service replica is determined based on the health of each service replica of the associated management and control service; The access request is sent to the target service replica.
9. A service governance method for a cloud management and control system, characterized in that: Applied to a service governance management center, the method includes: Based on preset rules, determine the service governance policy that the service governance agent needs to configure; Generate configuration information based on the service governance policy required to be configured; Sending the configuration information to the corresponding service governance agent; Among them, the service governance agent is associated with the management and control service in the application of the cloud management and control system, and is used to perform service governance functions; the service governance management center is used to store the service governance policy of the distributed cloud management and control system.
10. The method according to claim 9, characterized in that The service governance strategy that needs to be configured by the service governance agent is determined based on preset rules, including: Receive a first request message sent by the service governance agent, determine the service governance policy that the service governance agent needs to configure, the first request message carries the service identifier of the associated management and control service, and is used to request to obtain all the service governance policies that the service governance agent needs to configure; and / or, Receive a second request message sent by the service governance agent, determine the service governance policy that the service governance agent needs to configure, the second request message carries the service identifier of the associated management and control service and the service governance policy that failed to be configured, and is used to request to re-acquire the service governance policy that failed to be configured; and / or, Determine the stored service governance policy update and determine the service governance policy that the service governance agent needs to configure.
11. The method according to claim 9, characterized in that The method further comprises: After sending the configuration information, receiving a second confirmation message sent by the service governance agent, the second confirmation message carries a service identifier of the associated management and control service and a service governance policy that failed to be configured, indicating that the service governance policy carried by the configuration information was not fully configured successfully; Generate a first message based on the service identifier of the associated control service and the service governance policy that failed to configure; Send the first message to a message queue.
12. A service governance component of a cloud management and control system, characterized in that: The service governance component includes a service governance management center and at least one service governance agent, wherein the service governance agent is deployed in the application of the cloud management and control system and is associated with the management and control service in the application, and is used to perform service governance functions; the service governance management center is used to store the service governance policy of the cloud management and control system; Wherein, the service governance agent is used to execute the method described in any one of claims 1 to 8; the service governance management center is used to execute the method described in any one of claims 9 to 11.
13. A network device, characterized in that: The invention comprises a processor and a memory for storing a computer program that can be run on the processor, wherein the processor, when running the computer program, executes the steps of the method according to any one of claims 1 to 11.
14. A storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
15. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 11 are implemented.
Citation Information
Patent Citations
System for realizing dynamic issuing of service governance strategy based on SpringCloud micro-service technology
CN115086176A
Micro-service governance method and device
CN117667029A
Systems and methods for providing managed services
US20170250853A1
Service governance method and apparatus, and computer-readable storage medium
WO2025010985A1