CN109542865B - Method, device, system and medium for synchronizing configuration files of distributed cluster system - Google Patents
Method, device, system and medium for synchronizing configuration files of distributed cluster system Download PDFInfo
- Publication number
- CN109542865B CN109542865B CN201811463454.7A CN201811463454A CN109542865B CN 109542865 B CN109542865 B CN 109542865B CN 201811463454 A CN201811463454 A CN 201811463454A CN 109542865 B CN109542865 B CN 109542865B
- Authority
- CN
- China
- Prior art keywords
- configuration file
- message
- message queue
- information
- synchronized
- 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
- 238000000034 method Methods 0.000 title claims abstract description 69
- 230000001360 synchronised effect Effects 0.000 claims abstract description 42
- 230000004048 modification Effects 0.000 claims abstract description 18
- 238000012986 modification Methods 0.000 claims abstract description 18
- 238000013515 script Methods 0.000 claims description 28
- 230000010365 information processing Effects 0.000 claims description 26
- 230000008859 change Effects 0.000 claims description 13
- 238000012544 monitoring process Methods 0.000 claims description 7
- 238000004590 computer program Methods 0.000 claims description 4
- 238000006243 chemical reaction Methods 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 22
- 230000005540 biological transmission Effects 0.000 abstract description 3
- 238000010586 diagram Methods 0.000 description 9
- 230000006870 function Effects 0.000 description 5
- 238000012545 processing Methods 0.000 description 4
- 238000004422 calculation algorithm Methods 0.000 description 2
- 239000003795 chemical substances by application Substances 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 238000007792 addition Methods 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000003993 interaction Effects 0.000 description 1
- 230000000750 progressive effect Effects 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
- Multi Processors (AREA)
Abstract
The embodiment of the invention discloses a method, a device, equipment and a system for synchronizing configuration files of a distributed cluster system and a computer readable storage medium. After a user modifies a configuration file, a master node sends a message queue message containing the modified configuration file to a broadcast switch so that each slave node receives the message queue message; each slave node analyzes the format of the message queue message to obtain the information of the configuration file to be synchronized; and modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node. According to the method and the system, the message queue cluster is created, each slave node analyzes the modified configuration file broadcasted by the master node, and fine modification is carried out on the corresponding configuration file, so that flexible modification of the configuration file is realized, the process is simple, and the implementation is easy; the message transmission is realized based on the message queue cluster, the decoupling of processes between the main node and each slave node is realized, the reliability is improved, and the expansion is easy.
Description
Technical Field
The embodiment of the invention relates to the technical field of distributed cluster system design, in particular to a method, a device, equipment and a computer readable storage medium for synchronizing configuration files of a distributed cluster system.
Background
With the rapid development of cloud technology and big data, the data is explosively increased, and the application of the distributed cluster system is wider and wider. The distributed cluster system is composed of a plurality of servers, each server is called a node, and the node roles are divided into a main node and a common node. The same configuration file is often used among the nodes, and when a user modifies the configuration file of one of the nodes, the modified file needs to be synchronized to other nodes, so as to ensure that the configuration file of each node in the distributed cluster is consistent.
A distributed cluster system generally modifies a configuration file at a master node, and a conventional implementation manner is that the master node synchronizes the configuration file to other nodes through an scp command or a socket, and a schematic diagram of the principle is shown in fig. 1. The configuration file is copied to the remote node through the scp command, the command is simple, but the whole configuration file forcibly covers the original configuration file, and when fine control is needed to only modify partial content of the configuration file, the configuration file cannot be realized, and the flexibility is poor. And the socket synchronizes the configuration files, so that only the changed content in the configuration files can be sent to other nodes to realize fine control, but the socket is relatively complex to realize, and the problems of disconnection, reconnection and the like are involved.
Disclosure of Invention
The embodiment of the disclosure provides a method, a device and equipment for synchronizing configuration files of a distributed cluster system and a computer readable storage medium, which realize flexible modification of the configuration files, and have the advantages of simple realization process, high reliability and easy expansion.
In order to solve the above technical problems, embodiments of the present invention provide the following technical solutions:
an embodiment of the present invention provides a method for synchronizing configuration files of a distributed cluster system, where each slave node communicates with a master node through a message queue based on each slave node of the distributed cluster system, including:
receiving a message queue message broadcasted by a master node through the message queue cluster, wherein the message queue message comprises configuration file information modified by a user;
analyzing according to the format of the message queue message to obtain the information of the configuration file to be synchronized;
and modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node.
Optionally, the information of the configuration file to be synchronized includes a name of the configuration file, a change content of the configuration file, a change type, a modification time, and a restart service.
Optionally, after receiving the message queue message broadcasted by the master node through the message queue cluster, the method further includes:
and storing the message queue message into a buffer.
Optionally, the modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized includes:
calling a corresponding information processing script according to the identification information of the configuration file to be synchronized; all the information processing scripts are mutually independent;
and modifying the corresponding source configuration file by using the information processing script.
The embodiment of the present invention further provides a distributed cluster system configuration file synchronization apparatus, where based on each slave node of a distributed cluster system, each slave node and a master node communicate through a message queue, including:
the message receiving module is used for receiving a message queue message broadcasted by a main node through a message queue cluster, wherein the message queue message comprises configuration file information of the main node modified by a user;
the message analysis module is used for analyzing the format of the message queue message to obtain the information of the configuration file to be synchronized;
and the message configuration module is used for modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node.
The embodiment of the present invention further provides a distributed cluster system configuration file synchronization device, which includes a processor, where the processor is configured to implement the steps of the distributed cluster system configuration file synchronization method according to any one of the foregoing embodiments when executing a computer program stored in a memory.
The embodiment of the present invention finally provides a computer-readable storage medium, where a distributed cluster system configuration file synchronization program is stored on the computer-readable storage medium, and when executed by a processor, the distributed cluster system configuration file synchronization program implements the steps of the distributed cluster system configuration file synchronization method according to any one of the foregoing embodiments.
In another aspect, an embodiment of the present invention provides a method for synchronizing configuration files of a distributed cluster system, where, based on a master node of the distributed cluster system, the master node communicates with each slave node through a message queue, and the method includes:
when a request of a user for modifying the configuration file is received, converting the operation of the user for modifying the configuration file into a message queue message;
and sending the message queue message to each slave node through the message queue.
The embodiment of the present invention further provides a distributed cluster system configuration file synchronization apparatus, where based on a master node of a distributed cluster system, the master node and each slave node communicate through a message queue, and the apparatus includes:
the message conversion module is used for converting the operation of modifying the configuration file by the user into a message queue message when receiving the request of modifying the configuration file by the user;
and the message broadcasting module is used for sending the message queue message to each slave node through the message queue.
The embodiment of the invention finally provides a distributed cluster system configuration file synchronization system, which comprises a main node, a plurality of slave nodes, a message queue arranged on the main node and a monitoring queue arranged on each slave node, wherein the message queue comprises a broadcast switch; each monitoring queue is bound with the broadcast switch, and the master node and each slave node communicate through the message queue;
after the user modifies the configuration file, the main node sends a message queue message containing the modified configuration file to the broadcast switch, so that each slave node receives the message queue message;
each slave node analyzes the format of the message queue message to obtain the information of the configuration file to be synchronized; and modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node.
The technical scheme provided by the application has the advantages that the message queue cluster is created in the distributed cluster system, when a user modifies the configuration file, the master node sends the modified configuration file information to each slave node through the message queue cluster, each slave node analyzes the content of the configuration file to be modified and finely modifies the corresponding configuration file, flexible modification of the configuration file in the distributed cluster system is achieved, the implementation process is simple, and the implementation is easy; in addition, message transmission is realized based on the message queue cluster, decoupling of processes between the master node and each slave node is realized, reliability is improved, and expansion is easy.
In addition, the embodiment of the invention also provides a corresponding implementation device, equipment and a computer readable storage medium for the distributed cluster system configuration file synchronization method, so that the method has higher practicability, and the device, the equipment and the computer readable storage medium have corresponding advantages.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions of the related art, the drawings required to be used in the description of the embodiments or the related 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 for those skilled in the art, other drawings can be obtained according to these drawings without creative efforts.
Fig. 1 is a schematic diagram illustrating a principle of synchronizing configuration files of a cluster management system in a related art according to an embodiment of the present invention;
fig. 2 is a schematic flowchart of a method for synchronizing configuration files of a distributed cluster system according to an embodiment of the present invention;
fig. 3 is a structural diagram of a configuration file synchronization apparatus of a distributed cluster system according to an embodiment of the present invention;
fig. 4 is a structural diagram of another specific embodiment of a distributed cluster system configuration file synchronization apparatus according to an embodiment of the present invention;
fig. 5 is a structural diagram of a configuration file synchronization apparatus of a distributed cluster system according to another specific embodiment of the present invention;
fig. 6 is a schematic diagram illustrating an implementation process principle of a distributed cluster system configuration file synchronization system according to an embodiment of the present invention.
Detailed Description
In order that those skilled in the art will better understand the disclosure, the invention will be described in further detail with reference to the accompanying drawings and specific embodiments. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the 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.
The terms "first," "second," "third," "fourth," and the like in the description and claims of this application and in the above-described drawings are used for distinguishing between different objects and not for describing a particular order. Furthermore, the terms "comprising" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those steps or elements but may include other steps or elements not expressly listed.
Having described the technical solutions of the embodiments of the present invention, various non-limiting embodiments of the present application are described in detail below.
Referring to fig. 2, fig. 2 is an interaction flow diagram of a distributed cluster system configuration file synchronization method, which is provided by taking a slave node as an example in an embodiment of the present invention, and the embodiment of the present invention may include the following:
s201: the main node receives a request of a user for modifying the configuration file and converts the operation of the user for modifying the configuration file into a message queue message.
S202: the master node sends message queue messages to the slave nodes through the message queues.
And creating a message queue at the master node, wherein the message queue comprises a broadcast switch, each slave node creates a monitoring queue, and each monitoring queue is bound with the broadcast switch to receive messages sent by the broadcast switch so as to form a message queue cluster.
The master node's executing process (executing subject) may be named public-master and the slave nodes' executing processes (executing subjects) may be named public-agentd. The process name public is because in the present implementation the profile synchronization is part of the public module, in addition to functions such as remote execution of commands.
The public-master of the master node and the public-agent of each slave node communicate through the message queue, so that the public-agent and the public-master can be decoupled, and the reliability of the system is improved.
And after receiving a request of modifying the configuration file by the user, the main node modifies the corresponding source configuration file according to the modification content of the configuration file input by the user. After the user finishes modifying the configuration file, the main node sends message queue information to the broadcast exchanger, so that each slave node can receive the message of the change of the configuration file.
The master node can generate message queue information from the relevant information of the modified configuration file according to a preset message format, so that the slave node can analyze the relevant information according to a known message format to obtain corresponding content.
S203: each slave node receives the message queue message broadcast by the master node through the message queue cluster.
S204: and each slave node analyzes the format of the message queue message to obtain the information of the configuration file to be synchronized.
The information of the configuration file to be synchronized is the content of the slave node which needs to synchronize the configuration file of the slave node, namely, some matters which need to finely modify the source configuration file of the slave node, such as the name of the configuration file, the change content of the configuration file, the change type, the modification time and the restart service. The name of the configuration file (such as an A configuration file) is used for positioning the configuration file needing synchronization, namely the name of the configuration file which is changed, a plurality of configuration files are arranged in the distributed system cluster, and each configuration file has a unique identification name; the change type is a modification type of the configuration file, such as adding content, modifying parameters, deleting content and the like; the profile change content is some content that needs to be added, deleted or modified in a profile (for example, an a profile), and whether a restart service, that is, a service after modification needs to be restarted.
For example, the format of the message queue message may be profile name + profile change type + profile add content/profile delete content/profile modify content + modify time. When the slave node receives the message queue message, the slave node can sequentially extract each part of content along with the format of the message to obtain the name of the configuration file, the content before and after the change, the type of the change (addition, modification and deletion), the change time, whether the service needs to be restarted and the like
S205: and each slave node modifies the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node.
Certainly, there is a restart service after parsing the message queue message, and the slave node restarts the corresponding service as needed after modifying the configuration file.
Since the number of threads for processing messages from the slave node is limited, in order to prevent the messages from being too many, the slave node may cache the messages after receiving a message from the message queue. And the slave node message processing thread then obtains the message from the cache and analyzes the message.
The slave node comprises a plurality of information processing scripts, the information processing scripts are independent of one another, each script is responsible for processing a configuration file, each configuration file is correspondingly provided with unique identification information (such as the name of the configuration file), the identification information is bound with the corresponding information processing script, after the configuration files to be synchronized are obtained through analysis, the corresponding information processing scripts can be called according to the identification information of the configuration files to be synchronized, and the corresponding source configuration files are modified through the information processing scripts.
The configuration file is newly added in the distributed system cluster, and when the newly added configuration file is modified, only the information processing script corresponding to the configuration file needs to be added from the node, so that the influence on the existing service code is small, and the expansion is easy.
In the technical scheme provided by the embodiment of the invention, the message queue cluster is created in the distributed cluster system, when a user modifies the configuration file, the master node sends the modified configuration file information to each slave node through the message queue cluster, and each slave node analyzes the content of the configuration file to be modified and finely modifies the corresponding configuration file, so that the flexible modification of the configuration file in the distributed cluster system is realized, and the realization process is simple; in addition, message transmission is realized based on the message queue cluster, decoupling of processes between the master node and each slave node is realized, reliability is improved, and expansion is easy.
The embodiment of the invention also provides a corresponding implementation device for the distributed cluster system configuration file synchronization method, so that the method has higher practicability. In the following, the distributed cluster system configuration file synchronization apparatus provided in the embodiment of the present invention is introduced, and the distributed cluster system configuration file synchronization apparatus described below and the distributed cluster system configuration file synchronization method described above may be referred to in a corresponding manner.
Referring to fig. 3, fig. 3 is a structural diagram of a distributed cluster system configuration file synchronization apparatus provided in an embodiment of the present invention in a specific implementation manner, and based on each slave node of a distributed cluster system, the apparatus may include:
the message receiving module 301 is configured to receive a message queue message broadcasted by the master node through the message queue cluster, where the message queue message includes configuration file information of the master node modified by a user.
And the message analysis module 302 is configured to analyze the format of the message queue message to obtain the information of the configuration file to be synchronized.
And the message configuration module 303 is configured to modify corresponding content of the source configuration file according to the information of the configuration file to be synchronized, so as to implement synchronization of the configuration files of the slave node and the master node.
Optionally, in some embodiments of this embodiment, referring to fig. 4, the apparatus may further include a storage module 304, for example, configured to store the message queue message in a buffer.
In another embodiment, the message configuration module 303 may also call a corresponding message processing script according to the identification information of the configuration file to be synchronized; all the information processing scripts are mutually independent; and modifying the corresponding source configuration file by using the information processing script.
Referring to fig. 5, fig. 5 is a structural diagram of a distributed cluster system configuration file synchronization apparatus provided in an embodiment of the present invention in a specific implementation manner, where the main node based on the distributed cluster system includes:
a message conversion module 501, configured to, when receiving a request for a user to modify a configuration file, convert an operation of the user to modify the configuration file into a message queue message;
a message broadcasting module 502, configured to send a message queue message to each slave node through a message queue.
The functions of the functional modules of the distributed cluster system configuration file synchronization apparatus according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Therefore, the embodiment of the invention realizes flexible modification of the configuration file, and has the advantages of simple realization process, high reliability and easy expansion.
Referring to fig. 6, in fig. 6, an execution process of a master node may be public-master, an information queue may be rabbitmq, an execution process of a slave node may be public-agentd, and information of each information queue may be rabbitmq.
The distributed cluster system configuration file synchronization system comprises a main node, a plurality of slave nodes (1, 2, … …, n), a message queue arranged on the main node and a monitoring queue arranged on each slave node, wherein the message queue comprises a broadcast switch; the master node communicates with each slave node through a message queue.
After the user modifies the configuration file, the main node sends a message queue message containing the modified configuration file to the broadcast switch, so that each slave node receives the message queue message;
each slave node analyzes the format of the message queue message to obtain the information of the configuration file to be synchronized; and modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node.
The functions of the functional modules of the distributed cluster system configuration file synchronization system according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the description related to the foregoing method embodiment, which is not described herein again.
Therefore, the embodiment of the invention realizes flexible modification of the configuration file, and has the advantages of simple realization process, high reliability and easy expansion.
The embodiment of the present invention further provides a distributed cluster system configuration file synchronization device, which specifically includes:
a memory for storing a computer program;
a processor for executing a computer program to implement the steps of the distributed cluster system configuration file synchronization method according to any of the above embodiments.
The functions of the functional modules of the distributed cluster system configuration file synchronization device according to the embodiments of the present invention may be specifically implemented according to the method in the above method embodiments, and the specific implementation process may refer to the description related to the above method embodiments, which is not described herein again.
Therefore, the embodiment of the invention realizes flexible modification of the configuration file, and has the advantages of simple realization process, high reliability and easy expansion.
The embodiment of the present invention further provides a computer-readable storage medium, in which a distributed cluster system configuration file synchronization program is stored, and the distributed cluster system configuration file synchronization program is executed by a processor, as in any one of the steps of the distributed cluster system configuration file synchronization method described in the above embodiments.
The functions of the functional modules of the computer-readable storage medium according to the embodiment of the present invention may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the related description of the foregoing method embodiment, which is not described herein again.
Therefore, the embodiment of the invention realizes flexible modification of the configuration file, and has the advantages of simple realization process, high reliability and easy expansion.
The embodiments are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same or similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The present invention provides a method, an apparatus, a device and a computer readable storage medium for synchronizing a configuration file of a distributed cluster system. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.
Claims (9)
1. A distributed cluster system configuration file synchronization method is characterized in that each slave node and a master node communicate through a message queue based on each slave node of a distributed cluster system, and the method comprises the following steps:
receiving a message queue message broadcasted by a master node through the message queue cluster, wherein the message queue message comprises configuration file information modified by a user;
analyzing according to the format of the message queue message to obtain the information of the configuration file to be synchronized;
modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node;
wherein, the modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized comprises:
calling a corresponding information processing script according to the identification information of the configuration file to be synchronized; all the information processing scripts are mutually independent;
and modifying the corresponding source configuration file by using the information processing script.
2. The method according to claim 1, wherein the information of the configuration file to be synchronized includes a name of the configuration file, a change content of the configuration file, a change type, a modification time, and a restart service.
3. The distributed cluster system configuration file synchronization method of claim 2, wherein after receiving the message queue message broadcast by the master node through the message queue cluster, further comprising:
and storing the message queue message into a buffer.
4. A distributed cluster system configuration file synchronization device is characterized in that each slave node and a master node communicate through a message queue based on each slave node of a distributed cluster system, and the distributed cluster system configuration file synchronization device comprises:
the message receiving module is used for receiving a message queue message broadcasted by a main node through a message queue cluster, wherein the message queue message comprises configuration file information of the main node modified by a user;
the message analysis module is used for analyzing the format of the message queue message to obtain the information of the configuration file to be synchronized;
the message configuration module is used for modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node;
wherein the message configuration module is further configured to: calling a corresponding information processing script according to the identification information of the configuration file to be synchronized; all the information processing scripts are mutually independent; and modifying the corresponding source configuration file by using the information processing script.
5. A distributed cluster system profile synchronization apparatus, comprising a processor configured to implement the steps of the distributed cluster system profile synchronization method according to any one of claims 1 to 3 when executing a computer program stored in a memory.
6. A computer-readable storage medium, having stored thereon a distributed cluster system profile synchronization program, which when executed by a processor, performs the steps of the distributed cluster system profile synchronization method of any one of claims 1 to 3.
7. A distributed cluster system configuration file synchronization method is characterized in that based on a master node of a distributed cluster system, the master node and each slave node communicate through a message queue, and the method comprises the following steps:
when a request of a user for modifying the configuration file is received, converting the operation of the user for modifying the configuration file into a message queue message;
sending the message queue message to each slave node through the message queue so that each slave node obtains the information of the configuration file to be synchronized according to the format analysis of the message queue message; modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node; wherein, the modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized comprises: calling a corresponding information processing script according to the identification information of the configuration file to be synchronized; all the information processing scripts are mutually independent; and modifying the corresponding source configuration file by using the information processing script.
8. A distributed cluster system configuration file synchronization device is characterized in that based on a master node of a distributed cluster system, the master node and each slave node communicate through a message queue, and the distributed cluster system configuration file synchronization device comprises:
the message conversion module is used for converting the operation of modifying the configuration file by the user into a message queue message when receiving the request of modifying the configuration file by the user;
the message broadcasting module is used for sending the message queue message to each slave node through the message queue so that each slave node can analyze the message queue message according to the format of the message queue message to obtain the information of the configuration file to be synchronized; modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node; wherein, the modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized comprises: calling a corresponding information processing script according to the identification information of the configuration file to be synchronized; all the information processing scripts are mutually independent; and modifying the corresponding source configuration file by using the information processing script.
9. A distributed cluster system configuration file synchronization system is characterized by comprising a main node, a plurality of slave nodes, a message queue arranged on the main node and a monitoring queue arranged on each slave node, wherein the message queue comprises a broadcast switch; each monitoring queue is bound with the broadcast switch, and the master node and each slave node communicate through the message queue;
after the user modifies the configuration file, the main node sends a message queue message containing the modified configuration file to the broadcast switch, so that each slave node receives the message queue message;
each slave node analyzes the format of the message queue message to obtain the information of the configuration file to be synchronized; modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized so as to realize the synchronization of the configuration files of the slave node and the master node;
wherein, the modifying the corresponding content of the source configuration file according to the information of the configuration file to be synchronized comprises:
calling a corresponding information processing script according to the identification information of the configuration file to be synchronized; all the information processing scripts are mutually independent;
and modifying the corresponding source configuration file by using the information processing script.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811463454.7A CN109542865B (en) | 2018-12-03 | 2018-12-03 | Method, device, system and medium for synchronizing configuration files of distributed cluster system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811463454.7A CN109542865B (en) | 2018-12-03 | 2018-12-03 | Method, device, system and medium for synchronizing configuration files of distributed cluster system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN109542865A CN109542865A (en) | 2019-03-29 |
CN109542865B true CN109542865B (en) | 2021-10-29 |
Family
ID=65852667
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811463454.7A Active CN109542865B (en) | 2018-12-03 | 2018-12-03 | Method, device, system and medium for synchronizing configuration files of distributed cluster system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109542865B (en) |
Families Citing this family (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110196725A (en) * | 2019-04-23 | 2019-09-03 | 平安科技(深圳)有限公司 | Configuration file management method, apparatus, computer equipment and storage medium |
CN110098960B (en) * | 2019-04-24 | 2022-07-08 | 苏州浪潮智能科技有限公司 | Secret-free automatic configuration method and device for distributed block storage system |
CN110401651A (en) * | 2019-07-19 | 2019-11-01 | 苏州浪潮智能科技有限公司 | A kind of distributed type assemblies node monitoring method, apparatus and system |
CN110399273A (en) * | 2019-08-06 | 2019-11-01 | 中国工商银行股份有限公司 | Monitor node and its configuration update method, equipment and storage medium |
CN110618791B (en) * | 2019-09-10 | 2022-03-22 | 北京浪潮数据技术有限公司 | CFS storage domain configuration method, device, equipment and readable storage medium |
CN111026560B (en) * | 2019-10-17 | 2023-08-29 | 平安科技(深圳)有限公司 | Method, apparatus, computer device and storage medium for processing product data |
CN110941530B (en) * | 2019-11-11 | 2023-09-26 | 南方电网财务有限公司 | Method, device, computer equipment and storage medium for acquiring monitoring data |
CN110912977A (en) * | 2019-11-15 | 2020-03-24 | 北京浪潮数据技术有限公司 | Configuration file updating method, device, equipment and storage medium |
CN111708836B (en) * | 2020-06-03 | 2024-03-22 | 北京天空卫士网络安全技术有限公司 | Cluster management method, device and cluster system |
CN111970329A (en) * | 2020-07-24 | 2020-11-20 | 苏州浪潮智能科技有限公司 | Method, system, equipment and medium for deploying cluster service |
CN111930443B (en) * | 2020-10-15 | 2020-12-18 | 杭州云链趣链数字科技有限公司 | Operation and maintenance method, system, computer equipment and storage medium based on block chain |
CN113282660B (en) * | 2021-05-24 | 2023-05-23 | 挂号网(杭州)科技有限公司 | Method and system for synchronizing data in cluster, electronic equipment and storage medium |
CN113609212B (en) * | 2021-06-30 | 2023-07-14 | 苏州浪潮智能科技有限公司 | Method, system and related device for synchronizing configuration files in storage system |
CN113824994B (en) * | 2021-09-09 | 2024-04-05 | 超越科技股份有限公司 | Video playing fault-tolerant method, system, terminal and storage medium |
CN114048206B (en) * | 2021-10-29 | 2024-07-09 | 济南浪潮数据技术有限公司 | Configuration consistency verification method, system and device for large-scale cluster |
CN114501094A (en) * | 2022-02-09 | 2022-05-13 | 浙江博采传媒有限公司 | Sequence playing method and device based on virtual production and storage medium |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107908708A (en) * | 2017-11-09 | 2018-04-13 | 北京锐安科技有限公司 | A kind of method, system, equipment and the storage medium of group document synchronization |
CN108833569A (en) * | 2018-06-27 | 2018-11-16 | 郑州云海信息技术有限公司 | A kind of method of data synchronization and relevant apparatus |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
AU5027200A (en) * | 1999-05-20 | 2000-12-12 | Intensifi, Inc. | Method and apparatus for access to, and delivery of, multimedia information |
-
2018
- 2018-12-03 CN CN201811463454.7A patent/CN109542865B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107908708A (en) * | 2017-11-09 | 2018-04-13 | 北京锐安科技有限公司 | A kind of method, system, equipment and the storage medium of group document synchronization |
CN108833569A (en) * | 2018-06-27 | 2018-11-16 | 郑州云海信息技术有限公司 | A kind of method of data synchronization and relevant apparatus |
Also Published As
Publication number | Publication date |
---|---|
CN109542865A (en) | 2019-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109542865B (en) | Method, device, system and medium for synchronizing configuration files of distributed cluster system | |
CN104283956B (en) | Strong consistency distributed data storage method, Apparatus and system | |
CN108200219B (en) | Data synchronization method, device, server and storage medium | |
US10069942B2 (en) | Method and apparatus for changing configurations | |
CN111221793B (en) | Data mining method, platform, computer equipment and storage medium | |
CN111831748B (en) | Data synchronization method, device and storage medium | |
CN103491055A (en) | Method for synchronizing information among clients, clients and server | |
CN112363845A (en) | Data synchronization method of system integration middling station and integration middling station system | |
CN106817387B (en) | Data synchronization method, device and system | |
CN111064626A (en) | Configuration updating method, device, server and readable storage medium | |
CN114328618A (en) | Cache data synchronization method, device, equipment and storage medium | |
CN105338564B (en) | A kind of client adaptation method, client, server and system | |
CN109787789B (en) | Compatibility management method, device and equipment for software upgrading and storage medium | |
CN111327680B (en) | Authentication data synchronization method, device, system, computer equipment and storage medium | |
CN110798358B (en) | Distributed service identification method and device, computer readable medium and electronic equipment | |
CN112053150A (en) | Data processing method, device and storage medium | |
CN109614442A (en) | Data synchronous data listing maintenance, device, storage medium and electronic equipment | |
CN114465997A (en) | Data synchronization method and device, electronic equipment and storage medium | |
CN113434316A (en) | Function integration method, device, equipment and storage medium based on redis plug-in | |
CN114501347A (en) | Information interaction method, device and system between heterogeneous systems | |
CN110515907B (en) | Data synchronization method and related device for distributed storage nodes | |
CN107332679B (en) | Centerless information synchronization method and device | |
CN113691599A (en) | Method and device for data synchronization between service instances | |
EP3040891A1 (en) | Method for providing information to determine a graph associated with a data item | |
CN112291312A (en) | ETL data synchronization method and device, electronic equipment and storage medium |
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 |