

技术领域technical field
本发明涉及主备倒换技术,尤其涉及一种主备同步方法及系统。The invention relates to master-standby switching technology, in particular to a master-standby synchronization method and system.
背景技术Background technique
大型通讯设备中常见的一种硬件架构为集中式主备冗余系统,对集中式主备系统而言,业务交换中心是在主控板上完成的,主控板为主备冗余系统以保障可靠性。对这样的系统而言,要做到主备倒换业务不中断或中断时间尽可能的短,必须做到转发面(驱动)配置的实时可靠性同步,现有技术主要有以下两种实现转发面(驱动)配置的实时可靠性同步的方法:A common hardware architecture in large-scale communication equipment is a centralized active-standby redundant system. For a centralized active-standby system, the business switching center is completed on the main control board. Guaranteed reliability. For such a system, in order to achieve uninterrupted active/standby switching services or as short an interruption time as possible, real-time reliability synchronization of the forwarding plane (driver) configuration must be achieved. The existing technologies mainly include the following two methods to realize the forwarding plane (driver) method for real-time reliability synchronization of configuration:
1)主备系统只有主机能接收数据流和控制命令,主备之间由主机各业务单元根据配置数据与动态数据变化主动发起实时的业务层(上层、控制层)配置数据与动态数据同步,在备机上,需要运用业务层语义将来自主机的业务层配置数据与动态数据实时设置到转发面(驱动),通过复杂的业务层方法确保同步的可靠性与实时性。可以看出,采用这种方法的主备同步是基于业务语义的,这样的问题在于:所有的上层业务语义都需要在同步过程中进行映射,而上层协议业务实现起来可能会非常复杂(如复杂的协议状态机动态数据),从而会增大主备同步的复杂度。1) In the active/standby system, only the host can receive data flow and control commands. Between the active and standby, each business unit of the host actively initiates real-time synchronization of configuration data and dynamic data of the business layer (upper layer, control layer) according to configuration data and dynamic data changes. On the standby machine, it is necessary to use the business layer semantics to set the business layer configuration data and dynamic data from the host to the forwarding plane (driver) in real time, and ensure the reliability and real-time synchronization through complex business layer methods. It can be seen that the master-standby synchronization using this method is based on business semantics. The problem is that all upper-layer business semantics need to be mapped during the synchronization process, and the implementation of upper-layer protocol services may be very complicated (such as complex The dynamic data of the protocol state machine), which will increase the complexity of the master-standby synchronization.
2)主备系统通过硬件复制来使主备主控板接收同样的数据流与控制流,这样虽然可以避免实现前一种方法中复杂的业务层语义同步,但也存在以下问题:首先,并不是所有的硬件体系都支持数据流和控制流的硬件复制,即这种方法的应用范围有限;其次,即使复制可以通过硬件手段实现,但是,对控制流进行复制在软件实现上可能会出现主备倒换可靠性差的问题,比如,当主备动态运行环境不一致时(如很多协议状态机中都会有定时器,而主备上定时器很难做到同时超时等等),同样的控制流输入(如协议消息,协议消息与协议定时器事件是紧耦合关系)备机上不一定产生和主机上同样的结果。2) The active and standby systems use hardware replication to enable the active and standby main control boards to receive the same data flow and control flow. Although this can avoid the complex semantic synchronization of the business layer in the previous method, there are also the following problems: first, and Not all hardware systems support hardware replication of data flow and control flow, that is, the scope of application of this method is limited; secondly, even if the replication can be realized by hardware means, the replication of control flow may appear in software implementation. The problem of poor reliability of standby switchover, for example, when the active and standby dynamic operating environments are inconsistent (for example, there are timers in many protocol state machines, and it is difficult for the active and standby timers to time out at the same time, etc.), the same control flow input ( Such as protocol messages, protocol messages and protocol timer events are in a tightly coupled relationship) The standby machine may not necessarily produce the same result as the master machine.
发明内容Contents of the invention
有鉴于此,本发明的主要目的在于提供一种主备同步方法及系统,能够降低主备同步的复杂度,并提高主备倒换的可靠性。In view of this, the main purpose of the present invention is to provide a master-standby synchronization method and system, which can reduce the complexity of master-standby synchronization and improve the reliability of master-standby switchover.
为达到上述目的,本发明的技术方案是这样实现的:In order to achieve the above object, technical solution of the present invention is achieved in that way:
一种主备同步方法,包括:A master-standby synchronization method, comprising:
备机获取来自主机的转发面配置信息及备机发起的转发面配置信息;The standby machine obtains the forwarding plane configuration information from the host machine and the forwarding plane configuration information initiated by the standby machine;
备机对所述获取的配置信息进行过滤,滤去备机控制面发起的转发面配置信息,并根据来自主机的转发面配置信息进行转发面配置信息设置。The standby machine filters the obtained configuration information, filters out the forwarding plane configuration information initiated by the standby machine's control plane, and sets the forwarding plane configuration information according to the forwarding plane configuration information from the host.
该方法还包括步骤:主机根据其当前转发面配置的类型、功能、配置数据的索引向备机发送需要同步的转发面配置信息。The method also includes a step: the master sends forwarding plane configuration information to be synchronized to the standby machine according to its current forwarding plane configuration type, function, and index of configuration data.
主机以链表形式对需要同步的转发面配置信息进行组织,The host organizes the configuration information of the forwarding plane that needs to be synchronized in the form of a linked list.
所述主机向备机发送需要同步的转发面配置信息为:从链头开始依次发送链表中各节点的转发面配置信息,主机判定节点的转发面配置信息发送成功,则删除所述节点,再发送下一节点的转发面配置信息。The forwarding plane configuration information that needs to be synchronized is sent by the master to the standby machine as follows: sending forwarding plane configuration information of each node in the linked list sequentially from the chain head, and the master determines that the forwarding plane configuration information of the node is sent successfully, then deletes the node, and then Send the forwarding plane configuration information of the next node.
主机为链表中的节点设置序列号,更新节点中需要同步的转发面配置信息时,将所述节点的序列号加一,所述主机向备机发送节点的转发面配置信息时携带所述节点的序列号,所述备机收到转发面配置信息后,向主机返回携带相应序列号的响应,The host sets serial numbers for the nodes in the linked list, and when updating the forwarding plane configuration information in the node that needs to be synchronized, adds one to the serial number of the node, and the host sends the forwarding plane configuration information of the nodes to the standby machine with the node serial number, the standby machine returns a response carrying the corresponding serial number to the host machine after receiving the forwarding plane configuration information,
所述主机判断节点的转发面配置信息是否发送成功为:判断备机返回响应时携带的序列号是否与主机发送转发面配置信息时携带的序列号相同,备机返回响应时携带的序列号与主机发送转发面配置信息时携带的序列号相同,则节点的转发面配置信息发送成功;否则,节点的转发面配置信息发送失败。The master judges whether the forwarding plane configuration information of the node is successfully sent as follows: judging whether the serial number carried when the standby machine returns the response is the same as the serial number carried when the host sends the forwarding plane configuration information, and the serial number carried when the standby machine returns the response is the same as If the hosts send the forwarding plane configuration information with the same serial number, the node's forwarding plane configuration information is sent successfully; otherwise, the node's forwarding plane configuration information fails to be sent.
主机设置检查周期,该方法还包括:主机按照所述检查周期周期性检查所述链表中是否仍存在节点,并在存在节点时,发送所述节点的转发面配置信息。The host sets a check cycle, and the method further includes: the host periodically checks whether there are nodes in the linked list according to the check cycle, and sends forwarding plane configuration information of the nodes if there are nodes.
一种主备同步系统,包括主机和备机,所述备机包括:转发面配置信息获取单元、转发面配置信息发起单元、过滤单元、设置单元,其中,A master-standby synchronization system, comprising a master and a standby, the standby comprising: a forwarding plane configuration information acquiring unit, a forwarding plane configuration information initiating unit, a filtering unit, and a setting unit, wherein,
所述转发面配置信息获取单元,用于获取来自主机的转发面配置信息及转发面配置信息发起单元发起的转发面配置信息;The forwarding plane configuration information obtaining unit is used to obtain the forwarding plane configuration information from the host and the forwarding plane configuration information initiated by the forwarding plane configuration information initiation unit;
所述转发面配置信息发起单元,用于发起转发面配置信息;The forwarding plane configuration information initiating unit is configured to initiate forwarding plane configuration information;
所述过滤单元,用于对转发面配置信息获取单元获取的配置信息进行过滤,滤去备机控制面发起的转发面配置信息,并将来自主机的转发面配置信息发送到设置单元;The filtering unit is configured to filter the configuration information obtained by the forwarding plane configuration information acquisition unit, filter out the forwarding plane configuration information initiated by the standby machine control plane, and send the forwarding plane configuration information from the host to the setting unit;
所述设置单元,用于根据来自过滤单元的转发面配置信息进行转发面配置信息设置。The setting unit is configured to set the forwarding plane configuration information according to the forwarding plane configuration information from the filtering unit.
所述主机包括转发面配置信息发送单元,用于根据其当前转发面配置的类型、功能、配置数据的索引向备机发送需要同步的转发面配置信息。The host includes a forwarding plane configuration information sending unit, configured to send forwarding plane configuration information to be synchronized to the backup machine according to the type, function, and configuration data index of its current forwarding plane configuration.
所述主机还包括:链表存储单元和判断单元,The host also includes: a linked list storage unit and a judging unit,
所述链表存储单元,用于以链表形式对需要同步的转发面配置信息进行存储;以及根据判断单元的通知,对存储的链表进行维护;The linked list storage unit is used to store the configuration information of the forwarding plane that needs to be synchronized in the form of a linked list; and maintain the stored linked list according to the notification of the judging unit;
所述转发面配置信息发送单元,还用于根据判断单元的通知以及链表存储单元中存储的链表依次发送各节点的转发面配置信息;The forwarding plane configuration information sending unit is further configured to sequentially send the forwarding plane configuration information of each node according to the notification of the judging unit and the linked list stored in the linked list storage unit;
所述判断单元,用于在判定开始发送转发面配置信息时,通知转发面配置信息发送单元发送链表中节点的转发面配置信息;以及判断节点的转发面配置信息是否发送成功,判定节点的转发面配置信息发送成功,则通知链表存储单元删除所述节点,并通知转发面配置信息发送单元发送链表中下一节点的转发面配置信息。The judging unit is used to notify the forwarding plane configuration information sending unit to send the forwarding plane configuration information of the nodes in the linked list when determining to start sending the forwarding plane configuration information; If the plane configuration information is sent successfully, the linked list storage unit is notified to delete the node, and the forwarding plane configuration information sending unit is notified to send the forwarding plane configuration information of the next node in the linked list.
所述主机还包括:转发面配置信息更新单元,所述备机还包括响应单元,The host computer also includes: a forwarding plane configuration information updating unit, and the standby machine also includes a response unit,
所述转发面配置信息更新单元,用于对链表存储单元中存储的转发面配置信息进行更新;The forwarding plane configuration information update unit is configured to update the forwarding plane configuration information stored in the linked list storage unit;
所述链表存储单元,还用于存储链表中节点的序列号,并在转发面配置信息更新单元更新节点中需要同步的转发面配置信息时,将所述节点的序列号加一;The linked list storage unit is also used to store the serial number of the node in the linked list, and when the forwarding plane configuration information updating unit updates the forwarding plane configuration information in the node that needs to be synchronized, the serial number of the node is increased by one;
所述转发面配置信息发送单元,还用于在向备机发送节点的转发面配置信息时携带所述节点的序列号;The forwarding plane configuration information sending unit is further configured to carry the serial number of the node when sending the forwarding plane configuration information of the node to the standby machine;
所述响应单元,用于在转发面配置信息获取单元收到转发面配置信息后,向主机返回携带相应序列号的响应;The response unit is configured to return a response carrying a corresponding serial number to the host after the forwarding plane configuration information acquisition unit receives the forwarding plane configuration information;
所述判断单元判断节点的转发面配置信息是否发送成功为:判断备机返回响应时携带的序列号是否与主机发送转发面配置信息时携带的序列号相同,备机返回响应时携带的序列号与主机发送转发面配置信息时携带的序列号相同,则节点的转发面配置信息发送成功;否则,节点的转发面配置信息发送失败。The judging unit judges whether the forwarding plane configuration information of the node is successfully sent as follows: judging whether the serial number carried when the standby machine returns the response is the same as the serial number carried when the master machine sends the forwarding plane configuration information, and the serial number carried when the standby machine returns the response If it is the same as the serial number carried when the host sends the forwarding plane configuration information, the node's forwarding plane configuration information is sent successfully; otherwise, the node's forwarding plane configuration information fails to be sent.
所述主机还包括检查单元,用于按照设置的检查周期周期性检查链表存储单元存储的链表中是否仍存在节点,并在存在节点时,通知转发面配置信息发送单元发送所述节点的转发面配置信息。The host also includes a checking unit, which is used to periodically check whether there are still nodes in the linked list stored in the linked list storage unit according to the set checking period, and when there is a node, notify the forwarding plane configuration information sending unit to send the forwarding plane of the node. configuration information.
本发明主备同步方法及系统,备机获取来自主机的转发面配置信息及备机发起的转发面配置信息后,对获取的配置信息进行过滤,滤去备机控制面发起的转发面配置信息,并根据来自主机的转发面配置信息进行转发面配置信息设置,从而实现主备转发面配置的实时同步。由于本发明避免了复杂的业务层语义同步,能够降低主备同步的复杂度;并且,基于本发明的主备同步方法,主备倒换时只有非常小的硬件时延,没有软件时延,能够提高主备倒换的可靠性。The master-standby synchronization method and system of the present invention, after the standby machine obtains the forwarding plane configuration information from the host machine and the forwarding plane configuration information initiated by the standby machine, filters the acquired configuration information to filter out the forwarding plane configuration information initiated by the standby machine's control plane , and set the forwarding plane configuration information according to the forwarding plane configuration information from the host, so as to realize the real-time synchronization of the active and standby forwarding plane configurations. Since the present invention avoids complicated semantic synchronization of the business layer, the complexity of master-standby synchronization can be reduced; and, based on the master-standby synchronization method of the present invention, there is only very small hardware delay and no software delay during master-standby switchover, which can Improve the reliability of active/standby switchover.
附图说明Description of drawings
图1为本发明主备同步方法流程示意图;Fig. 1 is a schematic flow chart of the master-standby synchronization method of the present invention;
图2为本发明主备同步系统结构示意图。Fig. 2 is a schematic structural diagram of the master-standby synchronization system of the present invention.
具体实施方式Detailed ways
本发明的基本思想是:备机获取来自主机的转发面配置信息及备机发起的转发面配置信息后,对获取的配置信息进行过滤,滤去备机控制面发起的转发面配置信息,并根据来自主机的转发面配置信息进行转发面配置信息设置,从而实现主备转发面配置的实时同步。The basic idea of the present invention is: after the standby machine obtains the forwarding plane configuration information from the host machine and the forwarding plane configuration information initiated by the standby machine, it filters the acquired configuration information, filters out the forwarding plane configuration information initiated by the standby machine's control plane, and The forwarding plane configuration information is set according to the forwarding plane configuration information from the host, so as to realize the real-time synchronization of the active and standby forwarding plane configurations.
下面结合附图对技术方案的实施作进一步的详细描述。The implementation of the technical solution will be further described in detail below in conjunction with the accompanying drawings.
图1为本发明主备同步方法流程示意图,如图1所示,本发明主备同步方法一般包括以下步骤:Figure 1 is a schematic flow chart of the master-standby synchronization method of the present invention, as shown in Figure 1, the master-standby synchronization method of the present invention generally includes the following steps:
步骤11:主机向备机发送需要同步的转发面配置信息。Step 11: The master sends the forwarding plane configuration information to be synchronized to the standby.
这里,主机具体根据其当前转发面配置的类型、功能、配置数据的索引向备机发送需要同步的转发面配置信息。Here, the master sends forwarding plane configuration information that needs to be synchronized to the standby machine according to its current forwarding plane configuration type, function, and index of configuration data.
一般情况下,并不需要对所有配置信息进行同步,主机只需要按照预先的设置对需要同步的配置类型进行监控即可。Generally, it is not necessary to synchronize all configuration information, and the host only needs to monitor the configuration types that need to be synchronized according to the preset settings.
步骤12:备机获取来自主机的转发面配置信息及备机发起的转发面配置信息。Step 12: The standby machine obtains the forwarding plane configuration information from the main machine and the forwarding plane configuration information initiated by the standby machine.
步骤13:备机对所述获取的配置信息进行过滤,滤去备机控制面发起的转发面配置信息。Step 13: The standby machine filters the obtained configuration information, and filters out the forwarding plane configuration information initiated by the control plane of the standby machine.
备机直接过滤掉其控制面主动发起的转发面配置信息,仅接收从主机上同步过来的转发面配置信息。The standby machine directly filters out the forwarding plane configuration information actively initiated by its control plane, and only receives the forwarding plane configuration information synchronized from the master.
步骤14:备机根据来自主机的转发面配置信息进行转发面配置信息设置。Step 14: The standby machine sets forwarding plane configuration information according to the forwarding plane configuration information from the master.
实际应用中,转发面配置可能是有时序依赖关系的,比如,配置类型A必须在配置类型B之前,因此,相应的配置信息同步到备机上后需要保证与主机上一样的转发面操作时序。In practical applications, the configuration of the forwarding plane may have timing dependencies. For example, configuration type A must precede configuration type B. Therefore, after the corresponding configuration information is synchronized to the standby machine, it is necessary to ensure the same forwarding plane operation timing as that on the master machine.
为了保证主备机的转发面时序一致,本发明提出了一种“同步链架构”,即主机以链表形式对需要同步的转发面配置信息进行组织,主机向备机发送转发明配置信息时,从链头开始依次发送链表中各节点的转发面配置信息,主机判定节点的转发面配置信息发送成功,则删除所述节点,再发送下一节点的转发面配置信息。In order to ensure that the timing of the forwarding planes of the active and standby machines is consistent, the present invention proposes a "synchronization chain architecture", that is, the host organizes the forwarding plane configuration information that needs to be synchronized in the form of a linked list, and when the host sends the forwarding plane configuration information to the standby machine, The forwarding plane configuration information of each node in the linked list is sent sequentially from the chain head, and the host determines that the forwarding plane configuration information of the node is sent successfully, then deletes the node, and then sends the forwarding plane configuration information of the next node.
需要说明的是,配置的新节点依次加入链尾,每次发送从链头开始发送。没发送成功不能发送后续节点,利用此机制即可保证主备同步的时序问题。另外,链表中一般仅记录配置的索引信息,无需记录实际数据,这样可以节约内存的使用。It should be noted that the configured new nodes are sequentially added to the end of the chain, and each transmission starts from the head of the chain. Subsequent nodes cannot be sent if the transmission is not successful. Using this mechanism can ensure the timing of the synchronization of the master and backup. In addition, generally only the configured index information is recorded in the linked list, and there is no need to record actual data, which can save memory usage.
为了保证主备同步的可靠性,本发明还可以引入以下两个机制:In order to ensure the reliability of the master-standby synchronization, the present invention can also introduce the following two mechanisms:
首先,对尚未发送的节点,如果又发生了数据更新,则依靠节点序列号机制进行可靠性保证。First of all, for nodes that have not yet sent data, if data updates occur again, the node serial number mechanism is used to ensure reliability.
具体的,主机为链表中的节点设置序列号,更新节点中需要同步的转发面配置信息时,将所述节点的序列号加一,所述主机向备机发送节点的转发面配置信息时携带所述节点的序列号,所述备机收到转发面配置信息后,向主机返回携带相应序列号的响应。Specifically, the host sets serial numbers for the nodes in the linked list, and when updating the forwarding plane configuration information in the node that needs to be synchronized, adds one to the serial number of the node, and the host sends the forwarding plane configuration information of the nodes to the standby machine with The serial number of the node. After receiving the configuration information of the forwarding plane, the standby device returns a response carrying the corresponding serial number to the master.
主机判断节点的转发面配置信息是否发送成功为:判断备机返回响应时携带的序列号是否与主机发送转发面配置信息时携带的序列号相同,备机返回响应时携带的序列号与主机发送转发面配置信息时携带的序列号相同,则节点的转发面配置信息发送成功;否则,节点的转发面配置信息发送失败。The master judges whether the forwarding plane configuration information of the node is sent successfully: judge whether the serial number carried when the standby machine returns the response is the same as the serial number carried when the master sends the forwarding plane configuration information, and the serial number carried when the standby machine returns the response is the same as that sent by the master machine. If the sequence numbers carried in the forwarding plane configuration information are the same, the node's forwarding plane configuration information is sent successfully; otherwise, the node's forwarding plane configuration information fails to be sent.
序列号的设计目的在于:同步链节点的主备同步过程和主机控制面对节点的操作过程是完全并发的,因此可能正在同步节点的时候,节点的配置又被控制面更新了,为了准确的判断节点的转发面配置信息是否同步完成,就要依靠节点的序列号来判断。The design purpose of the serial number is: the synchronization process of the master and backup nodes of the synchronization chain node and the operation process of the host control facing the node are completely concurrent, so it is possible that when the node is being synchronized, the configuration of the node is updated by the control plane, in order to accurately Judging whether the forwarding plane configuration information of a node is synchronized depends on the serial number of the node.
其次,对与同步过程中可能存在的信息丢失等可靠性问题,本发明通过周期定时检查机制来进行可靠性保证。Secondly, for reliability problems such as information loss that may exist in the synchronization process, the present invention uses a periodic timing inspection mechanism to ensure reliability.
具体的,主机设置检查周期,该方法还包括:主机按照所述检查周期周期性检查所述链表中是否仍存在节点,并在存在节点时,发送所述节点的转发面配置信息到备机。需要说明的是,主机从系统启动就开始进行周期性检查。Specifically, the host sets a check period, and the method further includes: the host periodically checks whether a node still exists in the linked list according to the check period, and when there is a node, sends the forwarding plane configuration information of the node to the standby machine. It should be noted that the host starts to perform periodic checks from the start of the system.
以二层交换机端口的转发面配置同步为例,二层交换机端口的操作包括设置端口物理属性,如光电口属性,以及速率双工配置等等,其中必须保证物理属性在备机上先设置,因为设置物理属性时会将其他配置设置为默认值,如速率双工。Taking the configuration synchronization of the forwarding plane of a Layer 2 switch port as an example, the operation of a Layer 2 switch port includes setting the physical properties of the port, such as the properties of the optical port, and the speed and duplex configuration. Setting physical properties sets other configurations to default values, such as speed duplex.
当主机发起物理端口属性配置且判定此操作是需要同步的配置类型,则记录端口索引信息,将其插入同步链尾部。后续控制面再发起速率双工配置时,也插入同步链尾部。之后,主机发送链头配置到备机;备机配置完后,发送响应给主机;主机收到回应后,通过比对判定序列号一致,认为同步正常,则发送下一个配置节点。如果消息丢失,主机根据可靠性保证单元的周期性发送机制,会发送当前的链头节点到备机。When the host initiates physical port attribute configuration and determines that this operation is a configuration type that needs to be synchronized, it records the port index information and inserts it at the end of the synchronization chain. When the subsequent control plane initiates rate duplex configuration, it will also be inserted at the end of the synchronization chain. Afterwards, the master sends the chain head configuration to the standby machine; after the standby machine is configured, it sends a response to the master; after the master receives the response, it judges that the serial numbers are consistent through comparison, and if the synchronization is normal, it sends the next configuration node. If the message is lost, the master will send the current chain head node to the backup according to the periodic sending mechanism of the reliability assurance unit.
图2为本发明主备同步系统结构示意图,如图2所示,本发明主备同步系统包括主机21和备机22,备机22包括:转发面配置信息获取单元221、转发面配置信息发起单元222、过滤单元223、设置单元224,其中,Fig. 2 is a schematic structural diagram of the active/standby synchronization system of the present invention. As shown in Fig. 2 , the active/standby synchronization system of the present invention includes a
转发面配置信息获取单元221,用于获取来自主机的转发面配置信息及转发面配置信息发起单元222发起的转发面配置信息;The forwarding plane configuration information acquisition unit 221 is configured to acquire the forwarding plane configuration information from the host and the forwarding plane configuration information initiated by the forwarding plane configuration information initiation unit 222;
转发面配置信息发起单元222,用于发起转发面配置信息,转发面配置信息发起单元一般根据备机固有的逻辑发起转发面配置信息;The forwarding plane configuration information initiating unit 222 is configured to initiate the forwarding plane configuration information, and the forwarding plane configuration information initiating unit generally initiates the forwarding plane configuration information according to the inherent logic of the standby machine;
过滤单元223,用于对转发面配置信息获取单元221获取的配置信息进行过滤,滤去备机控制面发起的转发面配置信息,并将来自主机的转发面配置信息发送到设置单元224;The
设置单元224,用于根据来自过滤单元223的转发面配置信息进行转发面配置信息设置。The
主机21包括转发面配置信息发送单元211,用于根据其当前转发面配置的类型、功能、配置数据的索引向备机22发送需要同步的转发面配置信息。The
主机21还包括:链表存储单元212和判断单元213,The
链表存储单元212,用于以链表形式对需要同步的转发面配置信息进行存储;以及根据判断单元213的通知,对存储的链表进行维护;The linked
转发面配置信息发送单元211,还用于根据判断单元213的通知以及链表存储单元中存储的链表依次发送各节点的转发面配置信息;The forwarding plane configuration
判断单元213,用于在判定开始发送转发面配置信息时,通知转发面配置信息发送单元211发送链表中节点的转发面配置信息;以及判断节点的转发面配置信息是否发送成功,判定节点的转发面配置信息发送成功,则通知链表存储单元212删除所述节点,并通知转发面配置信息发送单元211发送链表中下一节点的转发面配置信息。The judging
主机21还包括转发面配置信息更新单元214,备机22还包括响应单元225,The
转发面配置信息更新单元214,用于对链表存储单元212中存储的转发面配置信息进行更新;A forwarding plane configuration information update unit 214, configured to update the forwarding plane configuration information stored in the linked
链表存储单元212,还用于存储链表中节点的序列号,并在转发面配置信息更新单元214更新节点中需要同步的转发面配置信息时,将所述节点的序列号加一;The linked
转发面配置信息发送单元211,还用于在向备机22发送节点的转发面配置信息时携带所述节点的序列号;The forwarding plane configuration
响应单元225,用于在转发面配置信息获取单元221收到转发面配置信息后,向主机21返回携带相应序列号的响应;The
判断单元213判断节点的转发面配置信息是否发送成功为:判断备机返回响应时携带的序列号是否与主机发送转发面配置信息时携带的序列号相同,备机返回响应时携带的序列号与主机发送转发面配置信息时携带的序列号相同,则节点的转发面配置信息发送成功;否则,节点的转发面配置信息发送失败。The judging
主机21还包括检查单元215,用于按照设置的检查周期周期性检查链表存储单元存储的链表中是否仍存在节点,并在存在节点时,通知转发面配置信息发送单元211发送所述节点的转发面配置信息。The
可以看出,本发明依靠在转发面配置中进行监控及同步,由于转发面的配置是很单纯简单的,没有复杂的控制面语义,这样可以避免复杂的控制面数据主备同步,同时保障了同步的可靠性和实时性,主备倒换速度得到大大提高,只有非常小的硬件时延而已。It can be seen that the present invention relies on monitoring and synchronization in the configuration of the forwarding plane. Since the configuration of the forwarding plane is very simple and does not have complex control plane semantics, it can avoid complex master-backup synchronization of control plane data, and at the same time ensure The reliability and real-time performance of synchronization, the speed of master-standby switchover has been greatly improved, and there is only a very small hardware delay.
以上所述,仅为本发明的较佳实施例而已,并非用于限定本发明的保护范围。The above descriptions are only preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention.
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910224254.0ACN102075341B (en) | 2009-11-25 | 2009-11-25 | Method and system for main-standby synchronization |
| PCT/CN2010/078889WO2011063725A1 (en) | 2009-11-25 | 2010-11-18 | Method and system for active-standby synchronization |
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN200910224254.0ACN102075341B (en) | 2009-11-25 | 2009-11-25 | Method and system for main-standby synchronization |
| Publication Number | Publication Date |
|---|---|
| CN102075341Atrue CN102075341A (en) | 2011-05-25 |
| CN102075341B CN102075341B (en) | 2015-06-10 |
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN200910224254.0AActiveCN102075341B (en) | 2009-11-25 | 2009-11-25 | Method and system for main-standby synchronization |
| Country | Link |
|---|---|
| CN (1) | CN102075341B (en) |
| WO (1) | WO2011063725A1 (en) |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103077242A (en)* | 2013-01-11 | 2013-05-01 | 北京佳讯飞鸿电气股份有限公司 | Method for hot standby of dual database servers |
| CN105007293A (en)* | 2015-05-25 | 2015-10-28 | 国家计算机网络与信息安全管理中心 | Dual-master network system and double-writing method for service requests in the system |
| WO2016177231A1 (en)* | 2015-07-10 | 2016-11-10 | 中兴通讯股份有限公司 | Dual-control-based active-backup switching method and device |
| CN106169964A (en)* | 2016-09-28 | 2016-11-30 | 杭州迪普科技有限公司 | Network equipments configuration synchronous method and device |
| CN107274827A (en)* | 2017-05-04 | 2017-10-20 | 西安诺瓦电子科技有限公司 | Displaying screen controller backup method and device |
| CN108933873A (en)* | 2018-06-08 | 2018-12-04 | 新华三技术有限公司 | A kind of synchronous method and device of user data |
| CN112455496A (en)* | 2020-10-26 | 2021-03-09 | 中国铁道科学研究院集团有限公司通信信号研究所 | Railway signal system safety communication connection dynamic switching method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108833280B (en)* | 2018-03-19 | 2020-02-04 | 新华三信息安全技术有限公司 | User management table item issuing method and device and control plane equipment |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2002091203A1 (en)* | 2001-05-03 | 2002-11-14 | Nokia Inc. | Method and system for implementing mpls redundancy |
| US6694450B1 (en)* | 2000-05-20 | 2004-02-17 | Equipe Communications Corporation | Distributed process redundancy |
| CN101110706A (en)* | 2007-07-23 | 2008-01-23 | 中兴通讯股份有限公司 | Configuration data synchronization method |
| US7453797B2 (en)* | 2004-09-29 | 2008-11-18 | Intel Corporation | Method to provide high availability in network elements using distributed architectures |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6694450B1 (en)* | 2000-05-20 | 2004-02-17 | Equipe Communications Corporation | Distributed process redundancy |
| WO2002091203A1 (en)* | 2001-05-03 | 2002-11-14 | Nokia Inc. | Method and system for implementing mpls redundancy |
| US7453797B2 (en)* | 2004-09-29 | 2008-11-18 | Intel Corporation | Method to provide high availability in network elements using distributed architectures |
| CN101110706A (en)* | 2007-07-23 | 2008-01-23 | 中兴通讯股份有限公司 | Configuration data synchronization method |
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN103077242A (en)* | 2013-01-11 | 2013-05-01 | 北京佳讯飞鸿电气股份有限公司 | Method for hot standby of dual database servers |
| CN103077242B (en)* | 2013-01-11 | 2016-03-09 | 北京佳讯飞鸿电气股份有限公司 | The method of a kind of fulfillment database server two-node cluster hot backup |
| CN105007293A (en)* | 2015-05-25 | 2015-10-28 | 国家计算机网络与信息安全管理中心 | Dual-master network system and double-writing method for service requests in the system |
| WO2016177231A1 (en)* | 2015-07-10 | 2016-11-10 | 中兴通讯股份有限公司 | Dual-control-based active-backup switching method and device |
| CN106341251A (en)* | 2015-07-10 | 2017-01-18 | 中兴通讯股份有限公司 | Master and slave switching method and device based on dual master control |
| CN106169964A (en)* | 2016-09-28 | 2016-11-30 | 杭州迪普科技有限公司 | Network equipments configuration synchronous method and device |
| CN106169964B (en)* | 2016-09-28 | 2019-05-07 | 杭州迪普科技股份有限公司 | Network equipments configuration synchronous method and device |
| CN107274827A (en)* | 2017-05-04 | 2017-10-20 | 西安诺瓦电子科技有限公司 | Displaying screen controller backup method and device |
| CN107274827B (en)* | 2017-05-04 | 2020-05-19 | 西安诺瓦星云科技股份有限公司 | Display screen controller backup method and device |
| CN108933873A (en)* | 2018-06-08 | 2018-12-04 | 新华三技术有限公司 | A kind of synchronous method and device of user data |
| CN112455496A (en)* | 2020-10-26 | 2021-03-09 | 中国铁道科学研究院集团有限公司通信信号研究所 | Railway signal system safety communication connection dynamic switching method |
| CN112455496B (en)* | 2020-10-26 | 2023-02-17 | 中国铁道科学研究院集团有限公司通信信号研究所 | Railway signal system safety communication connection dynamic switching method |
| Publication number | Publication date |
|---|---|
| CN102075341B (en) | 2015-06-10 |
| WO2011063725A1 (en) | 2011-06-03 |
| Publication | Publication Date | Title |
|---|---|---|
| CN102075341B (en) | Method and system for main-standby synchronization | |
| CN104504062A (en) | Data synchronization method and device of primary and standby databases | |
| US9934242B2 (en) | Replication of data between mirrored data sites | |
| US9477738B2 (en) | Initialization protocol for a peer-to-peer replication environment | |
| CN108696595A (en) | Distributed type assemblies method of data synchronization, master node, slave node, system and medium | |
| CN102752093B (en) | Based on the data processing method of distributed file system, equipment and system | |
| WO2017177941A1 (en) | Active/standby database switching method and apparatus | |
| CN103902405B (en) | Quasi-continuity data copying method and device | |
| WO2020134199A1 (en) | Method and apparatus for implementing data consistency, and server and terminal | |
| WO2014059804A1 (en) | Method and system for data synchronization | |
| CN102098342A (en) | Transaction level-based data synchronizing method, device thereof and system thereof | |
| CN105159795A (en) | Data synchronization method, apparatus and system | |
| CN107729515B (en) | Data synchronization method, device and storage medium | |
| CN105512171A (en) | Database synchronizing method and apparatus | |
| CN111427728A (en) | State management method, main/standby switching method and electronic equipment | |
| CN117827544B (en) | Hot backup system, method, electronic device and storage medium | |
| CN103384211B (en) | Data manipulation method with fault tolerance and distributed type data storage system | |
| CN112783694B (en) | Long-distance disaster recovery method for high-availability Redis | |
| EP2542976A1 (en) | Method and apparatus of backing-up subversion repository | |
| CN113515574A (en) | Data synchronization method and device | |
| CN118796932A (en) | Data synchronization method, device, equipment and storage medium | |
| CN115129521A (en) | Data synchronization method, device and system between Redis clusters | |
| CN101719837A (en) | Clock board, network system suitable for server and clock switching method | |
| CN102929560A (en) | Disk array system capable of being dynamically adjusted and method for adjusting same | |
| CN110825758A (en) | Transaction processing method and device |
| Date | Code | Title | Description |
|---|---|---|---|
| C06 | Publication | ||
| PB01 | Publication | ||
| C10 | Entry into substantive examination | ||
| SE01 | Entry into force of request for substantive examination | ||
| C14 | Grant of patent or utility model | ||
| GR01 | Patent grant |