Micro-service configuration real-time management method and system, storage medium, and computer device

By adopting a real-time configuration management method based on long control plane connections in the microservice system, the downtime changes and development difficulties existing in traditional configuration management methods are solved, and more flexible and efficient configuration management is achieved, reducing system coupling and maintenance costs.

WO2025124206A1PCT designated stage expired Publication Date: 2025-06-19CHINA TELECOM CLOUD TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2024/136139
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-11
Filing Date
2024-12-02
Publication Date
2025-06-19

AI Technical Summary

Technical Problem

The existing microservice configuration management methods have the disadvantages of downtime changing configurations and the increase in workload and difficulty for developers, especially the general configuration center cannot perceive configuration refresh results.

Method used

Adopt a long connection mechanism based on the control plane, accessing microservice applications through the software development toolkit, monitoring and managing configuration items in real time, without relying on the configuration center. The control surface of the server communicates with the client through a long connection, and the client reports the configuration status in real time. The server can optionally push the fine configuration to some nodes.

Benefits of technology

Real-time management of microservice configurations is realized, the system coupling is reduced, the problem of data inconsistency is reduced, the maintenance cost is reduced, and the user experience is provided.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2024136139_19062025_PF_FP_ABST
    Figure CN2024136139_19062025_PF_FP_ABST
Patent Text Reader

Abstract

The present application provides a micro-service configuration real-time management method and system, a storage medium, and a computer device. The method comprises: enabling an SDK to access a micro-service application program, marking configuration items that need to be managed, and scanning and monitoring the configuration items; a client establishing a long connection with a service end; the client reporting configuration item monitoring information to a control plane of the service end, and starting a timing task for heartbeat reporting; the service end performing parsing to obtain the detailed information of each configuration item, storing the detailed information of the configuration item into a database and performing updating, and configuring and displaying a multi-dimensional aggregation configuration item; the service end acquiring aggregation information of an application configuration in the control plane, selecting a configuration item needing to be pushed, modifying configuration data, and sending a configuration change request to the client; and the client of a corresponding node receiving the configuration change request, parsing request data, searching for a corresponding configuration type, applying a change to an application program configuration item, and returning a change result response to the service end. The present application supports configuration aggregation, does not need code parsing, and reduces invasion to an engineering code, thereby effectively ensuring the consistency of precisely pushed data.
Need to check novelty before this filing date? Find Prior Art

Description

A method, system, storage medium and computer device for real-time management of microservice configuration

[0001] CROSS-REFERENCE TO RELATED APPLICATIONS

[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 11, 2023, with application number 202311690321.4 and invention name “A method and system for real-time management of microservice configuration”, the entire contents of which are incorporated by reference into this application. Technical Field

[0003] The present application relates to the fields of computer technology, in particular, cloud computing, cloud platforms, and microservice technologies; specifically, to a method, system, storage medium, and computer device for real-time management of microservice configurations. Background Art

[0004] Microservices architecture is a cloud-native architectural approach. The difference between microservices architecture and monolithic architecture is that microservices architecture consists of many smaller, loosely coupled services that make up an application, as opposed to the monolithic approach of large, tightly coupled applications.

[0005] In a microservices architecture, applications are typically deployed across multiple microservice servers, each containing a variety of business logic modules. These modules often require configuration items to control their behavior. These include enabling and disabling features, setting grayscale environment variables, and blacklisting and whitelisting. Managing these configuration items is a key process in microservices development and operations, crucial for ensuring the flexibility and maintainability of microservices systems.

[0006] Currently, common configuration management methods are to store configurations in configuration files or to use a configuration center for centralized management. The overall architecture is shown in Figure 1.

[0007] However, in actual usage scenarios, both of these traditional methods have some limitations:

[0008] (1) When using a configuration file, you need to shut down the application, change the configuration file, and then restart the application for the configuration to take effect, which will seriously affect the operation of the microservice system.

[0009] (2) When using a universal configuration center, it is necessary to connect the application configuration to the configuration center, monitor the custom configuration, operate the custom configuration corresponding to the configuration center, and trigger the refresh event of the configuration in the microservice application. This requires the microservice application to add configuration parsing and refresh logic. However, the universal configuration center cannot perceive the results of the configuration refresh, which increases the workload of developers and the difficulty of configuration management. Summary of the Invention

[0010] In view of this, the purpose of this application is to design a method, system, storage medium and computer equipment for real-time management of microservice configuration, which adopts a long connection mechanism based on the control plane, allowing the control plane to observe and manage configuration items within the application in real time without relying on the configuration center; the control plane can perceive configuration changes in real time through the configuration monitoring module, and will not be subject to the availability issues of the configuration center, thereby improving the stability and reliability of the system; and, through the access of the software development kit, access the configuration in a low-intrusive or non-intrusive manner, and report the configuration information to the server-side control plane. The server-side control plane collects and parses detailed application and configuration aggregation information, thereby achieving more fine-grained configuration management and real-time updates, making configuration management more flexible and efficient, greatly reducing system coupling, reducing data inconsistency problems, reducing maintenance costs, and providing a better user experience.

[0011] This application provides a method for real-time management of microservice configuration, including the following steps:

[0012] S1. Connect the software development kit (SDK) to the microservice application. Use the SDK to mark the configuration items that need to be managed. Compile and deploy the configuration items along with the application. When the application is started, the client in the SDK is also started. The SDK invokes the configuration management client, scans and monitors the marked configuration items in the application, collects the configuration item monitoring information, and records it in memory.

[0013] S2. The client initiates a persistent connection request with the server, and the server confirms the request and establishes a persistent connection;

[0014] S3. The client reports the configuration item monitoring information in the memory to the control plane of the server, and starts a scheduled task to report heartbeat information;

[0015] S4. After receiving the data reported by the heartbeat information, the server parses the data to obtain detailed information of the configuration item, stores the detailed information of the configuration item in the database and updates it, configures the multi-dimensional aggregated configuration item of location, configuration value, application and machine based on the parsed result, and displays the aggregated configuration item;

[0016] The client establishes a persistent HTTP connection to communicate with the server and reports the collected data to the server's control plane. The server receives the data and stores it in a database for subsequent processing.

[0017] S5. The client sends a configuration push request to the server. After the server accepts the configuration push request, it obtains aggregated configuration item information of the application configuration from the control plane of the server, selects the configuration item to be pushed, modifies the configuration data, and sends a configuration change request to the client.

[0018] S6. After the client of the corresponding node receives the configuration change request, it parses the request data, finds the corresponding configuration class according to the parsing result, modifies the configuration class, applies the change to the application configuration item, and returns the change result response to the server.

[0019] Optionally, the configuration item monitoring information in step S1 includes:

[0020] Configuration item class information, attribute value, attribute name, environment, and application information.

[0021] Optionally, the method of establishing a long connection in step S2 includes:

[0022] The client communicates with the server by establishing a persistent connection through the HTTP protocol, or by establishing a persistent connection through the gRPC protocol.

[0023] Optionally, the method of returning the change result response to the server in step S6 includes:

[0024] Through the reflection mechanism, the client modifies the attribute value of the configuration class and returns the modification result to the control plane of the server.

[0025] Optionally, the method of sending a configuration change request to the client in step S5 includes:

[0026] Determine whether the delivery push type is partial push or full push;

[0027] If it is a partial push, the server selects the corresponding persistent connection client based on the configured application information and sends a configuration change request;

[0028] If it is a full push, the server sends a configuration change request to the clients of all nodes.

[0029] Optionally, the heartbeat information in step S3 includes:

[0030] Machine and configuration item information.

[0031] The present application also provides a system for real-time management of microservice configurations, which executes the above-mentioned method for real-time management of microservice configurations. The system includes:

[0032] Configuration Monitoring Module: This module connects the software development kit (SDK) to the microservice application. The SDK is used to mark configuration items that need to be managed, and these configuration items are compiled and deployed along with the application. When the application is started, the client in the SDK is also started. The SDK invokes the configuration management client, scans and monitors the marked configuration items in the application, collects configuration item monitoring information, and records it in memory.

[0033] Establishing a server-client persistent connection module: used for the client to initiate a persistent connection application with the server, and establish a persistent connection after the server confirms the application;

[0034] Heartbeat information reporting module: used for the client to report the configuration item monitoring information in the memory to the control plane of the server, and start the scheduled task to report the heartbeat information;

[0035] Aggregate configuration item module: after receiving the data reported by the heartbeat information on the server side, parse the data to obtain detailed information of the configuration item, store the detailed information of the configuration item in the database and update it, configure the multi-dimensional aggregate configuration item of location, configuration value, application and machine based on the parsing result, and display the aggregate configuration item;

[0036] Configuration push module: used for the client to send a configuration push request to the server. After the server accepts the user's configuration push request, it obtains the aggregated configuration item information of the application configuration in the control plane of the server, selects the configuration items to be pushed, modifies the configuration data, and sends a configuration change request to the client;

[0037] Configuration refresh module: After the client of the corresponding node receives the configuration change request, it parses the request data, finds the corresponding configuration class based on the parsing result, modifies the configuration class, applies the change to the application configuration item, and returns the change result response to the server.

[0038] Optionally, the configuration push module includes:

[0039] Delivery push type determination unit: used to determine whether the delivery push type is partial push or full push; if it is a partial push, the server selects the corresponding persistent connection client based on the configured application information and sends a configuration change request; if it is a full push, the server sends a configuration change request to the clients of all nodes.

[0040] An SDK (Software Development Kit) is a collection of tools, libraries, sample code, and documentation for building and developing specific software applications. SDKs typically provide support for a specific platform, programming language, or development framework to help developers more easily create applications.

[0041] HTTP (Hypertext Transfer Protocol) is a protocol used to transmit data on the Web. HTTP defines the communication rules between clients and servers.

[0042] gRPC (gRPC Remote Procedure Call) is a cross-language RPC framework for communication between clients and servers. It supports persistent connections to improve communication efficiency.

[0043] Long Connection: Keep the connection open after one communication so that subsequent communications can reuse the same connection without having to re-establish the connection each time.

[0044] The present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method for real-time management of microservice configuration as described above.

[0045] The present application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the method for real-time management of microservice configuration as described above are implemented.

[0046] Compared with the prior art, the present invention has the following advantages:

[0047] The method for real-time management of microservice configuration in this application uses a software development kit to provide configuration access, data reporting, and configuration monitoring and modification functions, supports configuration aggregation, and does not require code parsing, reducing the intrusion into engineering code; the control plane of the server communicates directly with the client through a long connection, and the client reports the configuration status in real time, without relying on intermediate components to ensure the real-time nature of the configuration information; the server can optionally push fine configurations to some nodes, and the client pushes point-to-point based on the reported machine information and obtains the push results, effectively ensuring the consistency of the accurately pushed data. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Various other advantages and benefits will become apparent to those skilled in the art by reading the detailed description of the preferred embodiment below.The accompanying drawings are only for the purpose of illustrating the preferred embodiment and are not to be considered as limiting the present application.

[0049] In the attached figure:

[0050] FIG1 is a schematic diagram of the architecture of a real-time management system for microservice configuration including a configuration refresh module according to an embodiment of the present application;

[0051] FIG2 is a schematic diagram of the architecture of the real-time management system for microservice configuration including a configuration monitoring module according to an embodiment of the present application;

[0052] FIG3 is a schematic diagram of a configuration management push process according to an embodiment of the present application;

[0053] FIG4 is a flow chart of a method for real-time management of microservice configurations in this application;

[0054] FIG5 is a schematic diagram of the structure of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION

[0055] Exemplary embodiments will be described in detail herein, examples of which are illustrated in the accompanying drawings. In the following description, when referring to the drawings, like numbers in different figures represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments are not intended to represent all possible embodiments consistent with the present disclosure. Rather, they are merely examples of systems and products consistent with certain aspects of the present disclosure, as detailed in the appended claims.

[0056] The terms used in this disclosure are for the purpose of describing specific embodiments only and are not intended to limit the disclosure. As used in this disclosure and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and / or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.

[0057] It should be understood that although the terms first, second, third, etc. may be used in this disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from each other. For example, without departing from the scope of this disclosure, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining."

[0058] The embodiments of the present application are described in further detail below.

[0059] This embodiment of the present application provides a method for real-time management of microservice configurations, as shown in FIG4 , including the following steps:

[0060] S1. Connect the software development kit (SDK) to the microservice application. Use the SDK to mark the configuration items that need to be managed. Compile and deploy the configuration items along with the application. When the application is started, the client in the SDK is also started. The SDK invokes the configuration management client, scans and monitors the marked configuration items in the application, collects the configuration item monitoring information, and records it in memory.

[0061] The configuration item monitoring information includes: configuration item class information, attribute value, attribute name, environment information and application information.

[0062] S2. The client initiates a persistent connection request with the server, and the server confirms the request and establishes a persistent connection;

[0063] The method of establishing a long connection includes:

[0064] The client communicates with the server by establishing a persistent connection through the HTTP protocol, or by establishing a persistent connection through the gRPC protocol.

[0065] S3. The client reports the configuration item monitoring information in the memory to the control plane of the server, and starts a scheduled task to report heartbeat information;

[0066] The heartbeat information includes: machine and configuration item information.

[0067] S4. After receiving the data reported by the heartbeat information, the server parses the data to obtain detailed information of the configuration item, stores the detailed information of the configuration item in the database and updates it, configures the multi-dimensional aggregated configuration item of location, configuration value, application and machine based on the parsed result, and displays the aggregated configuration item;

[0068] The client establishes a persistent HTTP connection to communicate with the server and reports the collected data to the server's control plane. The server receives the data and stores it in a database for subsequent processing.

[0069] S5. The client sends a configuration push request to the server. After the server accepts the configuration push request, it obtains aggregated configuration item information of the application configuration from the control plane of the server, selects the configuration item to be pushed, modifies the configuration data, and sends a configuration change request to the client.

[0070] The method of sending a configuration change request to the client, as shown in FIG3 , includes:

[0071] Determine whether the delivery push type is partial push or full push;

[0072] If it is a partial push, the server selects the corresponding persistent connection client based on the configured application information and sends a configuration change request;

[0073] If it is a full push, the server sends a configuration change request to the clients of all nodes.

[0074] S6. After the client of the corresponding node receives the configuration change request, it parses the request data, finds the corresponding configuration class according to the parsing result, modifies the configuration class, applies the change to the application configuration item, and returns the change result response to the server.

[0075] The method of returning the change result response to the server includes:

[0076] Through the reflection mechanism, the client modifies the attribute value of the configuration class and returns the modification result to the control plane of the server.

[0077] The present application also provides a system for real-time management of microservice configurations, which implements the above-mentioned method for real-time management of microservice configurations. Referring to Figures 1 and 2, the system includes:

[0078] Configuration Monitoring Module: This module connects the software development kit (SDK) to the microservice application. The SDK is used to mark configuration items that need to be managed, and these configuration items are compiled and deployed along with the application. When the application is started, the client in the SDK is also started. The SDK invokes the configuration management client, scans and monitors the marked configuration items in the application, collects configuration item monitoring information, and records it in memory.

[0079] Establishing a server-client persistent connection module: used for the client to initiate a persistent connection application with the server, and establish a persistent connection after the server confirms the application;

[0080] Heartbeat information reporting module: used for the client to report the configuration item monitoring information in the memory to the control plane of the server, and start the scheduled task to report the heartbeat information;

[0081] Aggregate configuration item module: after receiving the data reported by the heartbeat information on the server side, parse the data to obtain detailed information of the configuration item, store the detailed information of the configuration item in the database and update it, configure the multi-dimensional aggregate configuration item of location, configuration value, application and machine based on the parsing result, and display the aggregate configuration item;

[0082] Configuration push module: used for the client to send a configuration push request to the server. After the server accepts the user's configuration push request, it obtains the aggregated configuration item information of the application configuration in the control plane of the server, selects the configuration items to be pushed, modifies the configuration data, and sends a configuration change request to the client;

[0083] Configuration refresh module: After the client of the corresponding node receives the configuration change request, it parses the request data, finds the corresponding configuration class based on the parsing result, modifies the configuration class, applies the change to the application configuration item, and returns the change result response to the server.

[0084] The configuration push module includes:

[0085] Delivery push type determination unit: used to determine whether the delivery push type is partial push or full push; if it is a partial push, the server selects the corresponding persistent connection client based on the configured application information and sends a configuration change request; if it is a full push, the server sends a configuration change request to the clients of all nodes.

[0086] Embodiment 1:

[0087] 1.1 Development Software Development Kit (SDK) provides configuration access, data reporting, and configuration monitoring and modification functions. In this embodiment, the configuration access function is implemented in the form of annotations. The client in the development toolkit needs to scan the configuration items marked with annotations to collect data when it starts.

[0088] 1.2 Add the corresponding annotation to the target application configuration, start the application, and the client in the SDK will start accordingly. The configuration item class information, attribute value, attribute name, environment information, and application information will be collected and recorded in the memory.

[0089] 1.3 In this embodiment, the client establishes a persistent connection with the server via HTTP and reports the collected data to the server's control plane. The server receives the data and stores it in a database for subsequent processing.

[0090] 1.4 On the server's control plane, obtain the aggregated information of the application configuration, select the configuration items to be pushed, and modify the configuration data. Then, select the push type to initiate the configuration push.

[0091] 1.5 The target application client receives the configuration push, parses the configuration information, and obtains the corresponding configuration class. Through the reflection mechanism, the client can modify the attribute values ​​of the configuration class and then return the modified results to the server's control plane.

[0092] Example 2:

[0093] 2.1 Development Software Development Kit (SDK) provides configuration access, data reporting, and configuration monitoring and modification functions. In this embodiment, the configuration access function is implemented through annotation and application initialization. When the application starts, it needs to actively initialize the SDK provided. When the client starts, it scans the configuration items marked with annotations to collect data.

[0094] 2.2 Add the corresponding annotation to the target application configuration, start the application, and the client in the SDK will start accordingly. The configuration item class information, attribute value, attribute name, environment and other information and application information will be collected and recorded in the memory.

[0095] 2.3 In this embodiment, the client establishes a persistent connection with the server through the gRPC protocol and reports the collected data to the server's control plane. The server receives this data and stores it in a database for subsequent processing.

[0096] 2.4 On the server's control plane, obtain the aggregated information of the application configuration, select the configuration items to be pushed, and modify the configuration data. Then, select the push type to initiate the configuration push.

[0097] 2.5 The target application client receives the configuration push, parses the configuration information, and obtains the corresponding configuration class. Through the reflection mechanism, the client can modify the attribute values ​​of the configuration class and then return the modified results to the control plane of the server.

[0098] An embodiment of the present application also provides a computer device. Figure 5 is a structural diagram of a computer device provided by an embodiment of the present application. Referring to Figure 5 of the accompanying drawings, the computer device includes: an input device 23, an output device 24, a memory 22 and a processor 21; the memory 22 is used to store one or more programs; when the one or more programs are executed by the one or more processors 21, the one or more processors 21 implement the method for real-time management of microservice configuration as provided in the above embodiment; wherein the input device 23, the output device 24, the memory 22 and the processor 21 can be connected by a bus or other means, and Figure 5 takes the connection via a bus as an example.

[0099] The memory 22 is a readable and writable storage medium of a computing device, which can be used to store software programs, computer executable programs, such as program instructions corresponding to the method for real-time management of microservice configurations described in the embodiment of the present application; the memory 22 may mainly include a program storage area and a data storage area, wherein the program storage area can store an operating system and at least one application required for a function; the data storage area can store data created according to the use of the device, etc.; in addition, the memory 22 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device; in some instances, the memory 22 may further include a memory remotely located relative to the processor 21, and these remote memories may be connected to the device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0100] The input device 23 may be used to receive input digital or character information, and generate key signal input related to user settings and function control of the device; the output device 24 may include a display device such as a display screen.

[0101] The processor 21 executes various functional applications and data processing of the device by running software programs, instructions and modules stored in the memory 22, that is, implementing the above-mentioned method for real-time management of microservice configuration.

[0102] The computer device provided above can be used to execute the method for real-time management of microservice configuration provided in the above embodiment, and has corresponding functions and beneficial effects.

[0103] The present application also provides a storage medium containing computer executable instructions, which are used to perform the method for real-time management of microservice configurations provided in the above embodiment when executed by a computer processor. The storage medium is any of various types of memory devices or storage devices, and the storage medium includes: installation media, such as CD-ROM, floppy disk or tape system; computer system memory or random access memory, such as DRAM, DDR RAM, SRAM, EDO RAM, Rambus RAM, etc.; non-volatile memory, such as flash memory, magnetic media (such as hard disk or optical storage); registers or other similar types of memory elements, etc.; the storage medium may also include other types of memory or a combination thereof; in addition, the storage medium may be located in the first computer system in which the program is executed, or may be located in a different second computer system, the second computer system being connected to the first computer system via a network (such as the Internet); the second computer system may provide program instructions to the first computer for execution. The storage medium includes two or more storage media that can reside in different locations (for example, in different computer systems connected by a network). The storage medium can store program instructions (for example, specifically implemented as a computer program) that can be executed by one or more processors.

[0104] Of course, the storage medium containing computer-executable instructions provided in the embodiment of the present application is not limited to the method for real-time management of microservice configuration as described in the above embodiment, and can also execute related operations in the method for real-time management of microservice configuration provided in any embodiment of the present application.

[0105] Thus far, the technical solutions of the present application have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is readily understood by those skilled in the art that the scope of protection of the present application is obviously not limited to these specific embodiments. Without departing from the principles of the present application, those skilled in the art may make equivalent changes or substitutions to the relevant technical features, and the technical solutions after such changes or substitutions will fall within the scope of protection of the present application.

[0106] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Persons skilled in the art will readily appreciate that various modifications and variations are possible. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.

Claims

1. A method for real-time management of microservice configuration, characterized in that: The following steps are involved: S1. Connect the software development kit SDK to the microservice application, mark the configuration items that need to be managed with the help of the SDK, and compile and deploy the configuration items together with the application; when the application is started, the client in the SDK is started, and the SDK calls up the configuration management client, scans and monitors the marked configuration items in the application, collects the configuration item monitoring information and records it in the memory; S2. The client initiates a persistent connection application with the server, and the server confirms the application and establishes a persistent connection; S3, the client reports the configuration item monitoring information in the memory to the control plane of the server, and starts a scheduled task to report the heartbeat information; S4. After receiving the data reported by the heartbeat information, the server parses the data to obtain detailed information of the configuration item, stores the detailed information of the configuration item in the database and updates it, configures the multi-dimensional aggregated configuration items of the location, configuration value, application program and machine according to the parsing result, and displays the aggregated configuration items; S5. The client sends a configuration push request to the server. After the server accepts the configuration push request from the user, it obtains the aggregated configuration item information of the application configuration in the control plane of the server, selects the configuration item to be pushed, modifies the configuration data, and sends a configuration change request to the client. S6. After the client of the corresponding node receives the configuration change request, it parses the request data, finds the corresponding configuration class according to the parsing result, modifies the configuration class, applies the change to the application configuration item, and returns the change result response to the server.

2. The method for real-time management of microservice configuration according to claim 1, characterized in that: The configuration item monitoring information of step S1 includes: Configuration item class information, attribute value, attribute name, environment information, and application information.

3. The method for real-time management of microservice configuration according to claim 1, characterized in that: The method of establishing a long connection in step S2 includes: The client communicates with the server by establishing a persistent connection through the HTTP protocol, or the client communicates with the server by establishing a persistent connection through the gRPC protocol.

4. The method for real-time management of microservice configuration according to claim 1, characterized in that: The method of returning the change result response to the server in step S6 includes: Through the reflection mechanism, the client modifies the attribute value of the configuration class and returns the modification result to the control plane of the server.

5. The method for real-time management of microservice configuration according to claim 1, characterized in that: The method of sending a configuration change request to the client in step S5 includes: Determine whether the delivery push type is partial push or full push; If it is a partial push, the server selects the corresponding persistent connection client based on the configured application information and sends a configuration change request; If it is a full push, the server sends a configuration change request to the clients of all nodes.

6. The method for real-time management of microservice configuration according to claim 1, characterized in that: The heartbeat information of step S3 includes: Machine and configuration item information.

7. A system for real-time management of microservice configuration, characterized in that: include: Configuration monitoring module: used to connect the software development kit SDK to the microservice application, mark the configuration items that need to be managed with the help of SDK, and compile and deploy the configuration items together with the application; when the application is started, the client in the SDK is started, and the SDK calls up the configuration management client, scans and monitors the marked configuration items in the application, collects the configuration item monitoring information and records it in the memory; Establishing a server-client persistent connection module: used for the client to initiate a persistent connection application with the server, and establish a persistent connection after the server confirms the application; Heartbeat information reporting module: used for the client to report the configuration item monitoring information in the memory to the control plane of the server, and start the scheduled task to report the heartbeat information; Aggregate configuration item module: used to parse the data to obtain detailed information of the configuration item after receiving the data reported by the heartbeat information on the server side, store the detailed information of the configuration item in the database and update it, configure the multi-dimensional aggregate configuration items of location, configuration value, application program and machine according to the analysis result, and display the aggregate configuration item; Configuration push module: used for the client to send a configuration push request to the server. After the server accepts the configuration push request from the user, it obtains the aggregated configuration item information of the application configuration in the control plane of the server, selects the configuration item to be pushed, modifies the configuration data, and sends a configuration change request to the client. Configuration refresh module: After the client of the corresponding node receives the request for configuration change, it parses the request data, finds the corresponding configuration class according to the parsing result, modifies the configuration class, applies the change to the application configuration item, and returns the change result response to the server.

8. The system for real-time management of microservice configuration according to claim 7, characterized in that: The configuration push module includes: Distribution push type determination unit: used to determine whether the distribution push type is partial push or full push; if it is partial push, the server selects the corresponding persistent connection client according to the configured application information and sends a configuration change request; if it is full push, the server sends a configuration change request to the clients of all nodes.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the steps of the method for real-time management of microservice configurations according to any one of claims 1 to 6 are implemented.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for real-time management of microservice configurations according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Dynamic configuration management method and system under micro-service framework

    CN112019369A

  • Multi-type micro-service registration center management system and method

    CN112311869A

  • Configuration information updating and synchronizing method and equipment

    CN112559025A

  • Configuration information updating method and device under micro-service architecture and electronic equipment

    CN112882738A

  • Method and system for managing micro-service configuration in real time

    CN117880098A