CN110932912A - Method for realizing unified management of configuration files under micro-service architecture - Google Patents
Method for realizing unified management of configuration files under micro-service architecture Download PDFInfo
- Publication number
- CN110932912A CN110932912A CN201911273731.2A CN201911273731A CN110932912A CN 110932912 A CN110932912 A CN 110932912A CN 201911273731 A CN201911273731 A CN 201911273731A CN 110932912 A CN110932912 A CN 110932912A
- Authority
- CN
- China
- Prior art keywords
- configuration
- micro
- service
- files
- configuration file
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/0803—Configuration setting
- H04L41/0813—Configuration setting characterised by the conditions triggering a change of settings
- H04L41/082—Configuration setting characterised by the conditions triggering a change of settings the condition being updates or upgrades of network functionality
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L41/00—Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
- H04L41/08—Configuration management of networks or network elements
- H04L41/085—Retrieval of network configuration; Tracking network configuration history
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/06—Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/34—Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
Abstract
The invention provides a method for realizing unified management of configuration files under a micro-service architecture, which relates to the technical field of digital information, wherein the configuration files are uploaded to a configuration center server through a portal interface, the files are loaded when a micro-service is started, the mode of loading the configuration files by the micro-service is obtained by calling REST API (representational State transfer) provided by the configuration center, the configuration files can be stored through version management tools such as git, svn and the like, a user modifies the configuration files through the portal interface, the updated configuration files are uploaded to the configuration center, and the configuration center informs a message queue that the configuration files are modified when perceiving the change of the configuration files; the message queue notifies the configuration updating message to each micro service, the micro service pulls the updated configuration file from the configuration center again after being notified, and assigns values to the variables in the system again, so that the configuration file is maintained quickly, and the configuration file is refreshed in real time.
Description
Technical Field
The invention relates to the technical field of digital information, in particular to a method for realizing unified management of configuration files under a micro-service architecture.
Background
One or more configuration files exist in the system with the single architecture, the configuration files are stored together with the application and are pushed to the server along with the application during deployment, and the application needs to be restarted after the configuration files are modified to ensure the application to be effective. This approach is common practice in systems of monolithic architecture. However, in a distributed architecture system, a single application is decomposed into a plurality of micro-services, and the micro-services are deployed in a plurality of servers or clusters. Generally, one application has dozens of or even dozens of micro services, and each micro service has a configuration file, so that each configuration file is dispersed in dozens of micro services, rapid and dynamic adjustment is difficult to achieve, the phenomena of complex maintenance, low maintenance efficiency and high error rate occur, and the significance of the configuration files is lost.
Disclosure of Invention
In order to realize the rapid maintenance of the configuration files and the real-time refreshing of the configuration files, the invention provides a method for realizing the unified management of the configuration files under a micro-service architecture, and the specific technical scheme is as follows.
A method for realizing unified management of configuration files under a micro-service architecture comprises the following steps:
a, a user uploads a configuration file to a configuration center server through a portal interface;
b, loading files when the micro service is started, wherein the mode of loading the configuration files by the micro service is obtained by calling REST API provided by a configuration center;
c, storing the configuration file;
d, modifying the configuration file through the portal interface by the user, and uploading the updated configuration file to the configuration center;
step E, the configuration center informs the message queue MQ of the change of the configuration file after sensing the change of the configuration file;
f, the message queue MQ informs each micro service of the updated configuration message;
and G, after being informed, the micro service pulls the updated configuration file from the configuration center again, and assigns values to the variables in the system again.
Preferably, each time the configuration file is changed, the micro-service is notified through the message queue, and the micro-service reloads the new configuration file.
It is also preferable that the micro-service includes a system architecture, the system architecture enables the micro-service to be deployed, operated and upgraded independently, and the system architecture also enables the micro-service and the micro-service to be loosely coupled structurally and to be represented as a unified whole functionally.
Preferably, in step B, if the configuration center is deployed in a cluster, the micro service accesses through a load balancing, and the micro service assigns the content of the configuration file to a corresponding variable after acquiring the configuration file.
It is further preferable that, in step C, the version is stored through git or svn version management tool, or directly stored in a folder of the server disk, or stored in a database.
The method has the advantages that the configuration files are maintained quickly and refreshed in real time by uniformly managing the configuration files in the micro application system, namely, the corresponding micro service can be informed when the configuration files are changed, and the aim of real-time effect without restarting is achieved.
Drawings
In order to more clearly illustrate the embodiments or technical solutions of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
FIG. 1 is a schematic diagram of an implementation method for unified management of configuration files under a micro service architecture.
Detailed Description
Referring to fig. 1, a specific embodiment of a method for implementing unified management of configuration files under a micro service architecture according to the present invention is as follows.
A method for realizing unified management of configuration files under a micro-service architecture specifically comprises the following steps:
and A, uploading the configuration file to a configuration center server by a user through a portal interface. The name of the configuration file has a specific format, a micro service name and an environment type, or the micro service name and a development type, the micro service name and a test type, the micro service name and a production type.
And B, loading files when the micro service is started, wherein the mode of loading the configuration files by the micro service is obtained by calling REST API provided by a configuration center. If the configuration center is deployed in a cluster, the micro-service access needs to pass through load balancing, and after the micro-service acquires the configuration file, the content of the configuration file is assigned to a corresponding variable.
The REST software architecture is the most successful Internet hypermedia distributed system in the world at present, the REST API can utilize Cache to improve the response speed, the stateless property of communication can enable different servers to process different requests in a series of requests, and the expansibility of the servers is improved; the browser can be used as a client, so that the requirement of software development is simplified; compared with other mechanisms on the HTTP protocol, the REST has smaller software dependency and does not need an additional resource discovery mechanism; the long term compatibility in software technology evolution is better.
And C, storing the configuration file. Specifically, the storage is performed through a git version management tool or a svn version management tool, or the storage is directly stored in a folder of a server disk, or the storage is stored in a database.
And D, modifying the configuration file through the portal interface by the user, and uploading the updated configuration file to the configuration center.
And E, the configuration center informs the message queue MQ of the change of the configuration file after sensing the change of the configuration file.
And F, notifying the configuration updated message to each microservice by the message queue MQ. The micro-service comprises a system architecture, the system architecture enables the micro-service to be independently deployed, operated and upgraded, and the system architecture also enables the micro-service and the micro-service to be loosely coupled in structure and to be functionally represented as a unified whole.
And G, after being informed, the micro service pulls the updated configuration file from the configuration center again, and assigns values to the variables in the system again.
Each configuration file change in the future is notified to each micro service through the message queue, and the micro service reloads a new configuration file.
A distributed architecture refers to an application program distributed on different computers and performing a task together through a network, and is usually in a server/client mode. Distribution is understood in a broader sense, and includes not only application programs but also databases and the like, which are distributed on different computers to accomplish the same task.
The single application configuration files are all stored in the system, are pushed to the same server along with the application during deployment, and are not suitable for system application under a micro-service architecture.
It is to be understood that the above description is not intended to limit the present invention, and the present invention is not limited to the above examples, and those skilled in the art may make modifications, alterations, additions or substitutions within the spirit and scope of the present invention.
Claims (5)
1. A method for realizing unified management of configuration files under a micro service architecture is characterized by comprising the following steps:
a, a user uploads a configuration file to a configuration center server through a portal interface;
b, loading files when the micro service is started, wherein the mode of loading the configuration files by the micro service is obtained by calling REST API provided by a configuration center;
c, storing the configuration file;
d, modifying the configuration file through the portal interface by the user, and uploading the updated configuration file to the configuration center;
step E, the configuration center informs the message queue MQ of the change of the configuration file after sensing the change of the configuration file;
f, the message queue MQ informs each micro service of the updated configuration message;
and G, after being informed, the micro service pulls the updated configuration file from the configuration center again, and assigns values to the variables in the system again.
2. The method of claim 1, wherein each configuration file modification is notified to each microservice through a message queue, and the microservice reloads a new configuration file.
3. The method of claim 1, wherein the microservice comprises a system architecture, the system architecture enables the microservice to be deployed, operated and upgraded independently, and the system architecture also enables the microservice and the microservice to be loosely coupled structurally and functionally represented as a unified whole.
4. The method for implementing unified management of configuration files under the micro-service architecture according to any one of claims 1 to 3, wherein in the step B, if the configuration center is a cluster deployment, a load balancing is required during micro-service access, and after the micro-service acquires the configuration files, the micro-service assigns the contents of the configuration files to corresponding variables.
5. The method for implementing unified management of configuration files under micro service architecture according to any one of claims 1 to 3, wherein in the step C, the configuration files are stored through a git or svn version management tool, or directly stored in a folder of a server disk, or stored in a database.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911273731.2A CN110932912A (en) | 2019-12-12 | 2019-12-12 | Method for realizing unified management of configuration files under micro-service architecture |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911273731.2A CN110932912A (en) | 2019-12-12 | 2019-12-12 | Method for realizing unified management of configuration files under micro-service architecture |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110932912A true CN110932912A (en) | 2020-03-27 |
Family
ID=69859505
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911273731.2A Pending CN110932912A (en) | 2019-12-12 | 2019-12-12 | Method for realizing unified management of configuration files under micro-service architecture |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110932912A (en) |
Cited By (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111475225A (en) * | 2020-03-31 | 2020-07-31 | 招商局金融科技有限公司 | Microservice configuration method, system, apparatus and computer readable storage medium |
CN111736874A (en) * | 2020-06-28 | 2020-10-02 | 深圳前海微众银行股份有限公司 | Application updating method and device |
CN112099878A (en) * | 2020-11-19 | 2020-12-18 | 中国电力科学研究院有限公司 | Application software configuration management method, device and system |
CN112181528A (en) * | 2020-10-09 | 2021-01-05 | 大唐微电子技术有限公司 | Management method and device for configuration file of micro-service |
CN112379948A (en) * | 2020-12-02 | 2021-02-19 | 腾讯科技(深圳)有限公司 | Program configuration management method and device, storage medium and electronic equipment |
CN112612541A (en) * | 2020-12-18 | 2021-04-06 | 北京中电普华信息技术有限公司 | Method and device for managing configuration files |
CN112702195A (en) * | 2020-12-18 | 2021-04-23 | 深圳奥哲网络科技有限公司 | Gateway configuration method, electronic device and computer readable storage medium |
CN112804315A (en) * | 2020-12-31 | 2021-05-14 | 北京知因智慧科技有限公司 | Micro application integration method and device |
CN114675896A (en) * | 2020-12-24 | 2022-06-28 | 广东飞企互联科技股份有限公司 | Parameter configuration method and system for micro-service development |
-
2019
- 2019-12-12 CN CN201911273731.2A patent/CN110932912A/en active Pending
Cited By (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111475225A (en) * | 2020-03-31 | 2020-07-31 | 招商局金融科技有限公司 | Microservice configuration method, system, apparatus and computer readable storage medium |
CN111736874A (en) * | 2020-06-28 | 2020-10-02 | 深圳前海微众银行股份有限公司 | Application updating method and device |
CN112181528A (en) * | 2020-10-09 | 2021-01-05 | 大唐微电子技术有限公司 | Management method and device for configuration file of micro-service |
CN112181528B (en) * | 2020-10-09 | 2023-12-01 | 大唐微电子技术有限公司 | Method and device for managing configuration file of micro-service |
CN112099878A (en) * | 2020-11-19 | 2020-12-18 | 中国电力科学研究院有限公司 | Application software configuration management method, device and system |
CN112379948A (en) * | 2020-12-02 | 2021-02-19 | 腾讯科技(深圳)有限公司 | Program configuration management method and device, storage medium and electronic equipment |
CN112612541A (en) * | 2020-12-18 | 2021-04-06 | 北京中电普华信息技术有限公司 | Method and device for managing configuration files |
CN112702195A (en) * | 2020-12-18 | 2021-04-23 | 深圳奥哲网络科技有限公司 | Gateway configuration method, electronic device and computer readable storage medium |
CN114675896A (en) * | 2020-12-24 | 2022-06-28 | 广东飞企互联科技股份有限公司 | Parameter configuration method and system for micro-service development |
CN112804315A (en) * | 2020-12-31 | 2021-05-14 | 北京知因智慧科技有限公司 | Micro application integration method and device |
CN112804315B (en) * | 2020-12-31 | 2023-08-22 | 北京知因智慧科技有限公司 | Micro-application integration method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110932912A (en) | Method for realizing unified management of configuration files under micro-service architecture | |
EP3667500B1 (en) | Using a container orchestration service for dynamic routing | |
US11514304B2 (en) | Continuously provisioning large-scale machine learning models | |
US9971823B2 (en) | Dynamic replica failure detection and healing | |
CN107666525B (en) | Method and device for IP allocation of cluster container | |
CN102880503B (en) | Data analysis system and data analysis method | |
EP2954403B1 (en) | Cloud-based streaming data receiver and persister | |
CN109150987B (en) | Two-layer container cluster elastic expansion method based on host layer and container layer | |
CN108173774B (en) | Client upgrading method and system | |
US20140344340A1 (en) | Service request processing | |
CN108696372B (en) | Method and system for keeping system configuration consistency | |
US20130283259A1 (en) | Application installation | |
US9483493B2 (en) | Method and system for accessing a distributed file system | |
US8856365B2 (en) | Computer-implemented method, computer system and computer readable medium | |
US20160179840A1 (en) | Cloud bursting a database | |
CN106202082B (en) | Method and device for assembling basic data cache | |
CN112612541A (en) | Method and device for managing configuration files | |
US11327811B2 (en) | Distributed computing mesh | |
US10545667B1 (en) | Dynamic data partitioning for stateless request routing | |
US11138215B2 (en) | Method and system for implementing parallel database queries | |
US11570183B2 (en) | Tenant grouping for secure transport of content | |
CN111431951B (en) | Data processing method, node equipment, system and storage medium | |
CN110347654B (en) | Method and device for online cluster characteristics | |
US11803448B1 (en) | Faster restart of task nodes using periodic checkpointing of data sources | |
CN112667393B (en) | Method and device for building distributed task computing scheduling framework and computer equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
WD01 | Invention patent application deemed withdrawn after publication | ||
WD01 | Invention patent application deemed withdrawn after publication |
Application publication date: 20200327 |