CN110958150B - Management method and device for dynamic service configuration - Google Patents
Management method and device for dynamic service configuration Download PDFInfo
- Publication number
- CN110958150B CN110958150B CN201911257951.6A CN201911257951A CN110958150B CN 110958150 B CN110958150 B CN 110958150B CN 201911257951 A CN201911257951 A CN 201911257951A CN 110958150 B CN110958150 B CN 110958150B
- Authority
- CN
- China
- Prior art keywords
- message
- configuration
- service
- services
- middleware
- 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.)
- Active
Links
Images
Classifications
-
- 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/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
-
- 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
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
-
- 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/50—Network services
- H04L67/56—Provisioning of proxy services
- H04L67/562—Brokering proxy services
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Information Transfer Between Computers (AREA)
- Computer And Data Communications (AREA)
Abstract
The invention provides a management method and a device for dynamic service configuration, wherein the method comprises the following steps: starting a configuration center service, storing the configured message to a cache server, synchronizing to a database, and sending the message to a message middleware; when the business service is started, receiving a message pushed by a message center, analyzing the message, finding a corresponding cache middleware, and pulling the configuration so as to initialize; after initialization is completed, services to be upgraded are removed from effective services through the gateway end, and are transferred to other cluster services, and then configuration updating is carried out. The invention has the beneficial effects that: by the management method for dynamic service configuration, all service configuration parameters can be managed, and modified configuration parameters can be configured in real time; the service to be upgraded is removed from the effective service through the gateway end, is transferred to other cluster services, and then configuration updating is carried out, so that the operation of the service is not influenced, and the efficiency of the configuration updating is higher.
Description
Technical Field
The present invention relates to the field of service configuration update, and in particular, to a method and an apparatus for managing dynamic service configuration.
Background
At present, each service needs to configure some basic parameters, such as start parameter configuration, data source configuration, file address, and some common attribute configurations. If the configuration is wrong after the service is operated for a period of time, the service needs to be restarted, and the influence on the production environment is large; if the number of the services is large, each service is configured in the starting packet, which is not beneficial to management. With the continuous development of companies, the traffic volume is continuously strong, and more service packages are available, so a new service dynamic configuration updating method needs to be provided to improve the efficiency of configuration updating.
Disclosure of Invention
The technical problem to be solved by the invention is as follows: a management method and device for dynamic configuration of service are provided, aiming at improving the efficiency of configuration update.
In order to solve the technical problems, the invention adopts the technical scheme that: a management method for dynamic configuration of service comprises the following steps,
s10, starting a configuration center service, storing the configured message to a cache server, synchronizing to a database, and sending the message to a message middleware;
s20, when the service is started, receiving the message pushed by the message center, analyzing the message, finding the corresponding cache middleware, and performing configuration pull, thereby performing initialization;
and S30, after the initialization is completed, removing the service to be upgraded from the effective service through the gateway end, transferring the service to other cluster services, and then performing configuration updating.
Further, the step S30 specifically includes,
s31, after initialization is completed, services to be upgraded are removed from effective services through the gateway end, and are transferred to other cluster services;
s32, after receiving the configuration notification, according to different dynamic configurations and different scenes, refreshing the changed notification by using a similar dynamic loading mechanism;
and S33, after the updating is successful, informing the configuration center, and after the configuration center receives the successful message, informing the gateway end to add the service into the effective queue again.
Further, in the step S10, the sending the message to the message middleware includes,
and transmitting the queue of the server side into a message body by using a request-response mode, and sending the message body to the message middleware.
Further, in step S20, if the initialization fails, capturing the exception information, pushing the exception information to the message middleware, and analyzing the specific exception cause.
In order to solve the technical problem, the invention adopts another technical scheme as follows: a management device for dynamic configuration of services comprises,
the configuration center service module is used for starting the configuration center service, storing the configured message to the cache server, synchronizing the message to the database and sending the message to the message middleware;
the initialization module is used for receiving the message pushed by the message center when the business service is started, analyzing the message, finding the corresponding cache middleware, and pulling the configuration so as to initialize;
and the configuration updating module is used for removing the service to be upgraded from the effective service through the gateway end after the initialization is finished, transferring the service to be upgraded to other cluster services, and then performing configuration updating.
Further, the configuration update module specifically includes,
the service diversion unit is used for removing the service to be upgraded from the effective service through the gateway end after the initialization is finished and diverting the service to other cluster services;
the change refreshing unit is used for refreshing the changed notification by utilizing a similar dynamic loading mechanism according to different dynamic configurations and different scenes after receiving the configuration notification;
and the service loading unit is used for informing the configuration center after the updating is successful, and informing the gateway end of adding the service into the effective queue again after the configuration center receives the successful message.
Further, the configuring the central service module, sending the message to the message middleware includes,
and transmitting the queue of the server side into a message body by using a request-response mode, and sending the message body to the message middleware.
Further, the management device for dynamic configuration of the service further comprises,
and the abnormity analysis module is used for capturing the abnormal information if the initialization fails, pushing the abnormal information to the message middleware and analyzing a specific abnormity reason.
The invention has the beneficial effects that: by the management method for dynamic service configuration, all service configuration parameters can be managed, and modified configuration parameters can be configured in real time; the service to be upgraded is removed from the effective service through the gateway end, is transferred to other cluster services, and then configuration updating is carried out, so that the operation of the service is not influenced, and the efficiency of the configuration updating is higher.
Drawings
The following detailed description of the invention refers to the accompanying drawings.
FIG. 1 is a flowchart of a method for managing dynamic configuration of services according to an embodiment of the present invention;
FIG. 2 is a flow chart of configuration update according to an embodiment of the present invention;
FIG. 3 is a block diagram of a management device for dynamic configuration of services according to an embodiment of the present invention;
FIG. 4 is a block diagram of a configuration update module according to an embodiment of the present invention;
FIG. 5 is a configuration diagram of a configuration center architecture according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used in the specification of the present invention and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As shown in fig. 1, the first embodiment of the present invention is: a management method for dynamic configuration of service comprises the following steps,
s10, starting a configuration center service, storing the configured message to a cache server, synchronizing to a database, and sending the message to a message middleware;
in this step, the save and cache message is saved in a hash form, and may be set to be not expired, the configured key is ip + service id, and the storable service value includes database information, constant data, configuration of file storage or configuration information of a file server, log level configuration, cache configuration, and other configurations.
S20, when the service is started, receiving the message pushed by the message center, analyzing the message, finding the corresponding cache middleware, and performing configuration pull, thereby performing initialization;
and S30, after the initialization is completed, removing the service to be upgraded from the effective service through the gateway end, transferring the service to other cluster services, and then performing configuration updating.
As shown in fig. 2, the step S30 specifically includes,
s31, after initialization is completed, services to be upgraded are removed from effective services through the gateway end, and are transferred to other cluster services;
s32, after receiving the configuration notification, according to different dynamic configurations and different scenes, refreshing the changed notification by using a similar dynamic loading mechanism;
and S33, after the updating is successful, informing the configuration center, and after the configuration center receives the successful message, informing the gateway end to add the service into the effective queue again.
Further, in the step S10, the sending the message to the message middleware includes,
and transmitting the queue of the server side into a message body by using a request-response mode, and sending the message body to the message middleware.
In this step, the situation of analysis failure can be monitored, and a failure message is returned when the analysis fails.
Further, in step S20, if the initialization fails, capturing the exception information, pushing the exception information to the message middleware, and analyzing the specific exception cause.
In this embodiment, the management method for dynamic service configuration is implemented by the configuration Center architecture configuration shown in fig. 5, and the Config Center configuration Center has a function of maintaining configuration, and can store modified configuration to the database and to the cache Center; through a message subscription mode, after the configuration center modifies, the configuration center issues messages to the message queue center, and the business service monitors the message queue and obtains configuration from the cache again if data comes, so that dynamic real-time modification is realized. The configuration center ensures high availability by setting a cluster mode.
By the management method for dynamic service configuration, all service configuration parameters can be managed, and modified configuration parameters can be configured in real time; the service to be upgraded is removed from the effective service through the gateway end, is transferred to other cluster services, and then configuration updating is carried out, so that the operation of the service is not influenced, and the efficiency of the configuration updating is higher.
As shown in fig. 3, the second embodiment of the present invention is: a management device for dynamic configuration of services comprises,
a configuration center service module 40, configured to start a configuration center service, store the configured message to a cache server, synchronize to a database, and send the message to a message middleware;
the initialization module 50 is configured to receive a message pushed by a message center when a service is started, analyze the message, find a corresponding cache middleware, and pull configuration, thereby performing initialization;
and the configuration updating module 60 is configured to, after initialization is completed, remove the service to be upgraded from the valid service through the gateway, forward the service to be upgraded to other cluster services, and then perform configuration updating.
As shown in fig. 4, the configuration update module 60 specifically includes,
the service diverting unit 61 is used for removing the service to be upgraded from the effective service through the gateway end after the initialization is completed, and diverting to other cluster services;
a change refreshing unit 62, configured to refresh a changed notification by using a similar dynamic loading mechanism according to different dynamic configurations and different scenes after receiving the configuration notification;
and the service loading unit 63 is used for notifying the configuration center after the updating is successful, and notifying the gateway end of adding the service into the effective queue again after the configuration center receives the successful message.
Further, in the configuration center service module 40, sending the message to the message middleware includes,
and transmitting the queue of the server side into a message body by using a request-response mode, and sending the message body to message middleware.
Further, the management device for dynamic configuration of the service further comprises,
and the abnormity analysis module is used for capturing the abnormal information if the initialization fails, pushing the abnormal information to the message middleware and analyzing a specific abnormity reason.
It should be noted that, as can be clearly understood by those skilled in the art, the specific implementation process of the management apparatus for service dynamic configuration and each unit may refer to the corresponding description in the foregoing method embodiment, and for convenience and conciseness of description, no further description is provided herein.
While the invention has been described with reference to specific embodiments, the invention is not limited thereto, and various equivalent modifications and substitutions can be easily made by those skilled in the art within the technical scope of the invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Claims (6)
1. A method for managing dynamic configuration of services, comprising: comprises the following steps of (a) carrying out,
s10, starting a configuration center service, storing the configured message to a cache server, synchronizing to a database, and sending the message to a message middleware;
s20, when the service is started, receiving the message pushed by the message center, analyzing the message, finding the corresponding cache middleware, and performing configuration pull, thereby performing initialization;
s30, after initialization is completed, services to be upgraded are removed from effective services through the gateway end, and are transferred to other cluster services, and then configuration updating is carried out;
the step S30 specifically includes the steps of,
s31, after initialization is completed, services to be upgraded are removed from effective services through the gateway end, and are transferred to other cluster services;
s32, after receiving the configuration notification, according to different dynamic configurations and different scenes, refreshing the changed notification by using a similar dynamic loading mechanism;
and S33, after the updating is successful, informing the configuration center, and after the configuration center receives the successful message, informing the gateway end to add the service into the effective queue again.
2. A management method of dynamic configuration of services according to claim 1, characterized in that: in said step S10, sending the message to the message middleware includes,
and transmitting the queue of the server side into a message body by using a request-response mode, and sending the message body to the message middleware.
3. A management method of dynamic configuration of services according to claim 1, characterized in that: in step S20, if the initialization fails, capturing the exception information, pushing the exception information to the message middleware, and analyzing the specific exception cause.
4. A management apparatus for dynamic configuration of services, characterized by: comprises the steps of (a) preparing a mixture of a plurality of raw materials,
the configuration center service module is used for starting the configuration center service, storing the configured message to the cache server, synchronizing the message to the database and sending the message to the message middleware;
the initialization module is used for receiving the message pushed by the message center when the business service is started, analyzing the message, finding the corresponding cache middleware, and pulling the configuration so as to initialize;
the configuration updating module is used for removing the service to be upgraded from the effective service through the gateway end after the initialization is finished, transferring the service to be upgraded to other cluster services, and then performing configuration updating;
the configuration update module specifically includes a configuration update module,
the service diversion unit is used for removing the service to be upgraded from the effective service through the gateway end after the initialization is finished and diverting the service to other cluster services;
the change refreshing unit is used for refreshing the changed notification by utilizing a similar dynamic loading mechanism according to different dynamic configurations and different scenes after receiving the configuration notification;
and the service loading unit is used for informing the configuration center after the updating is successful, and informing the gateway end of adding the service into the effective queue again after the configuration center receives the successful message.
5. Management device of the dynamic configuration of services according to claim 4, characterized in that: in the configuration center service module, sending the message to the message middleware comprises,
and transmitting the queue of the server side into a message body by using a request-response mode, and sending the message body to the message middleware.
6. Management device of the dynamic configuration of services according to claim 4, characterized in that: the abnormal analysis module is used for capturing abnormal information if the initialization fails, pushing the abnormal information to the message middleware and analyzing a specific abnormal reason.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911257951.6A CN110958150B (en) | 2019-12-10 | 2019-12-10 | Management method and device for dynamic service configuration |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911257951.6A CN110958150B (en) | 2019-12-10 | 2019-12-10 | Management method and device for dynamic service configuration |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110958150A CN110958150A (en) | 2020-04-03 |
CN110958150B true CN110958150B (en) | 2022-08-05 |
Family
ID=69980609
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911257951.6A Active CN110958150B (en) | 2019-12-10 | 2019-12-10 | Management method and device for dynamic service configuration |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110958150B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111538739B (en) * | 2020-04-28 | 2023-11-17 | 北京思特奇信息技术股份有限公司 | Method and system for automatically synchronizing service gateway based on WSG |
CN112583933B (en) * | 2020-12-25 | 2023-02-24 | 高新现代智能系统股份有限公司 | Parameter operation method, device, equipment and storage medium |
CN114281428B (en) * | 2021-12-28 | 2024-06-04 | 挂号网(杭州)科技有限公司 | Service dictionary configuration method, electronic equipment and storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9001696B2 (en) * | 2011-12-01 | 2015-04-07 | International Business Machines Corporation | Distributed dynamic virtual machine configuration service |
CN103634171A (en) * | 2012-08-24 | 2014-03-12 | 中兴通讯股份有限公司 | Dynamic configuration method, device and system |
US10069941B2 (en) * | 2015-04-28 | 2018-09-04 | Microsoft Technology Licensing, Llc | Scalable event-based notifications |
US9880864B2 (en) * | 2015-11-17 | 2018-01-30 | Microsoft Technology Licensing, Llc | Dynamic configuration system for distributed services |
CN105528447B (en) * | 2015-12-22 | 2019-04-26 | 远光软件股份有限公司 | The layer-by-layer method summarized when rejecting of a kind of pair of specific data |
CN105515872B (en) * | 2015-12-23 | 2019-05-28 | 北京奇虎科技有限公司 | The update method of configuration information, apparatus and system |
CN105610947A (en) * | 2015-12-30 | 2016-05-25 | 青岛海尔智能家电科技有限公司 | Method, device and system for realizing high-available distributed queue service |
CN108540529A (en) * | 2018-03-07 | 2018-09-14 | 江苏电力信息技术有限公司 | Do not restart dynamic parameter method for refreshing under a kind of framework based on micro services |
CN109857427A (en) * | 2018-12-29 | 2019-06-07 | 深圳云天励飞技术有限公司 | Configure update method and Related product |
CN109714358A (en) * | 2019-01-15 | 2019-05-03 | 广东工业大学 | A kind of injection molding MES cloud platform of micro services |
-
2019
- 2019-12-10 CN CN201911257951.6A patent/CN110958150B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN110958150A (en) | 2020-04-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110958150B (en) | Management method and device for dynamic service configuration | |
CN107465767B (en) | Data synchronization method and system | |
CN108563502B (en) | Task scheduling method and device | |
CN107800565B (en) | Inspection method, inspection device, inspection system, computer equipment and storage medium | |
CN109788027B (en) | Data synchronization method, device, server and computer storage medium | |
CN110865842B (en) | OTA upgrading method and equipment | |
US10069942B2 (en) | Method and apparatus for changing configurations | |
CN111786893B (en) | method and device for synchronizing software versions of wireless routers in mesh networking | |
KR101389101B1 (en) | Method and apparatus for tracking device management data changes | |
CN102202073A (en) | Distributed system and data synchronization method thereof | |
CN107404509B (en) | Distributed service configuration system and information management method | |
CN110611603B (en) | Cluster network card monitoring method and device | |
CN113905005A (en) | Client state updating method and device for instant messaging | |
CN103685385A (en) | Method, system and device for file synchronization | |
TW201737107A (en) | Data synchronization method and apparatus | |
CN105450682A (en) | Method, device, and system for data synchronous storage and synchronizing data to client | |
CN107040576A (en) | Information-pushing method and device, communication system | |
WO2016074412A1 (en) | Compatibility administration method based on network configuration protocol, storage medium and device | |
CN116405547A (en) | Message pushing method and device, processor, electronic equipment and storage medium | |
CN117714532A (en) | Data information pushing method based on Timeline model, gateway and related equipment | |
WO2016180156A1 (en) | Router cluster upgrade system, method and apparatus | |
CN104104701A (en) | Online service configuration updating method and system | |
CN113342764A (en) | Data synchronization method and device among different cloud servers | |
CN106612295B (en) | Application downloading method, application pushing method, application downloading device, application pushing device and application downloading system | |
CN112542002A (en) | Car renting system control method and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |