Service management method and component of cloud management and control system, device, storage medium and product
By introducing a service governance agent and management center, the problem of the inability to collaboratively develop service governance functions in heterogeneous cloud management systems was solved, achieving unified service governance management of the cloud management system and improving development and operation efficiency.
Patent Information
- Application Number
- CN202510096401.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-21
- Publication Date
- 2025-11-04
- Estimated Expiration
- 2045-01-21
AI Technical Summary
Due to differences in technology stacks, heterogeneous cloud management and control systems cannot collaboratively develop service governance functions, resulting in redundant development. Furthermore, service governance components are encapsulated in business code and cannot be used as independent operation and maintenance objects.
By introducing a service governance agent and a management center, the interaction between the service governance agent and the management center enables the unified configuration and management of service governance strategies. This separates business functions from service governance functions, allowing service governance capabilities to no longer be limited to the ecosystem of each technology stack.
It enables unified management of service governance functions of the cloud management system, improves development and operation efficiency, reduces the difficulty of redundant development, and simplifies operation and maintenance processes.
Smart Images

Figure CN119922187B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to distributed application technology, and particularly relates to a service management method and component of a cloud management and control system, equipment, a storage medium and a product. BACKGROUND
[0002] A distributed application is composed of a plurality of independently executed application modules, each of which is distributed on one or more computers of a distributed processing system and runs to jointly complete a task through network interconnection. The distributed application usually has a service management function, and based on service discovery, load balancing, traffic management, security control, link monitoring and service management of the service management function, the interaction and behavior between the services of the distributed application are managed and controlled. Specifically, the service management function is usually implemented based on a cloud management and control system.
[0003] In the related art, the cloud management and control system is usually a heterogeneous distributed application, that is, each application of the cloud management and control system is developed based on an independent technology stack. For example, based on a Redis (Remote Dictionary Server) database cloud management and control system, the management and control services usually include a Console service, a ConfigAPI service, a DTS (Data Transfer Service) service and a Crontab service, and the four services work together to provide management and control functions for a cloud Redis instance. The Console service is developed using a Java technology stack and implements a service management function through a service management component of the Java ecosystem. The ConfigAPI service, the DTS service and the Crontab service are developed using a Go technology stack and implement a service management function through a service management component of the Go ecosystem.
[0004] However, in the related art, the heterogeneous cloud management and control system usually has the following problems: due to the difference between the technology stacks, the service management functions of each application cannot be developed collaboratively, and there is a problem of repeated development; during the development of each application based on different technology stacks, a corresponding service management component needs to be introduced into the business code to implement the service management function, resulting in a large development difficulty; since the service management component is encapsulated in the business code of the application, the service management component of the cloud management and control system cannot be taken as an independent operation and maintenance object. SUMMARY
[0005] Therefore, the embodiments of the present application provide a service management method and component of a cloud management and control system, equipment, a storage medium and a product, aiming to improve the development efficiency of the cloud management and control system.
[0006] The technical scheme of the embodiments of the present application is as follows:
[0007] In a first aspect, an embodiment of the present application provides a service management method of a cloud management and control system, applied to a service management agent, the service management agent being deployed in an application of the cloud management and control system, and the method comprising:
[0008] receiving configuration information sent by a service management center, the configuration information carrying service management policies;
[0009] configuring the service management policies carried by the configuration information;
[0010] after determining that the service management policies carried by the configuration information are all configured successfully, sending first confirmation information to the service management center;
[0011] The service management agent is associated with a management and control service in the application and is used to execute a service management function, and the service management center is used to store service management policies of the cloud management and control system.
[0012] In the above scheme, the method further comprises:
[0013] when the service management agent is started, sending first request information to the service management center, the first request information being used to request to obtain all service management policies required by the service management agent to be configured;
[0014] The first request information carries a service identifier of the associated management and control service, and the service management center sends the configuration information to the corresponding service management agent based on the first request information.
[0015] In the above scheme, the method further comprises:
[0016] after determining that the service management policies carried by the configuration information are not all configured successfully, deleting a corresponding original service management policy based on a service management policy that fails to be configured;
[0017] sending second confirmation information to the service management center;
[0018] The second confirmation information carries a service identifier of the associated management and control service and a service management policy that fails to be configured.
[0019] In the above scheme, the method further comprises:
[0020] after sending the second confirmation information, listening to a message queue;
[0021] receiving a first message sent by the service management center in the message queue, the first message carrying a service management policy;
[0022] The service governance management center sends the first message to the message queue based on the second confirmation information.
[0023] In the above scheme, the method further comprises:
[0024] During the period of listening to the message queue, if an access request sent by a requestor is received, second request information is sent to the service governance management center, the second request information carrying a service identifier of an associated managed service and a service governance policy of a configuration failure;
[0025] 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 scheme, the method further comprises:
[0027] After receiving the first message, the service governance policy carried by the first message is configured.
[0028] In the above scheme, the method further comprises:
[0029] The current index data of each service replica of the associated managed service is obtained;
[0030] The health degree of each service replica is calculated based on the index data.
[0031] The index data includes at least one of the following: load data, request delay data, and network path data.
[0032] In the above scheme, the method further comprises:
[0033] An access request sent by a requestor is received;
[0034] After determining that all the required configured service governance policies are successfully configured, the access request is filtered based on the configured service governance policy.
[0035] After the access request is filtered, a target service replica is determined based on the health degree of each service replica of the associated managed service.
[0036] The access request is sent to the target service replica.
[0037] In a second aspect, the embodiments of the present application provide a service governance method of a cloud management and control system, applied to a service governance management center, the method comprising:
[0038] Based on a preset rule, a service governance policy required to be configured by a service governance agent is determined.
[0039] Based on the required configured service governance policy, configuration information is generated.
[0040] sending the configuration information to a corresponding service governance agent;
[0041] The service governance agent is associated with a management and control service in an application of the cloud management and control system, and is configured to perform a service governance function. The service governance management center is configured to store a service governance strategy of the distributed cloud management and control system.
[0042] In the foregoing solution, the service governance strategy required by the service governance agent is determined based on a preset rule, and the method comprises the following steps.
[0043] The first request information sent by the service governance agent is received, and the service governance strategy required by the service governance agent is determined. The first request information carries a service identifier of the associated management and control service, and is configured to request to obtain all service governance strategies required by the service governance agent.
[0044] The second request information sent by the service governance agent is received, and the service governance strategy required by the service governance agent is determined. The second request information carries a service identifier of the associated management and control service and a service governance strategy of a configuration failure, and is configured to request to reacquire the service governance strategy of the configuration failure.
[0045] The service governance strategy stored is updated, and the service governance strategy required by the service governance agent is determined.
[0046] In the foregoing solution, the method further comprises the following steps.
[0047] After the configuration information is sent, the second confirmation information sent by the service governance agent is received. The second confirmation information carries a service identifier of the associated management and control service and a service governance strategy of a configuration failure, and indicates that the service governance strategies carried in the configuration information are not all successfully configured.
[0048] The first message is generated based on the service identifier of the associated management and control service and the service governance strategy of the configuration failure.
[0049] The first message is sent 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 comprises 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 and control service in the application, and is configured to perform a service governance function. The service governance management center is configured to store a service governance strategy of the cloud management and control system.
[0051] The service management agent is configured to execute the method of the first aspect, and the service management center is configured to execute the method of the second aspect.
[0052] In a fourth aspect, an embodiment of the present application provides a network device, including a processor and a memory for storing a computer program capable of running on the processor, wherein the processor is configured to execute the computer program to perform the steps of the method according to the first aspect and the second aspect.
[0053] In a fifth aspect, an embodiment of the present application provides a storage medium, and the storage medium stores a computer program, and the computer program is executed by a processor to implement the steps of the method according to the first aspect and the second aspect.
[0054] In a sixth aspect, an embodiment of the present application provides a computer program product, including a computer program, and the computer program is executed by a processor to implement the steps of the method according to the first aspect and the second aspect.
[0055] The service management method of the cloud management and control system applied to the service management agent provided by the embodiment of the present application includes: receiving configuration information sent by a service management center, the configuration information carrying a service management policy; configuring the service management policy carried by the configuration information; after determining that the service management policy carried by the configuration information is successfully configured, sending first confirmation information to the service management center; wherein the service management agent is associated with a management and control service in an application and is configured to execute a service management function; and the service management center is configured to store a service management policy of the cloud management and control system. In this way, the embodiment of the present application sinks the service management function to the service management agent by using the service management component of the cloud management and control system and the consistency protocol of the service management policy, and separates the business function and the service management function of the cloud management and control system from each other, so that the service management capability of the heterogeneous cloud management and control system is no longer limited to the inside of each technical stack ecology, the service management function of the cloud management and control system is uniformly managed, and the development efficiency of the cloud management and control system is improved. BRIEF DESCRIPTION OF DRAWINGS
[0056] Figure 1 FIG. 1 is a schematic diagram of an architecture of a cloud Redis management and control system in the related art;
[0057] Figure 2 FIG. 1 is a schematic diagram of an architecture of a cloud Redis management and control system in the related art;
[0058] Figure 3 FIG. 1 is a schematic diagram of an architecture of a cloud Redis management and control system in the related art;
[0059] Figure 4 FIG. 1 is a schematic diagram of an architecture of a cloud Redis management and control system in the related art; FIG. 1 is a schematic diagram of an architecture of a cloud Redis management and control system in the related art;
[0060] Figure 5 FIG. 1 is a flowchart of a service management method of a cloud management and control system according to an embodiment of the present application;
[0061] Figure 6 FIG. 2 is a flowchart of a service management method of a cloud management and control system according to another embodiment of the present application;
[0062] Figure 7 FIG. 3 is a schematic diagram of filtering an access request according to an embodiment of the present application;
[0063] Figure 8 FIG. 4 is a structural diagram of a network device according to an embodiment of the present application. DETAILED DESCRIPTION
[0064] The present application will be further described 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 commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used in the description herein is for describing particular embodiments only and is not intended to be limiting of the present application.
[0066] Before describing the service management method of the cloud management and control system provided by the embodiments of the present application, the service management component of the cloud management and control system for executing the service management method is first described.
[0067] The embodiments of the present application provide a service management component of a cloud management and control system, which comprises a service management center and at least one service management proxy, the service management proxy is deployed in an application of the cloud management and control system and is associated with a management and control service in the application, and is used for executing a service management function; the service management center is used for storing a service management policy of the cloud management and control system.
[0068] Here, the cloud management and control system is a cloud service based on a distributed application architecture deployment and unified management, which is used for managing and monitoring service instances in a cloud environment. The cloud management and control system can provide service discovery, load balancing, traffic management, security control, link monitoring and service management, etc.
[0069] It should be noted that in the related art, the cloud management and control system is usually a heterogeneous distributed application, that is, each application of the cloud management and control system is developed based on an independent technology stack. For example, the cloud management and control system developed based on a Redis database is as follows: Figure 1As shown, the cloud Redis management and control system generally includes a Console service, a ConfigAPI service, a DTS service, and a Crontab service, and 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 ConfigAPI service, the DTS service, and the 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 management and control system, the service governance functions of each application also need to be considered. The corresponding service governance components and / or software development kits (Software Development, SDK) are introduced into the business code of each application to implement the service governance function. For a heterogeneous cloud management and control system, due to the differences in the technology stacks of developing each application, the service governance functions of each application cannot be developed collaboratively. Taking the cloud Redis management and control system as an example, the service governance function of the Console service is implemented by configuring the official service governance dependency package of the Java ecosystem; the service governance functions of the ConfigAPI service, the DTS service, and the Crontab service rely on frameworks such as Go-micro and Go-zero, and are implemented by configuring service governance components. Obviously, since the service governance functions of each application of the heterogeneous cloud management and control system are limited within each technology stack ecosystem, and the service governance components developed based on different languages cannot be shared, there is a problem of repeated development in the actual development process of the service governance function and the development difficulty of the application is increased; 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.
[0071] It should be noted that in the embodiments of the present application, the service governance function of the cloud management and control system is not implemented based on the management and control service, but based on the newly introduced service governance component. Specifically, a service governance agent runs in each application of the cloud management and control system of the present application embodiment, the service governance agent is associated with the management and control service in the application, and is responsible for monitoring the import and export traffic of the associated management and control service; the service governance management center is used to store the service governance policies required by each service governance agent for the associated management and control service, based on the interaction between the service governance management center and the service governance agent, so that the service governance agent can obtain and configure the corresponding service governance policy when it starts, and can also perceive and update in time when the service governance policy is updated. Taking the cloud Redis system as an example, after introducing the service governance component of the present application embodiment, the cloud Redis system architecture is as shown in Figure 2 .
[0072] It can be understood that the service management function is realized by sinking the interaction between the management services to the interaction between the service management agents in the embodiments of the present application, so that the service management capability of the heterogeneous cloud management system is no longer limited to the internal of each technology stack ecology. Based on the interaction between the service management center and the service management agent, the service management function of the cloud management system is uniformly managed. The business function and the service management function of the cloud management system are mutually stripped, the operation and maintenance personnel only need to focus on the service management agent architecture layer, and do not need to focus on each application of the cloud management system. The application developers do not need to focus on the service management framework of each technology stack, and only need to focus on the application business development, thereby improving the development efficiency and operation and maintenance efficiency of the cloud management system.
[0073] It can be understood that the service management component of the present application does not need to set a registration center because the cloud platform has a service discovery capability.
[0074] It should be noted that the service management component of the present application is not only applicable to the cloud management system developed based on Redis, but also applicable to the heterogeneous cloud management system developed based on other databases, which can solve the problem that the service management function is limited by the difference between technology stacks and cannot be developed cooperatively. The service management component of the present application is also applicable to the non-heterogeneous cloud management system to perform the service management function.
[0075] Based on the above service management component, the embodiments of the present application further provide a service management method of a cloud management system, which is applied to a service management agent and a service management center. As shown in Figure 3 the service management method applied to the service management agent includes:
[0076] Step 301, receiving the configuration information sent by the service management center, and the configuration information carries the service management policy.
[0077] Step 302, configuring the service management policy carried by the configuration information.
[0078] Step 303, after determining that the service management policy carried by the configuration information is successfully configured, sending the first confirmation information to the service management center.
[0079] Here, the embodiments of the present application provide an interaction process between the service management agent and the service management center. Full-duplex communication is established between the service management agent and the service management center to realize the configuration and update of the service management policy of the service management agent. After receiving the configuration information sent by the service management center, the service management agent configures the received service management policy, and after determining that the received service management policy is successfully configured, the service management agent sends the first confirmation information to indicate that the service management policy synchronization is successful.
[0080] Here, the service governance agent determines that the required configured service governance policies are all configured successfully, and performs a service governance function based on the configured service governance policies. Among them, the service governance policy includes a filtering policy (Filter) and a routing policy (Router), and when the service governance agent receives an access request sent by a requestor, the access request is filtered based on the configured Filter, and the access request is routed to a target service replica based on the configured Router.
[0081] It should be noted that in the embodiments of the present application, the service governance management center generates and sends configuration information to the corresponding service governance agent based on a preset rule, and the preset rule includes at least one of the following: in response to the information sent by the service governance agent and determining the service governance policy update.
[0082] Exemplarily, the method further includes: when the service governance agent is started, sending first request information to the service governance management center, the first request information being used to request to obtain all service governance policies required to be configured by the service governance agent. Among them, the first request information carries the service identifier of the associated managed service; the service governance management center sends configuration information to the corresponding service governance agent based on the first request information.
[0083] It can be understood that after the service governance agent is started, since the service governance policy is not configured, at this time the service governance agent initiates service governance policy synchronization, and sends the first request information to request to obtain all the configured service governance policies; the preset rule of the service governance management center can include receiving the first request information sent by the service governance agent, and after receiving the first request information, the service governance management center determines all service governance policies required to be configured by the corresponding service governance agent from the stored service governance policies, and sends the configuration information carrying all service governance policies required to be configured to the corresponding service governance agent.
[0084] It can be understood that since the service governance management center can communicate with multiple service governance agents, the information sent by the service governance agent carries the service identifier of the associated managed service, and the service governance management center can determine the interactive service governance agent based on the service identifier of the managed service.
[0085] Here, the service governance management center can determine the type of information based on a specific field 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 currently does not configure the service governance policy, and the service governance management center can determine that the received information is the first request information based on the version number of the received information being empty, and configure an 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, the service governance management center sends 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 the received service governance policy is successfully configured, the service governance agent sends 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 policy carried by the configuration information is not successfully configured, deleting the corresponding original service governance policy based on the service governance policy that fails to be configured; and sending second confirmation information to the service governance management center. The second confirmation information carries the service identifier of the associated managed service and the service governance policy that fails to be configured.
[0088] It should be noted that after the service governance agent receives the configuration information, all service governance policies carried by the configuration information can not be successfully configured. For the case of service governance policy configuration failure, the present embodiment also provides a configuration compensation mechanism. Specifically, if it is determined that the service governance policy is not successfully configured, the service governance agent erases the local cache of the original service governance policy corresponding to the service governance policy that fails to be configured before sending the second request information for requesting the service governance policy that fails to be configured, so as to prevent the service governance agent from executing the service governance function based on the inconsistent service governance policy in the local cache when receiving the access request sent by the requestor at this time.
[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 is not successfully configured, since the service governance agent does not cache the corresponding original service governance policy at this time, the service governance agent does not perform the service governance policy deletion step.
[0090] Exemplarily, the method further comprises: after sending the second confirmation information, listening to the message queue; receiving a first message sent by the service governance management center in the message queue, the first message carrying the service governance policy; and 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 comprises: 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 can communicate with multiple service governance agents, and the data packet of the service governance policy required to be configured by the service governance agent can be large, in order to avoid resource congestion caused by frequent sending and receiving of the service governance policy, in the embodiments of the present application, the service governance management center re-sends the service governance policy with configuration failure to the service governance agent through a lazy loading configuration compensation mechanism. Specifically, the service governance management center pushes the service governance policy with configuration failure in the form of a message into a message queue based on the service identifier of the associated managed service and the service governance policy with configuration failure carried by the second confirmation information, the service governance agent listens to the message queue after sending the second confirmation information, waits for the corresponding first message, and reconfigures the service governance policy with configuration failure locally.
[0093] It can be understood that, the lazy loading-based delayed updating manner re-pushing the service governance policy with configuration failure can reduce resource consumption caused by interaction between the service governance agent and the service governance management center.
[0094] Here, the service governance agent returns the message queue success after determining that the service governance policy carried by the first message is all configured successfully.
[0095] Exemplarily, the method further comprises: during the period of listening to the message queue, if an access request sent by a requestor is received, sending second request information to the service governance management center, the second request information carrying the service identifier of the associated managed service and the service governance policy with configuration failure. Wherein the service governance management center sends configuration information to the corresponding service governance agent based on the second request information.
[0096] It should be noted that, based on the lazy loading mode, the service management policy that fails to be pushed again, the service management agent may receive an access request during listening to the message queue. Since the service management policy required by the service management agent is not all successfully configured at this time, the service management function cannot be normally executed. In view of the above situation, the embodiment of the present application adopts the lazy loading mode, and only when the service management agent needs to process the access request, the second request information is sent to the service management center. The preset rule of the service management center can include receiving the second request information sent by the service management agent. After receiving the second request information, the service management center determines the service management policy that fails to be configured based on the second request information, and directly pushes the service management policy that fails to be configured to the corresponding service management agent in the form of configuration information.
[0097] It should be noted that, when the service management agent receives an access request during listening to the queue, the access request is not immediately processed, but the service management policy that fails to be configured is all successfully configured based on the first message or the configuration information before the access request is processed.
[0098] It can be understood that, in the case of service management policy configuration failure, the embodiment of the present application adopts the lazy loading + lazy loading mode to re-push the service management policy that fails to be configured, so as to reduce resource consumption. During the period when the service management agent waits to receive the service management policy, if there is no demand for processing the access request, the service management agent queues and waits to obtain the service management policy that needs to be reconfigured from the message queue; if there is a demand for processing the access request, the service management agent sends the second request information to the service management center, and directly obtains the service management policy that needs to be reconfigured through the configuration information in response to the second request information.
[0099] It should be noted that, after the service management agent sends the second request information, there is a case that the first message and the configuration information carry the same service management policy. In some embodiments, when the service management agent receives the first message, if it is determined that all the service management policies carried by the first message are not configured, the service management agent configures the service management policies carried by the first message, and processes the access request after all the service management policies are successfully configured. After the service management agent receives the configuration information in response to the second request information, it is determined that all the service management policies carried by the configuration information have been successfully configured, and the first confirmation information is directly sent to the service management center without reconfiguration. When the service management agent receives the configuration information in response to the second request information, if it is determined that all the service management policies carried by the configuration information are not configured, the service management agent configures the service management policies carried by the configuration information, and processes the access request after all the service management policies are successfully configured. After the service management agent receives the first message, it is determined that all the service management policies carried by the first message have been successfully configured, and the first message is directly consumed without reconfiguration.
[0100] Exemplarily, based on the service governance method applied to the service governance agent as described above, the service governance method applied to the service governance management center comprises: Figure 4 As shown in the following, the service governance method applied to the service governance management center comprises:
[0101] In step 401, based on preset rules, the service governance strategy required to be configured by the service governance agent is determined.
[0102] In step 402, based on the service governance strategy required to be configured, the configuration information is generated.
[0103] In step 403, the configuration information is sent to the corresponding service governance agent.
[0104] Here, the preset rules include at least one of the following: responding to the information sent by the service governance agent and determining the service governance strategy update.
[0105] It can be understood that the embodiments of the present application uniformly coordinate and manage the service governance function of the cloud management and control system through the service governance management center, and push the service governance strategy to the corresponding service governance agent.
[0106] Specifically, based on the preset rules, the service governance strategy required to be configured by the service governance agent comprises: receiving the first request information sent by the service governance agent, determining the service governance strategy required to be configured by the service governance agent, the first request information carrying the service identifier of the associated management and control service, used to request to obtain all the service governance strategies required to be configured by the service governance agent; and / or, receiving the second request information sent by the service governance agent, determining the service governance strategy required to be configured by the service governance agent, the second request information carrying the service identifier of the associated management and control service and the service governance strategy of the configuration failure, used to request to reacquire the service governance strategy of the configuration failure; and / or, determining the storage service governance strategy update, determining the service governance strategy required to be configured by the service governance agent.
[0107] It can be understood that after the service governance management center receives the first request information, based on the service identifier carried by the first request information, the corresponding service governance agent required to be configured all the service governance strategies is determined from the stored service governance strategies, and the configuration information carrying all the service governance strategies required to be configured is sent to the corresponding service governance agent; after the service governance management center receives the second request information, based on the service identifier and the service governance strategy of the configuration failure carried by the second request information, the configuration information carrying the service governance strategy of the configuration failure is sent to the corresponding service governance agent; after the service governance management center determines the storage service governance strategy update, the service governance agent corresponding to the updated service governance strategy is determined, and the configuration information carrying the updated service governance strategy is sent to the corresponding service governance agent.
[0108] Here, the configuration information carries a service identifier of the managed 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 can communicate with multiple service governance agents simultaneously, and the configuration information can carry multiple service identifiers. The service governance agent determines whether to receive based on whether the configuration information carries a service identifier of the managed service associated with the service governance agent.
[0110] In this case, if the information sent by the service governance agent carries a service version number, the configuration information also carries a service version number. Specifically, after the service governance management center receives the first request information, it 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 by the information. After the service governance management center receives the first confirmation information, it determines that this service governance policy synchronization 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] By way of example, the method further includes: after sending the configuration information, receiving second confirmation information sent by the service governance agent, the second confirmation information carrying a service identifier of the managed service associated and a service governance policy that fails to be configured, indicating that the configuration information carries a service governance policy that is not all configured successfully; generating a first message based on the service identifier of the managed service associated and the service governance policy that fails to be configured; and sending the first message to the message queue.
[0112] Here, based on receiving the second confirmation information, the service governance management center determines that there is a case where the service governance agent fails to configure the service governance policy, and the service identifier and the service governance policy that fails to be configured carried by the second confirmation information, the service governance management center pushes the service governance policy that needs to be reconfigured through the message queue.
[0113] Here, the message queue sets a retransmission mechanism to retransmit the first message carrying a service governance policy that is not all configured successfully.
[0114] The service governance method of the cloud management and control system of the present application will be described in detail below in conjunction with a specific application example.
[0115] In one application example of the present application, the service governance method of the cloud management and control system is as shown in Figure 5 The service governance method of the cloud management and control system is as shown in
[0116] Step 501: The service governance agent sends first request information to the service governance management center.
[0117] Here, step 501 is executed when the service governance agent starts.
[0118] Here, the field protocol of the first request information is shown in Table 1.
[0119] Table 1
[0120] Attribute Name Type Description SerivceVersion 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 the random key of the first request information are empty.
[0122] Here, the service name is the service identifier of the management 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 configuration 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 strategy carried by the configuration information.
[0130] Here, the service governance agent determines all the Filters and / or Routers requested in the configuration information based on the service name carried by the configuration information associated with the management service.
[0131] Step 504, the service governance agent sends the first confirmation information to the service governance management center after determining that the service governance strategy is successfully configured.
[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 the key carried by the first confirmation information are consistent with the service version number and the key carried by the configuration information sent by the service governance management center in step 502.
[0133] Here, steps 501 to 504 are executed in the scenario where the service governance agent is started.
[0134] Step 505, the service governance management center determines that the filter policy Filter is updated.
[0135] Step 506, the service governance management center sends the 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 service associated with the target service governance agent.
[0138] Step 507, the service governance agent configures the filtering policy Filter carried by the configuration information.
[0139] Step 508, the service governance agent sends the first confirmation information to the service governance management center after determining that the updated filtering policy Filter is successfully configured.
[0140] Here, the configuration information and the first confirmation information in steps 506 and 508 carry the same key.
[0141] Here, steps 505 to 508 are executed 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 the 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 service associated with the target service governance agent.
[0146] Step 511, the service governance agent configures the routing policy Router carried by the configuration information.
[0147] Step 512, the service governance agent sends the second confirmation information to the service governance management center after determining that the updated routing policy Router is not successfully configured.
[0148] Here, the field protocol of the second confirmation information is shown in Table 3.
[0149] Table 3
[0150] Attribute Name Type Description SerivceVersion string Service version number ServiceNames []string Service name Type string Failure type Nonce string Random key Detail string Failure reason
[0151] Here, the service governance management center receives the service second confirmation information, generates a first message based on the failed configuration route strategy Router and the service name, and pushes the first message to the message queue.
[0152] Here, steps 509 to 512 are executed in the scenario where the route strategy Router is updated.
[0153] Exemplarily, after the service governance agent determines that all the required configured service governance strategies are successfully configured, the service governance agent executes the service governance function based on the configured service governance strategies. Specifically, as shown in Figure 6 The service governance method applied to the service governance agent further includes:
[0154] Step 601, receiving an access request sent by a requestor.
[0155] Step 602, after determining that all the required configured service governance strategies are successfully configured, filtering the access request based on the configured service governance strategies.
[0156] Step 603, after the access request is filtered, determining a target service replica based on the health degrees of the service replicas of the associated management and control service.
[0157] Step 604, sending the access request to the target service replica.
[0158] It should be noted that if the service governance agent receives an access request during the listening of the message queue, since the service governance strategies required by the service governance agent are not all successfully configured at this time, the service governance agent will not immediately process the access request, but will process the access request after determining that all the required configured service governance strategies are successfully configured.
[0159] Specifically, filtering the access request based on the configured service governance strategies includes filtering the access request based on the configured filtering strategy Filter.
[0160] It should be noted that the service governance agent of the embodiment of the present application is built-in with a filtering strategy chain Filter Chain, which can at least include a basic filtering strategy BaseFilter set during initialization. Each time the service governance agent obtains a filtering strategy Filter based on the configuration information, the obtained filtering strategy Filter is added to the filtering strategy chain Filter Chain. The filtering strategy Filter can further include an IP filtering strategy IP-Filter, an authentication filtering strategy Authencation-Filter, and a hystrix filtering strategy Hystrix-Filter. As shown in Figure 7As shown, the service management agent filters the access request in turn based on each filter policy Filter in the filter policy chain Filter Chain. After the access request is filtered by the filter policy chain Filter Chain, the access request is sent to the target service replica based on the routing policy Router.
[0161] It should be noted that although the service management component introduced in the cloud management and control system in the embodiments of the present application can achieve unified management of the service management function, the service management component will also cause additional resource consumption. In related technologies, after the cloud management and control system receives an access request, the forwarding mechanism of the service replica usually relies on a polling strategy to randomly forward the access request to any accessible service replica; in order to compensate for the resource consumption caused by the service management component, the embodiments of the present application also provide a health degree evaluation method of a service replica, which determines a target service replica based on the health degree of each service replica to reduce resource consumption caused by forwarding the access request.
[0162] Exemplarily, the method further includes: obtaining current index data of each service replica of the associated management and control service; and calculating the health degree of each service replica based on the index data; wherein the index 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 embodiments of the present application, the service management agent, as the request entrance of the associated management and control service, can directly monitor the index data such as load data, request latency data, and network path data of each replica of the associated management and control service; the service management agent caches the obtained index data and calculates the health degree of each service replica through a preset health degree evaluation model. After the access request is filtered by the filter policy chain Filter Chain of the service management agent, the service management agent determines the service replica with a better current health degree evaluation result as the target service replica, and sends the access request to the target service replica.
[0164] In some embodiments, the preset health degree evaluation model of the service management agent is specifically as shown below:
[0165]
[0166] wherein Factor is the health degree evaluation result, Load is the load factor, ResT is the request latency factor, is the network path loss factor, and a, b, and g are the weights corresponding to each factor.
[0167] Here, the load data at least includes CPU utilization, memory utilization, network utilization, current connection utilization, and processing capacity factor index. The load factor of the service replica is calculated based on the model as shown below:
[0168]
[0169] Wherein, C is CPU utilization, R is memory utilization, N is network utilization, P is current connection utilization, Ability is processing capacity factor index, and weights c, r, n, p and b are pre-configured based on the type of management and control service.
[0170] It can be understood that the service management agent can calculate the load factor of each service replica based on the load data of each service replica in the cache.
[0171] Here, the request delay data at least includes: request average response time, error rate and 95% request response time. Wherein, the request delay factor of the service replica is calculated based on the model as follows:
[0172] ResT=x*A(t)+e*E*100+z*P(t)
[0173] Wherein, t is the overall time of access request, A(t) is the request average response time, E is the error rate, and P(t) is the 95% request response time.
[0174] It can be understood that the service management agent can calculate the request delay factor of each service replica based on the request delay data of each service replica in the cache.
[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 AZ and cross regions Region, and the routing path is filtered by the number of hops of the routing path when determining the routing path. Wherein, the network path loss factor In the formula, i is the number of hops of the routing path, the network loss caused by each hop is calculated by the function C(i), and 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 degree evaluation result Factor of the service replica, the higher the health degree of the service replica, and the service management agent preferentially sends the access request to the service replica with the highest current health degree.
[0177] It should be noted that after the service management agent forwards the access request to the target service replica each time, the health degree of each service replica of the associated management and control service is recalculated based on the data returned by the target service replica.
[0178] In order to implement the method of the embodiments of the present application, the embodiments of the present application also provide a network device. Figure 8 Only the exemplary structure of the network device is shown, not all structures, and the network device can be implemented Figure 8The illustrated partial or entire structure.
[0179] As Figure 8 shown, the network device 800 provided by the embodiments 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 by a bus system 805. It can be understood that the bus system 805 is used to realize the connection communication between the components. The bus system 805 includes, in addition to the data bus, a power bus, a control bus and a status signal bus. However, for the purpose of clear illustration, all the buses are marked as the bus system 805 in the Figure 8 .
[0180] The user interface 803 can include a display, a keyboard, a mouse, a trackball, a click wheel, a key, a button, a touchpad or a touch screen, etc.
[0181] The memory 802 in the embodiments of the present application is used to store various types of data to support the operation of the network device 800. Examples of the data include any computer programs used for operation on the network device 800.
[0182] The service management method of the cloud management and control system disclosed by the embodiments of the present application can be applied in the processor 801 or implemented by the processor 801. The processor 801 can be an integrated circuit chip with a signal processing capability. In the implementation process, the steps of the service management method of the cloud management and control system can be completed by the integrated logic circuits or the instructions in the software form of the hardware in the processor 801. The processor 801 mentioned above can be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The processor 801 can realize or execute the methods, steps and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor can be a microprocessor or any conventional processor, etc. In combination with the steps of the methods disclosed in the embodiments of the present application, the execution can be directly embodied as a hardware coding processor, or a combination of hardware and software modules in the coding processor. The software module can be located in the storage medium, and the storage medium is located in the memory 802. The processor 801 reads the information in the memory 802, and combines the hardware to complete the steps of the service management method of the cloud management and control system provided by the embodiments of the present application.
[0183] In exemplary embodiments, the network device 800 can 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 (Microprocessors), or other electronic elements for executing the service management method of the cloud management and control system described above.
[0184] It can be appreciated that the memory 802 can be a volatile memory or a nonvolatile memory, and can also include both volatile and nonvolatile memory. Among them, the nonvolatile 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 ferromagnetic random access memory (FRAM), a Flash Memory, a magnetic surface memory, an optical disc, 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) used as an external cache. By way of example and not limitation, many forms of RAM can be used, 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 (DDR SDRAM), Enhanced Synchronous Dynamic Random Access Memory (ESDRAM), Sync Link Dynamic Random Access Memory (SLDRAM), and Direct Rambus Random Access Memory (DRRAM).The memory described in the embodiments of the present application is intended to include, but not limited to, these and any other suitable types of memory.
[0185] In the example embodiments, the embodiments of the present application also provide a storage medium, specifically a computer readable storage medium, for example, a memory 802 storing a computer program executable by the processor 801 of the network device 800 to complete the steps of the service management method of the cloud management and control system of the embodiments of the present application. The computer readable storage medium can be a ROM, a PROM, an EPROM, an EEPROM, a Flash Memory, a magnetic surface memory, an optical disc, or a CD-ROM memory, etc.
[0186] In the example embodiments, the embodiments of the present application also provide a computer program product including a computer program executable by the processor 801 of the network device 800 to complete the steps of the service management method of the cloud management and control system of the embodiments of the present application.
[0187] It should be noted that "first", "second", etc. are used to distinguish similar objects, and do not necessarily 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 can easily think of changes or replacements within the technical range disclosed in the present application, which should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. A service governance method for a cloud management and control system, characterized in that, The method, applied to a service governance proxy deployed within the cloud management system, includes: When the service governance agent starts, it sends a first request message to the service governance management center. The first request message is used to request all the service governance policies that the service governance agent needs to configure. Receive configuration information sent by the service governance management center, the configuration information carrying service governance policies; Configure the service governance policy carried by the configuration information; After confirming that all service governance policies carried in the configuration information have been successfully configured, a first confirmation message is sent to the service governance management center. The service governance proxy 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 policies of the cloud management and control system and send the configuration information to the corresponding service governance proxy based on the first request information. The method further includes: If it is determined that not all service governance policies carried by the configuration information have been configured successfully, the corresponding original service governance policies are deleted based on the failed configuration service governance policies. Send 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 for which configuration failed.
2. The method according to claim 1, characterized in that, The method further includes: After sending the second confirmation message, listen to the message queue; Receive the first message sent by the service governance management center in the message queue, the first message carrying the service governance policy; The service governance management center sends the first message to the message queue based on the second confirmation information.
3. The method according to claim 2, characterized in that, The method further includes: During the period of listening to the message queue, if an access request is received from the requester, 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 that failed to be configured. The service governance management center sends the configuration information to the corresponding service governance agent based on the second request information.
4. The method according to claim 2, characterized in that, The method further includes: Upon receiving the first message, configure the service governance policy carried in the first message.
5. The method according to any one of claims 1 to 4, characterized in that, The method further includes: Obtain the current metric data for each service copy of the associated management and control service; Based on the aforementioned indicator data, the health status of each service replica is calculated; The indicator data includes at least one of the following: load data, request latency data, and network path data.
6. The method according to claim 5, characterized in that, The method further includes: Receive access requests sent by the requesting party; After confirming that all required service governance policies are configured successfully, the access requests are filtered based on the configured service governance policies. After the access request passes through the filter, the target service replica is determined based on the health status of each service replica of the associated management service. Send the access request to the target service copy.
7. 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 policies that the service governance proxy needs to be configured; Based on the required service governance strategy, generate configuration information; Send the configuration information to the corresponding service governance agent; The service governance agent is associated with the management service in the application of the cloud management system and is used to perform service governance functions; the service governance management center is used to store the service governance policies of the distributed cloud management system. The process of determining the service governance strategy that the service governance proxy needs to be configured based on preset rules includes: Receive a first request message sent by the service governance agent, determine the service governance policies that the service governance agent needs to configure, wherein the first request message carries the service identifier of the associated management service and is used to request to obtain all the service governance policies that the service governance agent needs to configure; The method further includes: after sending the configuration information, receiving a second confirmation message sent by the service governance agent, wherein the second confirmation message carries the service identifier of the associated management service and the service governance policy that failed to be configured, indicating that the service governance policy carried in the configuration information was not fully configured successfully; Based on the service identifier of the associated management service and the service governance policy for configuration failure, a first message is generated; Send the first message to the message queue.
8. The method according to claim 7, characterized in that, The process of determining the service governance strategy that the service governance proxy needs to be configured based on preset rules also includes: Receive a second request message sent by the service governance agent, determine the service governance policy that the service governance agent needs to configure, wherein the second request message carries the service identifier of the associated management 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 if the service governance policy for storage needs to be updated, and determine the service governance policy that the service governance agent needs to be configured with.
9. A service governance component for 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. The service governance agent is deployed in the application of the cloud management system and is associated with the management service 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 system. The service governance agent is used to perform the method according to any one of claims 1 to 6; the service governance management center is used to perform the method according to any one of claims 7 to 8.
10. A network device, characterized in that, It includes a processor and a memory for storing a computer program capable of running on the processor, wherein the processor, when running the computer program, performs the steps of the method according to any one of claims 1 to 8.
11. A storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the steps of the method according to any one of claims 1 to 8.
12. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 8.
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