A method and system for real-time management of microservice configuration

By integrating the SDK into microservice applications and employing a long-connection mechanism to achieve real-time monitoring and management of configuration items, the system instability and high coupling issues of traditional configuration management methods are resolved, thus achieving efficient and flexible configuration management.

CN117880098BActive Publication Date: 2026-01-09CHINA TELECOM CLOUD TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311690321.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-11
Publication Date
2026-01-09
Estimated Expiration
2043-12-11

AI Technical Summary

Technical Problem

Existing microservice configuration management methods affect system stability during shutdowns and restarts and when relying on configuration centers, increase the workload of developers, and are difficult to manage with high data inconsistency.

Method used

It adopts a long-connection mechanism based on the control plane, and connects to microservice applications through SDK to monitor and manage configuration items in real time. The server and client communicate directly to realize real-time updates and fine-grained management of configuration information, reduce system coupling, and reduce data inconsistency.

Benefits of technology

It enables real-time configuration management without the need for a configuration center, improving system stability and reliability, reducing maintenance costs, providing a better user experience, and ensuring the real-time nature and consistency of configuration information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117880098B_ABST
    Figure CN117880098B_ABST
Patent Text Reader

Abstract

The application provides a micro-service configuration real-time management method and system, which comprises the following steps: accessing an SDK to a micro-service application, marking configuration items to be included in management and scanning and monitoring; establishing a long connection between a client and a server; reporting configuration item monitoring information to a control plane of the server by the client, and starting a timing task heartbeat report; obtaining configuration item detailed information by the server, storing and updating the configuration item detailed information in a database, configuring multi-dimensional aggregated configuration items, and displaying the configuration items; obtaining aggregated information of application configuration in the control plane by the server, selecting configuration items to be pushed, modifying the configuration data, sending a configuration change request to the client, receiving the configuration change request by a corresponding node client, analyzing the request data, finding corresponding configuration classes, applying the changes to the application configuration items, and responding to the server with the change result. The application supports configuration aggregation, does not require code analysis, reduces the invasiveness to engineering code, and effectively ensures the consistency of accurate data pushing.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, in particular, to the technical field of cloud computing, cloud platform and micro-service; specifically, the present application relates to a method and system for real-time management of micro-service configuration. BACKGROUND

[0002] Micro-service architecture is a cloud-native architecture method, the difference between micro-service architecture and overall architecture is that micro-service architecture is composed of many smaller, loosely coupled services to form an application, which is contrary to the overall method of large, tightly coupled applications.

[0003] In the micro-service architecture, the application is usually deployed on multiple micro-service servers, and various business logic processing modules are contained in the application. These business logic processing modules often need configuration items to control their behavior, including function on-off, gray environment variable setting, and black and white list, etc. The management of these configuration items is a key process of micro-service development and operation, and is crucial to ensure the flexibility and maintainability of the micro-service system.

[0004] The current common configuration management method is to store the configuration in the configuration file or use the configuration center for centralized management, as shown in the overall architecture of Figure 1 .

[0005] However, in actual use scenarios, both of the traditional two methods have some limitations of their own:

[0006] (1) In the case of using configuration files, the application needs to be shut down, the configuration file needs to be changed, and then the application needs to be restarted to make the configuration take effect, which will seriously affect the operation of the micro-service system.

[0007] (2) In the case of using a general configuration center, the application configuration needs to be connected to the configuration center, the custom configuration needs to be listened to, and the custom configuration corresponding to the configuration center needs to be operated to trigger the refresh event of the micro-service application configuration. This requires the micro-service application to add configuration parsing and refresh logic, but the general configuration center cannot sense the result of configuration refresh, which increases the workload of the developer and the difficulty of configuration management. SUMMARY

[0008] In view of this, the purpose of the present application is to design a micro-service configuration real-time management method and system, adopt a long connection mechanism based on the control plane, allow the control plane to observe and manage the configuration items in the application in real time, without relying on the configuration center; the control plane can perceive the changes of the configuration in real time through the configuration monitoring module, and will not be subject to the availability problem of the configuration center, thereby improving the stability and reliability of the system; and through the access of the software development kit, the configuration is accessed in a low-invasive or non-invasive manner, the configuration information is reported to the server control plane, the server control plane collects and analyzes detailed application and configuration aggregation information, thereby realizing more fine-grained configuration management and real-time update, making the configuration management more flexible and efficient, greatly reducing the system coupling degree, reducing the problem of data inconsistency, reducing maintenance cost, and providing better user experience.

[0009] The present application provides a micro-service configuration real-time management method, comprising the following steps:

[0010] S1, access the software development kit (SDK) to the micro-service application, mark the configuration items that need to be included in the management by means of the SDK, compile and deploy the configuration items together with the application; when starting the application, the client in the SDK starts together, the SDK calls the configuration management client, scans the marked configuration items in the application, collects the configuration item monitoring information and records it in the memory;

[0011] S2, the client initiates a long connection application to the server, and establishes a long connection after the server confirms the application;

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

[0013] S4, after the server receives the heartbeat information reporting data, the data is parsed to obtain detailed information of the configuration item, the detailed information of the configuration item is stored in the database and updated, the multi-dimensional aggregated configuration item is configured according to the parsing result, the position, the configuration value, the application and the machine, and the aggregated configuration item is displayed;

[0014] The client establishes an HTTP long connection to communicate with the server, and reports the collected data to the control plane of the server. The server receives these data and stores them in the database for subsequent processing.

[0015] S5, the client sends a configuration push request to the server, and after the server accepts the configuration push request of the user, the aggregated configuration item information of the application configuration is obtained in the control plane of the server, the configuration items that need to be pushed are selected, the configuration data is modified, and a request for configuration change is sent to the client;

[0016] S6, after the client of the corresponding node receives the request of the configuration change, the request data is parsed, the corresponding configuration class is found according to the parsing result, the configuration class is modified, the change is applied to the application configuration item, and the change result response is returned to the server.

[0017] Further, the configuration item monitoring information of the S1 step comprises:

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

[0019] Further, the long connection establishing mode of the S2 step comprises:

[0020] Either of the following modes, that is, the client establishes a long connection with the server through the HTTP protocol to communicate, or the client establishes a long connection with the server through the gRPC protocol to communicate.

[0021] Further, the method of returning the change result response to the server in the S6 step comprises:

[0022] The attribute value of the configuration class is modified by the client through the reflection mechanism, and the modification result is returned to the control plane of the server.

[0023] Further, the method of sending the request of the configuration change to the client in the S5 step comprises:

[0024] Determine whether the type of distribution push is partial push or full push;

[0025] If it is partial push, the server selects the corresponding long connection client according to the configured application information, and sends the request of the configuration change;

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

[0027] Further, the heartbeat information of the S3 step comprises:

[0028] Machine and configuration item information.

[0029] The application also provides a micro-service configuration real-time management system, which executes the micro-service configuration real-time management method as described above, comprising:

[0030] A configuration monitoring module is used for connecting a software development kit (SDK) to a micro-service application, marking configuration items that need to be managed by means of the SDK, compiling and deploying the configuration items together with the application, starting the client in the SDK when starting the application, and calling the configuration management client in the SDK to scan the marked configuration items in the application, collect configuration item monitoring information and record in the memory.

[0031] The service client long connection module is configured to initiate a long connection application to the service end by the client, and establish a long connection after the service end confirms the application;

[0032] The heartbeat information reporting module is configured to report the configuration item monitoring information in the memory to the control plane of the service end by the client, and start a timing task to report the heartbeat information;

[0033] The aggregated configuration item module is configured to parse the data reported by the heartbeat information reporting module to obtain detailed information of the configuration item, store the detailed information of the configuration item in a database and update the database, configure a multi-dimensional aggregated configuration item according to the parsing result, and display the aggregated configuration item.

[0034] The configuration pushing module is configured to send a configuration pushing request to the service end by the client, obtain the aggregated configuration item information of the application configuration in the control plane of the service end after the service end accepts the configuration pushing request of the user, select the configuration item to be pushed, modify the configuration data, and send a request for configuration change to the client.

[0035] The configuration refreshing module is configured to parse the request data after the client of the corresponding node receives the request for configuration change, find the corresponding configuration class according to the parsing result, modify the configuration class, apply the change to the application configuration item, and return the change result to the service end.

[0036] Further, the configuration pushing module comprises:

[0037] The determination and distribution pushing type unit is configured to determine whether the distribution pushing type is partial pushing or full pushing; if it is partial pushing, the service end selects the corresponding long connection client according to the application information of the configuration, and sends a request for configuration change; if it is full pushing, the service end sends a request for configuration change to the clients of all nodes.

[0038] SDK (Software Development Kit) is a set of tools, libraries, sample code and documents used to build and develop specific software applications. SDK usually provides support for a specific platform, programming language or development framework to help developers create applications more easily.

[0039] HTTP (Hypertext Transfer Protocol) is a protocol used to transfer data on the Web. HTTP defines the communication rules between the client and the server.

[0040] 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.

[0041] Long Connection: refers to keeping the connection in an open state after a communication so that subsequent communications can reuse the same connection without the need to re-establish the connection each time.

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

[0043] The application also provides a computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the processor implements the steps of the microservice configuration real-time management method described above when executing the program.

[0044] Compared with the prior art, the application has the following beneficial effects:

[0045] The microservice configuration real-time management method of the application uses a software development kit to provide configuration access, data reporting, and configuration monitoring and modification functions, supports configuration aggregation, does not require code parsing, and reduces the invasiveness to engineering code; the control plane of the server directly communicates with the client through a long connection, the client reports the configuration state in real time, and the real-time nature of the configuration information is ensured without relying on intermediate components; the server can selectively push configuration to part of the nodes, the client pushes based on the reported machine information, and the consistency of the accurate push data is effectively ensured. BRIEF DESCRIPTION OF DRAWINGS

[0046] Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are for purposes of illustration only and are not considered a limitation of the application.

[0047] In the drawings:

[0048] Figure 1 The figure is an architecture schematic diagram of the microservice configuration real-time management system of the embodiment of the application, which comprises a configuration refreshing module;

[0049] Figure 2 The figure is an architecture schematic diagram of the microservice configuration real-time management system of the embodiment of the application, which comprises a configuration monitoring module;

[0050] Figure 3A configuration management push process schematic diagram of an embodiment of the present application is shown in the figure;

[0051] Figure 4 A method flow chart for real-time management of micro-service configuration of the present application is shown in the figure;

[0052] Figure 5 A computer device structure schematic diagram of an embodiment of the present application is shown in the figure. DETAILED DESCRIPTION

[0053] The exemplary embodiments will be described in detail herein with reference to the attached drawings. In the following description, the same numbers are used to indicate the same or similar components. The embodiments described in the following exemplary embodiments do not represent all the implementations consistent with the present disclosure. Instead, they only represent examples of systems and products consistent with some aspects of the present disclosure, as detailed in the appended claims.

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

[0055] It should be understood that although the terms first, second, third, etc. can be used in this disclosure to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, without departing from the scope of the present disclosure, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as the first information. Depending on the context, the word "if" as used herein can be interpreted as "when" or "upon determination" or "in response to determining".

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

[0057] An embodiment of the present application provides a method for real-time management of micro-service configuration, referring to Figure 4 as shown, comprising the following steps:

[0058] S1, access the software development kit (SDK) to the micro-service application, mark the configuration items that need to be included in the management by means of the SDK, compile and deploy the configuration items together with the application; when starting the application, the client in the SDK starts together, 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 the memory;

[0059] The configuration item monitoring information includes configuration item class information, attribute values, attribute names, information about the environment to which the configuration item belongs, and application information.

[0060] S2, initiating a long connection application with the server by the client, and establishing a long connection after the server confirms the application;

[0061] The method for establishing a long connection includes:

[0062] Either of the following methods: establishing a long connection with the server by the client through the HTTP protocol, or establishing a long connection with the server by the client through the gRPC protocol.

[0063] S3, reporting the configuration item monitoring information in the memory to the control plane of the server by the client, and starting a timing task to report heartbeat information;

[0064] The heartbeat information includes machine and configuration item information.

[0065] S4, after the server receives the heartbeat information reporting data, the data is parsed to obtain detailed information of the configuration item, the detailed information of the configuration item is stored in the database and updated, the multi-dimensional aggregated configuration item of the configuration position, configuration value, application program and machine is configured according to the parsing result, and the aggregated configuration item is displayed.

[0066] The client establishes an HTTP long connection with the server to communicate, and reports the collected data to the control plane of the server. The server receives these data and stores them in the database for subsequent processing.

[0067] S5, the client sends a configuration push request to the server, and after the server accepts the configuration push request of the user, the aggregated configuration item information of the application configuration is obtained in the control plane of the server, the configuration item to be pushed is selected, the configuration data is modified, and a request for configuration change is sent to the client.

[0068] The method for sending a configuration change request to the client, as shown in Figure 3 includes:

[0069] Determine whether the type of distribution push is partial push or full push;

[0070] If it is a partial push, the server selects the corresponding long connection client according to the application information of the configuration and sends a configuration change request;

[0071] If it is a full push, the server sends a configuration change request to all node clients.

[0072] S6, after the client of the corresponding node receives the request of the configuration change, the request data is parsed, the corresponding configuration class is found according to the parsing result, the configuration class is modified, the change is applied to the application configuration item, and the change result response is returned to the server.

[0073] The method of returning the change result response to the server comprises:

[0074] 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.

[0075] The embodiment of the application also provides a micro-service configuration real-time management system, which executes the micro-service configuration real-time management method as described above, as shown in Figure 1 、 2 The system comprises:

[0076] The configuration monitoring module is used for connecting the software development kit (SDK) to the micro-service application, marking the configuration items to be managed by means of the SDK, compiling and deploying the configuration items together with the application, starting the client in the SDK when starting the application, and calling the configuration management client in the SDK to scan the marked configuration items in the application, collect the configuration item monitoring information and record in the memory.

[0077] The long connection establishment module of the server client is used for initiating a long connection application to the server by the client, and establishing a long connection after the server confirms the application.

[0078] The heartbeat information reporting module is used for reporting the configuration item monitoring information in the memory to the control plane of the server by the client, and starting a timing task to report the heartbeat information.

[0079] The aggregated configuration item module is used for parsing the data to obtain detailed information of the configuration item after the server receives the heartbeat information reporting data, storing the detailed information of the configuration item in the database and updating, configuring the position, configuration value, application and machine of the aggregated configuration item according to the parsing result, and displaying the aggregated configuration item.

[0080] The configuration pushing module is used for sending a configuration pushing request to the server by the client, obtaining the aggregated configuration item information of the application in the control plane of the server after the server accepts the configuration pushing request of the user, selecting the configuration item to be pushed, modifying the configuration data, and sending a configuration change request to the client.

[0081] The configuration refreshing module is configured to parse the request data after the client of the corresponding node receives the request of the configuration change, find the corresponding configuration class according to the parsing result, modify the configuration class, apply the change to the application configuration item, and return the change result to the server.

[0082] The configuration pushing module comprises:

[0083] The distribution pushing type judging unit is configured to judge whether the distribution pushing type is partial pushing or full pushing; if the distribution pushing type is partial pushing, the server sends a request of configuration change to the corresponding long connection client according to the application information; if the distribution pushing type is full pushing, the server sends a request of configuration change to all clients of the nodes.

[0084] Embodiment 1:

[0085] 1.1 Develop a software development kit (SDK) to provide configuration access, data reporting and configuration monitoring and modification functions. In this embodiment, the configuration access function is realized in the form of annotations. The client in the development kit needs to scan the annotated configuration items to collect data when starting.

[0086] 1.2 Add corresponding annotations to the target application configuration, start the application, and the client in the SDK will start to collect configuration item class information, attribute values, attribute names, environment information and application information, and record them in the memory.

[0087] 1.3 In this embodiment, the client establishes a long connection with the server through the HTTP protocol to communicate with the server, reports the collected data to the control plane of the server, and the server receives the data and stores them in the database for subsequent processing.

[0088] 1.4 In the control plane of the server, aggregate information of the application configuration is obtained, the configuration items to be pushed are selected, and the configuration data is modified. Then the type of pushing is selected to initiate the configuration pushing.

[0089] 1.5 The client of the target application receives the configuration pushing, 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 returns the modification result to the control plane of the server.

[0090] Embodiment 2:

[0091] 2.1 Develop a software development kit (SDK) to provide configuration access, data reporting and configuration monitoring and modification functions. In this embodiment, the configuration access function is realized in the form of annotations and application initialization. The application needs to be initialized actively when starting, and the client needs to scan the annotated configuration items to collect data when starting.

[0092] 2.2 Add corresponding annotations at the target application configuration, start the application, and the client in the SDK is started, and the configuration item class information, attribute value, attribute name, and information about the environment to which the configuration item class belongs are collected and recorded in the memory.

[0093] 2.3 In this embodiment, the client establishes a long connection with the server through the gRPC protocol to communicate with the server, and reports the collected data to the control plane of the server. The server receives the data and stores the data in the database for subsequent processing.

[0094] 2.4 In the control plane of the server, the aggregated information of the application configuration is obtained, the configuration items that need to be pushed are selected, and the configuration data is modified. Then, the type of the push is selected to initiate the configuration push.

[0095] 2.5 The client of the target application receives the configuration push, parses the configuration information, and obtains the corresponding configuration class. Through the reflection mechanism, the client can modify the attribute value of the configuration class, and then returns the modification result to the control plane of the server.

[0096] The embodiment of the application also provides a computer device, Figure 5 is a structural schematic diagram of a computer device provided by the embodiment of the application; as shown in the figure Figure 5 The computer device comprises an input system 23, an output system 24, a memory 22, and a processor 21; the memory 22 is used for storing 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 provided by the above-mentioned embodiment; wherein the input system 23, the output system 24, the memory 22, and the processor 21 can be connected through a bus or other means, Figure 5 for example, through a bus connection.

[0097] The memory 22 is a readable and writable storage medium of a computing device, and can be used for storing software programs, computer executable programs, such as program instructions corresponding to the method for real-time management of microservice configuration described in the embodiment of the application; the memory 22 can 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 program required by a function; the data storage area can store data created according to the use of the device and the like; in addition, the memory 22 can include a high-speed random access memory, and can also include a non-volatile memory, for example, at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage device; in some examples, the memory 22 can further include a memory remotely arranged relative to the processor 21, and these remote memories can be connected to the device through 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 a combination thereof.

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

[0099] The processor 21 executes various function applications and data processing of the device by running software programs, instructions and modules stored in the memory 22, i.e. implements the method for real-time management of micro-service configuration as described above.

[0100] The computer device provided above can be used to execute the method for real-time management of micro-service configuration provided by the above embodiments, and has the corresponding functions and advantages.

[0101] The embodiments of the present application also provide a storage medium containing computer executable instructions, which, when executed by a computer processor, are used to execute the method for real-time management of micro-service configuration provided by the above embodiments. The storage medium is any various types of memory device or storage device, and 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, EDORAM, Rambus RAM, etc.; non-volatile memory such as flash memory, magnetic media (e.g. hard disk or optical storage); register or other similar types of memory elements, etc.; the storage medium can also include other types of memory or combinations thereof; in addition, the storage medium can be located in the first computer system in which the program is executed, or can be located in a different second computer system, which is connected to the first computer system through a network (such as the Internet); the second computer system can provide program instructions to the first computer for execution. The storage medium includes two or more storage media that can reside in different locations (e.g. in different computer systems connected through a network). The storage medium can store program instructions (e.g. specifically implemented as a computer program) executable by one or more processors.

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

[0103] So far, the technical solutions of the present application have been described in combination with the preferred embodiments shown in the drawings, but it is easy for those skilled in the art to understand that the protection scope of the present application is obviously not limited to these specific embodiments. Those skilled in the art can make equivalent changes or replacements to the related technical features without departing from the principles of the present application, and the technical solutions after the changes or replacements will all fall within the protection scope of the present application.

[0104] The above only describes the preferred embodiments of the present application and is not intended to limit the present application; the present application can have various changes and variations for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for real-time management of microservice configuration, characterized in that, The method comprises the following steps: S1, a software development kit (SDK) is connected to a micro-service application, and a configuration item to be managed is marked by the SDK, the configuration item is compiled and deployed together with the application, and when the application is started, a client in the SDK is started, the configuration management client is called by the SDK, the marked configuration item in the application is scanned and monitored, and configuration item monitoring information is collected and recorded in the memory; S2, the client initiates a long connection application to the server, and the long connection is established after the server confirms the application; S3, the client reports the configuration item monitoring information in the memory to the control plane of the server, and starts a timing task to report heartbeat information; S4, after the server receives the heartbeat information reporting data, the detailed information of the configuration item is obtained by analyzing the data, the detailed information of the configuration item is stored in the database and updated, the multi-dimensional aggregated configuration item of the configuration position, the configuration value, the application and the machine is configured according to the analysis result, and the aggregated configuration item is displayed; S5, the client sends a configuration push request to the server, the server obtains the aggregated configuration item information of the application configuration in the control plane after accepting the configuration push request of the user, 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, the request data is analyzed, the corresponding configuration class is found according to the analysis result, the configuration class is modified, the change is applied to the application configuration item, and the change result is responded to the server; The method of sending a configuration change request to the client in step S5 comprises: Determine whether the type of the distribution push is partial push or full push; If it is partial push, the server selects the corresponding long connection client according to the application information of the configuration, and sends a configuration change request; If it is full push, the server sends a configuration change request to all node clients; The method of responding to the server with the change result in step S6 comprises: 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.

2. The method for microservice configuration real-time management according to claim 1, wherein, The configuration item monitoring information in step S1 comprises: Configuration item class information, attribute value, attribute name, information of the environment to which it belongs, and application information.

3. The method for microservice configuration real-time management according to claim 1, wherein, The long connection establishment method in step S2 comprises: Either of the following methods: the client establishes a long connection with the server through the HTTP protocol, or the client establishes a long connection with the server through the gRPC protocol.

4. The method for microservice configuration real-time management according to claim 1, wherein, The heartbeat information in step S3 comprises: Machine and configuration item information.

5. A system for microservice configuration real-time management, performing the method for microservice configuration real-time management according to any one of claims 1-4, characterized in that, It comprises: A configuration monitoring module: an SDK is connected to a micro-service application, a configuration item to be managed is marked by the SDK, the configuration item is compiled and deployed together with the application, and when the application is started, a client in the SDK is started, the configuration management client is called by the SDK, the marked configuration item in the application is scanned and monitored, and configuration item monitoring information is collected and recorded in the memory; The long connection module of the client is used to initiate a long connection application to the server, and the long connection is established after the server confirms the application; The heartbeat information reporting module is used to report the configuration item monitoring information in the memory to the control plane of the server, and start a timing task to report the heartbeat information; The aggregation configuration item module is used to analyze the data to obtain detailed information of the configuration item after the server receives the heartbeat information reporting data, store the detailed information of the configuration item into a database and update it, configure a multi-dimensional aggregation configuration item according to the analysis result, and display the aggregation configuration item; The configuration pushing module is used to send a configuration pushing request to the server, obtain the aggregation configuration item information of the application configuration in the control plane of the server after the server accepts the configuration pushing request of the user, select the configuration item to be pushed, modify the configuration data, and send a request for configuration change to the client; The configuration refreshing module is used to parse the request data after the client of the corresponding node receives the request for configuration change, find the corresponding configuration class according to the analysis result, modify the configuration class, apply the change to the application configuration item, and return the change result to the server.

6. The system for real-time management of microservice configuration according to claim 5, wherein, The configuration pushing module includes: The determination module is used to determine whether the pushing type is partial pushing or full pushing; if it is partial pushing, the server selects the corresponding long connection client according to the application information of the configuration, and sends a request for configuration change; if it is full pushing, the server sends a request for configuration change to the client of all nodes.

7. A computer-readable storage medium having stored thereon a computer program, characterized in that, The program is executed by the processor to realize the steps of the micro-service configuration real-time management method of any one of claims 1-4.

8. A computer device comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, The processor executes the program to realize the steps of the micro-service configuration real-time management method of any one of claims 1-4.

Citation Information

Patent Citations

  • Methods and systems for managing configuration information

    CN111045745A