CN109271433A - A kind of company-data synchronous method - Google Patents

A kind of company-data synchronous method Download PDF

Info

Publication number
CN109271433A
CN109271433A CN201811019265.0A CN201811019265A CN109271433A CN 109271433 A CN109271433 A CN 109271433A CN 201811019265 A CN201811019265 A CN 201811019265A CN 109271433 A CN109271433 A CN 109271433A
Authority
CN
China
Prior art keywords
node
data
synchronous
cluster
company
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
Application number
CN201811019265.0A
Other languages
Chinese (zh)
Inventor
周先东
李孝俊
陈勇
朱静轩
孟彦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Network Information Security Ltd By Share Ltd
Original Assignee
China Network Information Security Ltd By Share Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by China Network Information Security Ltd By Share Ltd filed Critical China Network Information Security Ltd By Share Ltd
Priority to CN201811019265.0A priority Critical patent/CN109271433A/en
Publication of CN109271433A publication Critical patent/CN109271433A/en
Pending legal-status Critical Current

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The present invention relates to data synchronization technology fields, more particularly to a kind of company-data synchronous method, including the design of company-data synchronous architecture, company-data synchronization, company-data synchronous protocol CDSP, company-data is synchronous synchronous including cluster management, data, and cluster management includes cluster starting, cluster closing, cluster configuration, clustered node condition monitoring, clustered node sync cap IP negotiation;Synchronous data include that configuration change data are synchronous, operation data is synchronous.Beneficial effects of the present invention: cluster node configuration simplifies, the IP auto negotiation of node sync cap, node operating status detects automatically, the configuration data and operation data of node have reached real-time synchronization, configuration information synchronizes service disconnection caused by the upload reloading mode avoided through configuration file, so that configuration flexibly and easily also mitigates the work of administrator.

Description

A kind of company-data synchronous method
Technical field
The present invention relates to data synchronization technology fields, and in particular to a kind of company-data synchronous method.
Background technique
In information system, in order to guarantee that system runs High Availabitity (HA), two-node cluster hot backup or multimachine full duplex are generallyd use Load balancing cluster deployment.Each node software and hardware requires consistent in the information system of aggregated structure, and configuration is also wanted with operation data Ask instant synchronization, namely when a node configuration or operation data change must the other each nodes of real-time synchronization.How to realize Data are synchronous between cluster internal node, are that group system has to solve the problems, such as.Conventional cluster internal system node data Synchronous method often configures complexity, needs the IP of the synchronous mouth of each node of manual configuration, manually checks whether each node IP conflicts, Number of nodes increases, and each each node IP of IP requires to be manually specified, and is not only easy error, also cumbersome.
Traditional clustered node data, which synchronize, usually needs human configuration to node sync cap IP address, and configuration change is logical Cross synchronization profile progress.As: group is concentrated with 6 nodes compositions, needs to log in each node respectively, configure other 5 The synchronization IP address of node, i.e., the IP address that configure 36 sync caps could be completed.Traditional clustered node configuration information Synchronous to be carried out using non-real time, i.e. a node configuration change needs to be stored in configuration file, then configuration file is led to It crosses FTP or SFTP to be transmitted on other nodes, then triggers or adjust synchronization process function, reload configuration and complete configuration information It is synchronous, reload the business short interruptions that configuration often causes working node.
Summary of the invention
It is an object of the invention to overcome problems of the prior art, a kind of company-data synchronous method is provided, it The configuration that simplified clustered node may be implemented, is matched automatically by the IP address that Automatic Negotiation Mechanism completes clustered node sync cap It sets.
To realize above-mentioned technical purpose and the technique effect, the present invention is achieved by the following technical solutions:
A kind of company-data synchronous method, includes the following steps:
Step 1, the design of company-data synchronous architecture;
Step 2, company-data are synchronous, and the company-data, which synchronizes, to be included the following steps:
Cluster management: the cluster management includes the following steps:
Step 2.1, cluster starting;
Step 2.2, cluster are closed;
Step 2.3, cluster configuration;
Step 2.4, clustered node condition monitoring: the clustered node condition monitoring includes following content: nodes heart beat is more Broadcast, node address is negotiated, it is active and standby automatically switch, main controlled node transfer and switching, the node of the cluster by CDSP agreement come Exchange information;
Step 2.5, clustered node sync cap IP negotiate;
Data are synchronous, and the data, which synchronize, to be included the following steps:
Step 2.6, configuration change data are synchronous: the api interface data based on HTTP are synchronous;
Step 2.7, operation data are synchronous: operation data is synchronous using CDSP multicast protocol;
Step 3, company-data synchronous protocol CDSP.
Further, step 1 company-data leads in architecture design, includes the following steps:
Step 1.1, cluster engine open monitoring nodes thread and complete clustered node status checkout, and IP negotiates, node operation State switching, while also receiving the system call interception from user's space and the sync message from sync cap;
Step 1.2, cluster ports receive the message from other nodes, complete Message processing by cluster engine.
Further, it is mainly solved two problems in the step 2.5 clustered node sync cap IP negotiation:
1), non-main controlled node is unreachable to main controlled node IP;
2), the identical IP conflict of cluster interior nodes.
Further, the solution of described problem includes the following steps:
A, node IP is initialized, using effective node IP, if it find that the IP in the synchronous mouth of node is invalid, is reset to silent Recognize IP;
B, checking is whether present node is master control, if it is main controlled node, then negotiates without IP, IP address was negotiated Journey only corrects non-master control node IP address;
C, it is identified in main controlled node using node control identification field cluster main controlled node, is main controlled node when set, it is no Then non-main controlled node illustrates in current cluster system if all nodes all do not find main controlled node in node table without master control, this Whether Shi Ze skips present node and main controlled node address up to inspection;
D, check whether node table with present node sync cap IP have repetition, if it find that repeat, it is automatic to correct The IP of node at that time, until not repeated with the IP of all nodes.
Beneficial effects of the present invention: cluster node configuration simplifies, the IP auto negotiation of node sync cap, node fortune Row state detects automatically, and the configuration data and operation data of node have reached real-time synchronization, and configuration information is synchronized to avoid passing through and be configured Service disconnection caused by the upload reloading mode of file, so that configuration flexibly and easily also mitigates the work of administrator.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, will be described below to embodiment required Attached drawing is briefly described, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ability For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is a kind of flow diagram of company-data synchronous method of the present invention.
Specific embodiment
In order to be easy to understand the technical means, the creative features, the aims and the efficiencies achieved by the present invention, below will In conjunction with the attached drawing in the embodiment of the present invention, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that Described embodiments are only a part of the embodiments of the present invention, instead of all the embodiments.Based on the implementation in the present invention Example, all other embodiment obtained by those of ordinary skill in the art without making creative efforts belong to The scope of protection of the invention.
A kind of company-data synchronous method as shown in Figure 1, includes the following steps:
Step 1, the design of company-data synchronous architecture, include the following steps:
Step 1.1, cluster engine open monitoring nodes thread and complete clustered node status checkout, and IP negotiates, node operation State switching, while also receiving the system call interception from user's space and the sync message from sync cap;
Step 1.2, cluster ports receive the message from other nodes, complete Message processing by cluster engine;
Step 2, company-data are synchronous, and the company-data, which synchronizes, to be included the following steps:
Cluster management: the cluster management includes the following steps:
Step 2.1, cluster starting, click in the node for participating in cluster and open, and cluster, cluster starting can be added in this node Afterwards, the synchronization mouth of clustered node is in listening state, for monitoring the CDSP message from the other nodes of cluster;
Step 2.2, cluster are closed, and after cluster is closed, clustered node exits cluster, and the synchronization mouth of clustered node is no longer monitored CDSP message, another: node is hung improper when exiting cluster, and other nodes can also detect;
Step 2.3, cluster configuration allow administrator to change the cluster attributes such as cluster main-standby nodes heartbeat duration, with application Different service environments;
The node of step 2.4, clustered node condition monitoring, the cluster exchanges information by CDSP agreement comprising Following steps:
Step 2.4.1, nodes heart beat multicast: after cluster starting, cluster present node is in configuration status, first heartbeat After multicast message is sent with multicast, node switchs to learning state, and node receives the heartbeat response with other nodes at this time, and remembers The information of all nodes is recorded to local node table;
Step 2.4.2, node address is negotiated: when current cluster node is in learning state, checking entire clustered node table Whether main controlled node is had, if it find that present node is then set to main controlled node without main controlled node by node table;
Step 2.4.3, active and standby automatic switchover: clustered node is divided under AB active-standby mode: active and standby two kinds of working methods, Host node is in running order, and slave node is in off working state.Point all main working condition under load-sharing mode.In AB master When standby mode deployment, condition monitoring finds host node time-out, is actively cut to main working condition;
Step 2.4.4, main controlled node transfer and switching: when node restores normal, the node of recovery is automatically added to cluster, If cluster mode is in LB mode, the node just restored is automatically cut into working condition, if cluster configuration is AB mode, Node inspection is then carried out, into active and standby automatic switchover step;
Wherein the node of the cluster is communicated by CDSP agreement;
Step 2.5, clustered node sync cap IP negotiate, and mainly solve two problems:
1), non-main controlled node is unreachable to main controlled node IP;
2), the identical IP conflict of cluster interior nodes;
The solution of described problem includes the following steps:
A, node IP is initialized, using effective node IP, if it find that the IP in the synchronous mouth of node is invalid, is reset to silent Recognize IP;
B, checking is whether present node is master control, if it is main controlled node, then negotiates without IP, IP address was negotiated Journey only corrects non-master control node IP address;
C, it is identified in main controlled node using node control identification field cluster main controlled node, is main controlled node when set, it is no Then non-main controlled node illustrates in current cluster system if all nodes all do not find main controlled node in node table without master control, this Whether Shi Ze skips present node and main controlled node address up to inspection;
D, check whether node table with present node sync cap IP have repetition, if it find that repeat, it is automatic to correct The IP of node at that time, until not repeated with the IP of all nodes;
Data are synchronous, and the data, which synchronize, to be included the following steps:
Step 2.6, configuration change data are synchronous: after cluster starts, when administrator's altering system configuration parameter, Corresponding change is synchronized to other all nodes in group system, is completed using the api interface based on http protocol, for safety It is required that relatively high system, synchronous data transmission channel uses HTTPS.
Illustrate the synchronous process of data by taking WAF group system as an example below, such as: administrator adds the address L3 host ip A and arrives In equipment, step is poly- as follows:
A, administrator logs in node WUI;
B, administrator submits host ip A to present node;
C, present node addition finishes calling sync cap, and sync cap is first checked whether to open and be synchronized, if opened It is synchronous, then continue, otherwise without synchronization;
D, query node table initiates HTTP [S] by sync cap IP and establishes node connection, after adding sync mark, HTTP [S] message part of this node of Admin Access API is transmitted to each node by POST mode;
E, other nodes receive message, make same operation, and after node processing, discovery has sync mark, then No longer forward;
Note: being generally not that all node configuration datas require to synchronize, and handles function return value by node API come really It is fixed whether to need to synchronize;
Step 2.7, operation data are synchronous, and operation data is synchronous using CDSP multicast protocol, when node operation data table becomes More, such as creation, update, deletion, cluster synchronization is triggered, it is synchronous to be carried out by multicast;
Step 3, company-data synchronous protocol CDSP, data exchange passes through CDSP and carries out between clustered node.CDSP association text The main information exchange completed between clustered node by multicast of exchange, such as: node IP address, node state, which is master control Deng.
CDSP protocol format is as follows:
Present invention disclosed above preferred embodiment is only intended to help to illustrate the present invention.There is no detailed for preferred embodiment All details are described, are not limited the invention to the specific embodiments described.Obviously, according to the content of this specification, It can make many modifications and variations.These embodiments are chosen and specifically described to this specification, is in order to better explain the present invention Principle and practical application, so that skilled artisan be enable to better understand and utilize the present invention.The present invention is only It is limited by claims and its full scope and equivalent.

Claims (4)

1. a kind of company-data synchronous method, which comprises the steps of:
Step 1, the design of company-data synchronous architecture;
Step 2, company-data are synchronous, and the company-data, which synchronizes, to be included the following steps:
Cluster management: the cluster management includes the following steps:
Step 2.1, cluster starting;
Step 2.2, cluster are closed;
Step 2.3, cluster configuration;
Step 2.4, clustered node condition monitoring: the clustered node condition monitoring includes following content: nodes heart beat multicast, section Dot address is negotiated, active and standby automatic switchover, main controlled node shifts and switching, the node of the cluster exchange letter by CDSP agreement Breath;
Step 2.5, clustered node sync cap IP negotiate;
Data are synchronous, and the data, which synchronize, to be included the following steps:
Step 2.6, configuration change data are synchronous: the api interface data based on HTTPS are synchronous;
Step 2.7, operation data are synchronous: operation data is synchronous using CDSP multicast protocol;
Step 3, company-data synchronous protocol CDSP.
2. a kind of company-data synchronous method according to claim 1, which is characterized in that step 1 company-data is logical In architecture design, include the following steps:
Step 1.1, cluster engine open monitoring nodes thread and complete clustered node status checkout, and IP negotiates, node operating status Switching, while also receiving the system call interception from user's space and the sync message from sync cap;
Step 1.2, cluster ports receive the message from other nodes, complete Message processing by cluster engine.
3. a kind of company-data synchronous method according to claim 1, which is characterized in that step 2.5 clustered node Sync cap IP is mainly solved two problems in negotiating:
1), non-main controlled node is unreachable to main controlled node IP;
2), the identical IP conflict of cluster interior nodes.
4. a kind of company-data synchronous method according to claim 3, which is characterized in that the solution packet of described problem Include following steps:
A, node IP is initialized, using effective node IP, if it find that the IP in the synchronous mouth of node is invalid, resets to default IP;
B, checking is whether present node is master control, if it is main controlled node, then negotiates without IP, and IP address negotiations process is only Correct non-master control node IP address;
C, it is identified in main controlled node using node control identification field cluster main controlled node, is main controlled node when set, it is otherwise non- Main controlled node illustrates without master control in current cluster system, at this time then if all nodes all do not find main controlled node in node table Present node and main controlled node address are skipped whether up to inspection;
D, check whether node table with present node sync cap IP have repetition, if it find that repeating, automatic amendment was at that time The IP of node, until not repeated with the IP of all nodes.
CN201811019265.0A 2018-09-03 2018-09-03 A kind of company-data synchronous method Pending CN109271433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811019265.0A CN109271433A (en) 2018-09-03 2018-09-03 A kind of company-data synchronous method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811019265.0A CN109271433A (en) 2018-09-03 2018-09-03 A kind of company-data synchronous method

Publications (1)

Publication Number Publication Date
CN109271433A true CN109271433A (en) 2019-01-25

Family

ID=65187106

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811019265.0A Pending CN109271433A (en) 2018-09-03 2018-09-03 A kind of company-data synchronous method

Country Status (1)

Country Link
CN (1) CN109271433A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659262A (en) * 2019-09-20 2020-01-07 聚好看科技股份有限公司 Master-slave switching method and device for redis node
CN111092961A (en) * 2019-11-15 2020-05-01 中国电子科技集团公司第三十研究所 Method for realizing IP address negotiation based on PPP protocol
CN112003728A (en) * 2020-07-24 2020-11-27 苏州浪潮智能科技有限公司 Kubernetes cluster-based application master and standby implementation method and device
CN112055054A (en) * 2020-08-07 2020-12-08 之江实验室 Multi-edge cluster data synchronization method and system based on multiple consistency protocols

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6917626B1 (en) * 1999-11-30 2005-07-12 Cisco Technology, Inc. Apparatus and method for automatic cluster network device address assignment
CN1725702A (en) * 2004-07-20 2006-01-25 联想网御科技(北京)有限公司 Network safety equipment and assemblied system and method for implementing high availability
CN103246522A (en) * 2013-05-28 2013-08-14 浪潮电子信息产业股份有限公司 Fast building method for hot standby environment based on virtualization platform
CN103618634A (en) * 2013-12-11 2014-03-05 上海爱数软件有限公司 Method for automatically finding nodes in cluster
CN104754067A (en) * 2013-12-30 2015-07-01 北京大唐高鸿软件技术有限公司 Vehicle-mounted short-distance communication network based vehicle-mounted node IP address dynamic configuration method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6917626B1 (en) * 1999-11-30 2005-07-12 Cisco Technology, Inc. Apparatus and method for automatic cluster network device address assignment
CN1725702A (en) * 2004-07-20 2006-01-25 联想网御科技(北京)有限公司 Network safety equipment and assemblied system and method for implementing high availability
CN103246522A (en) * 2013-05-28 2013-08-14 浪潮电子信息产业股份有限公司 Fast building method for hot standby environment based on virtualization platform
CN103618634A (en) * 2013-12-11 2014-03-05 上海爱数软件有限公司 Method for automatically finding nodes in cluster
CN104754067A (en) * 2013-12-30 2015-07-01 北京大唐高鸿软件技术有限公司 Vehicle-mounted short-distance communication network based vehicle-mounted node IP address dynamic configuration method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
刘柳: "LVS负载均衡系统的研究与实现", 《中国优秀硕士学位论文全文数据库》 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110659262A (en) * 2019-09-20 2020-01-07 聚好看科技股份有限公司 Master-slave switching method and device for redis node
CN111092961A (en) * 2019-11-15 2020-05-01 中国电子科技集团公司第三十研究所 Method for realizing IP address negotiation based on PPP protocol
CN111092961B (en) * 2019-11-15 2021-12-17 中国电子科技集团公司第三十研究所 Method for realizing IP address negotiation based on PPP protocol
CN112003728A (en) * 2020-07-24 2020-11-27 苏州浪潮智能科技有限公司 Kubernetes cluster-based application master and standby implementation method and device
CN112003728B (en) * 2020-07-24 2022-07-19 苏州浪潮智能科技有限公司 Kubernetes cluster-based application master and standby implementation method and device
CN112055054A (en) * 2020-08-07 2020-12-08 之江实验室 Multi-edge cluster data synchronization method and system based on multiple consistency protocols
CN112055054B (en) * 2020-08-07 2023-04-07 之江实验室 Multi-edge cluster data synchronization method and system based on multiple consistency protocols

Similar Documents

Publication Publication Date Title
CN109271433A (en) A kind of company-data synchronous method
US8339969B2 (en) Distributed ethernet system and method for detecting fault based thereon
US7483383B2 (en) Stack manager protocol with automatic set up mechanism
US7505403B2 (en) Stack manager protocol with automatic set up mechanism
EP1655906B1 (en) Stack switch manager protocol with temporary suspension of supervision
CN111865779B (en) Route synchronization method and cross-device link aggregation group
CN105450779B (en) The method of one household appliance connection multiserver
CN112769587A (en) Forwarding method and device for access flow of dual-homing device and storage medium
US20130238738A1 (en) Distributed method and system for implementing link aggregation control protocol (lacp) standard state machines
WO2017000832A1 (en) Mac address synchronization method, device and system
WO2017008641A1 (en) Method of switching redundancy port and device utilizing same
CN104954101A (en) Multi-terminal data synchronization method based on ACK synchronization
CN106209690A (en) A kind of synchronize the method for configuration information, main equipment and standby equipment
US9641268B2 (en) Method, system and device for synchronizing clocks
CN111585791B (en) Data synchronization configuration method, system and storage medium
CN106941450B (en) Route synchronization method, equipment and communication system
JP6118464B2 (en) Port status synchronization method, related device, and system
JP5484388B2 (en) Network equipment
CN111181766B (en) Redundant FC network system and method for realizing dynamic configuration of switch
CN111064622B (en) Network device, synchronization apparatus, and information transmission method
CN107018077B (en) Data transmission method and system for router
CN106330781B (en) Method, device and switch for separating protocol control and forwarding link of stacking system
CN115412424B (en) Double-master device detection method and device in MLAG environment
CN115277571B (en) Processing method and processing system
WO2013056569A1 (en) Method and device for communication between boards

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
RJ01 Rejection of invention patent application after publication

Application publication date: 20190125

RJ01 Rejection of invention patent application after publication