Main and standby switching method of stateful network element and disaster recovery system
By implementing the main and standby switching method of stateful network elements in cloud computing, the business interruption problem caused by network element server failure is solved, and smooth switching between the main and backup network elements is realized, ensuring the continuity of services.
Patent Information
- Application Number
- CN202411750866.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-02
- Publication Date
- 2025-02-25
AI Technical Summary
In cloud computing, when a network element server fails, it will cause the customer service session connection to be interrupted, and it is difficult for the existing technology to achieve smooth switching between the main network element and the backup network element, resulting in discontinuity of services.
It provides a master-subsidy switching method for stateful network elements. By marking the backup network element as the main network element and writing the synchronized session connection into the kernel, cleaning up and discarding the address resolution protocol message rules, and controlling the backup network element to issue free address resolution protocol messages, thereby realizing smooth switching between the main network element and the backup network element.
It avoids interruptions in customer services and loss of session connections, ensures service continuity, and realizes smooth switching between main network elements and backup network elements.
Smart Images

Figure CN119520243A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of stateful network elements, and in particular to a method for switching between active and standby stateful network elements and a disaster recovery system. Background Art
[0002] Network elements are important basic facilities in cloud computing. Today, cloud computing has very flexible and changeable requirements for network elements. Generally, general servers are used as the operating carriers of network elements, which are dynamically created and destroyed according to customer needs. In the event of a failure in the server where the network element is located, the customer services carried by the network element will be interrupted, resulting in discontinuity of service and even loss of session information. Summary of the invention
[0003] Based on this, it is necessary to provide a method for master-slave switching of stateful network elements and a disaster recovery system that can achieve smooth switching of master network elements and backup network elements in response to the above technical problems.
[0004] In a first aspect, the present application provides a method for active / standby switching of a stateful network element, including:
[0005] The standby network element pointed to by the network element switching instruction is marked as the main network element; wherein the network element switching instruction is used to indicate a network element server with a fault; the main network element is a network element that carries a customer service session connection, the standby network element is a network element cloned and backed up based on the main network element, and the standby network element is configured with a rule for discarding address resolution protocol messages, and the main network element and the standby network element run on different network element servers; the rule for discarding address resolution protocol messages is characterized by a request for discarding a session connection;
[0006] Write the session connection synchronized to the standby network element into the kernel, clear the rules for discarding address resolution protocol messages of the standby network element, control the standby network element to send free address resolution protocol messages, and configure the rules for discarding address resolution protocol messages for the main network element.
[0007] In one of the embodiments, the active / standby switching method of the stateful network element further includes:
[0008] Detect the working status of all network element servers and output network element switching instructions when there is a faulty network element server.
[0009] In one of the embodiments, the active / standby switching method of the stateful network element further includes:
[0010] Synchronize the session connection running in the primary network element to the corresponding backup network element, and output a synchronization state ready signal when detecting that the current synchronization state process meets the synchronization state condition;
[0011] The synchronization state condition is determined according to the number of session connections synchronized to the standby network element and the number of active session connections on the primary network element;
[0012] The step of marking the standby network element pointed to by the network element switching instruction as the primary network element includes:
[0013] When a network element switching instruction and a synchronization state ready signal are detected, the standby network element pointed to by the network element switching instruction is marked as a primary network element.
[0014] In one of the embodiments, the active / standby switching method of the stateful network element further includes:
[0015] Detect the load status of all network element servers;
[0016] In case of load imbalance, rebuild the backup network element on the target server;
[0017] When receiving a synchronization state ready signal, output a network element switching instruction;
[0018] The target server is a load-balanced network element server.
[0019] In one of the embodiments, the network element switching instruction includes an instruction generated and sent by the user terminal in response to the user's network element switching operation.
[0020] In one of the embodiments, after the step of configuring the master network element to discard the address resolution protocol message rule, the master-slave switching method of the stateful network element further includes:
[0021] Destroy the backup network element and clone and back up the primary network element on other servers to generate a new backup network element.
[0022] Among them, the other servers are any network element servers other than the network element server corresponding to the standby network element and the network element server corresponding to the main network element before the standby network element is destroyed.
[0023] In one of the embodiments, the active / standby switching method of the stateful network element further includes:
[0024] In response to the backup network element upgrade instruction, the backup network element is software upgraded, and after the software upgrade is completed, the backup network element undergoing software upgrade is marked as a primary network element, and a primary-standby switching signal is output.
[0025] In one of the embodiments, the active / standby switching method of the stateful network element further includes:
[0026] When a destroy creation event is detected for a master network element, a state synchronization process between the master network element where the destroy creation event occurs and a corresponding standby network element is initialized.
[0027] In one embodiment, the synchronization state condition is:
[0028]
[0029] Wherein, n is the number of session connections synchronized to the standby network element, N is the number of active session connections on the primary network element, and k is the threshold factor.
[0030] In a second aspect, a disaster recovery system includes a cloud computing server, wherein the cloud computing server stores a computer program, and when the cloud computing server executes the computer program, it executes any step of the above-mentioned active-standby switching method of the stateful network element.
[0031] The above-mentioned active-standby switching method and disaster recovery system of the stateful network element marks the standby network element pointed to by the network element switching instruction as the active network element, then writes the session connection synchronized to the standby network element into the kernel, and after clearing the discarding address resolution protocol message rule of the standby network element, controls the standby network element to send a free address resolution protocol message to switch the standby network element to the new active network element, and then configures the discarding address resolution protocol message rule for the original active network element to switch the active network element to the new standby network element. In the above-mentioned active-standby switching method of the stateful network element, the original standby network element is first switched to the active network element, which can avoid the interruption of customer services and the loss of session connections, thereby ensuring the continuity of services and realizing the smooth switching of the active network element to the standby network element. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 An application environment diagram of a method for switching a stateful network element between a master and a slave in an embodiment;
[0034] Figure 2 A schematic diagram of a process flow of a method for switching between a stateful network element and a standby network element in an embodiment;
[0035] Figure 3 One of the structural block diagrams of a master-slave switching device of a stateful network element in an embodiment;
[0036] Figure 4 The second structural block diagram of the active / standby switching device of a stateful network element in an embodiment;
[0037] Figure 5 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0038] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0039] The active / standby switching method of a stateful network element provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown. The main network element runs in server A, and the standby network element corresponding to the main network element runs in server B. When the cloud computing server receives the network element switching instruction, it marks the standby network element pointed to by the network element switching instruction as the main network element, and then writes the session connection synchronized to the standby network element into the kernel, cleans up the discard address resolution protocol message rule of the standby network element, and controls the standby network element to send a free address resolution protocol message to notify other devices in the network of the IP address and MAC address currently used by the standby network element, so as to switch the standby network element to the new main network element, and then configure the discard address resolution protocol message rule for the main network element to switch the original main network element to the new standby network element.
[0040] In an exemplary embodiment, Figure 2 As shown, a method for active / standby switching of a stateful network element is provided, comprising:
[0041] S202, marking the backup network element pointed to by the network element switching instruction as the primary network element; wherein the network element switching instruction is used to characterize a faulty network element server; the primary network element is the network element that carries the customer service session connection, the backup network element is the network element cloned and backed up based on the primary network element, and the backup network element is configured with a rule for discarding address resolution protocol messages, and the primary network element and the backup network element run on different network element servers; the rule for discarding address resolution protocol messages is characterized by a request to discard the session connection.
[0042] S204, writing the session connection synchronized to the standby network element into the kernel, clearing the standby network element's discarding address resolution protocol message rule, controlling the standby network element to send free address resolution protocol messages, and configuring the master network element's discarding address resolution protocol message rule.
[0043] In the case of a network element switching instruction, it indicates that the main network element pointed to by the network element switching instruction needs to be switched to a new backup network element, and the backup network element corresponding to the main network element pointed to by the network element switching instruction needs to be switched to the new main network element. To ensure service continuity, the backup network element pointed to by the network element switching instruction is first switched to the main network element, so that the new main network element can carry customer services.
[0044] Specifically, the backup network element pointed to by the network element switching instruction is first marked as the primary network element, so as to mark the backup network element for subsequent configuration. Then the session connection that has been synchronized to the backup network element is written into the kernel to ensure the synchronization of the session connection. After clearing the discard address resolution protocol message rules of the backup network element, the backup network element is controlled to send a free address resolution protocol message to notify other devices in the network of the IP address and MAC address currently used by the backup network element, thereby completing the step of switching the backup network element to the new primary network element. Then, the discard address resolution protocol message rule is configured for the primary network element pointed to by the network element switching instruction to discard the request for the session connection, no longer carry customer services, and switch to the new backup network element.
[0045] Therefore, the above-mentioned active-standby switching method of the stateful network element marks the standby network element pointed to by the network element switching instruction as the active network element, and then writes the session connection synchronized to the standby network element into the kernel, and after clearing the discarding address resolution protocol message rule of the standby network element, controls the standby network element to send a free address resolution protocol message to switch the standby network element to the new active network element, and then configures the discarding address resolution protocol message rule for the original active network element to switch the active network element to the new standby network element. In the above-mentioned active-standby switching method of the stateful network element, the original standby network element is first switched to the active network element, which can avoid the interruption of customer services and the loss of session connections, thereby ensuring the continuity of services and realizing the smooth switching of the active network element to the standby network element.
[0046] In an exemplary embodiment, the above-mentioned active / standby switching method of the stateful network element further includes:
[0047] Detect the working status of all network element servers and output network element switching instructions when there is a faulty network element server.
[0048] There are multiple network element servers in the cloud computing server. All of these network element servers are tested. When there is a faulty network element server, it can be considered that there may be an interruption in carrying customer services or even loss of session information. Therefore, a network element switching instruction is output at this time, and the network element switching instruction is directed to the faulty network element server. The main network element and the backup network element of the faulty network element server can be switched to ensure service continuity.
[0049] In an exemplary embodiment, the above-mentioned active / standby switching method of the stateful network element further includes:
[0050] The session connection running in the primary network element is synchronized to the corresponding standby network element, and when it is detected that the current synchronization state process meets the synchronization state condition, a synchronization state ready signal is output.
[0051] The synchronization state condition is determined according to the number of session connections synchronized to the standby network element and the number of active session connections on the primary network element.
[0052] The session connection running in the primary network element is synchronized to the corresponding backup network element in real time to ensure the consistency of the primary network element and the backup network element, so that the primary network element and the backup network element can be switched at any time when the session connection is synchronized.
[0053] The step of marking the standby network element pointed to by the network element switching instruction as the primary network element includes:
[0054] When a network element switching instruction and a synchronization state ready signal are detected, the standby network element pointed to by the network element switching instruction is marked as a primary network element.
[0055] When the synchronization state ready signal is detected, it indicates that the session connection between the primary network element and the backup network element can be kept synchronized, and switching between the primary network element and the backup network element can ensure service continuity.
[0056] In an exemplary embodiment, the above-mentioned active / standby switching method of the stateful network element further includes:
[0057] Check the load status of all network element servers.
[0058] In the event of load imbalance, rebuild the backup network element on the target server.
[0059] When receiving the synchronization state ready signal, a network element switching instruction is output.
[0060] The target server is a load-balanced network element server.
[0061] The main network elements running on the network element servers with unbalanced loads are switched to the network element servers with balanced loads, thereby ensuring that all the main network elements can work normally, avoiding interruption of customer services, and thus ensuring service continuity.
[0062] In an exemplary embodiment, the network element switching instruction includes an instruction generated and sent by the user terminal in response to the user's network element switching operation.
[0063] The user can actively perform network element switching operations from the user end to issue network element switching instructions, so that when the user finds that any network element server in the cloud computing server has signs of possible failure, the user can actively switch the main network element and the backup network element, thereby improving the reliability of the main-backup switching method of the stateful network element.
[0064] The network element switching operation may be performed by a user through a touch operation, a voice control command operation, or the like based on a user terminal.
[0065] In an exemplary embodiment, after the step of configuring the master network element to discard the address resolution protocol message rule, the method further includes:
[0066] Destroy the backup NE and clone the primary NE on another server to generate a new backup NE.
[0067] Among them, the other servers are any network element servers other than the network element server corresponding to the standby network element and the network element server corresponding to the main network element before the standby network element is destroyed.
[0068] After switching between the primary network element and the backup network element, the network element server where the new backup network element is located has problems such as failure or load imbalance. Therefore, the backup network element is destroyed, and then a clone backup is performed based on the new primary network element on other network element servers that are in normal operation to generate a new backup network element to complete the replacement of the backup network element.
[0069] In an exemplary embodiment, the above-mentioned active / standby switching method of the stateful network element further includes:
[0070] In response to the backup network element upgrade instruction, the backup network element is software upgraded, and after the software upgrade is completed, the backup network element undergoing software upgrade is marked as a primary network element, and a primary-standby switching signal is output.
[0071] The software of the backup network element can be selectively upgraded. After the software upgrade of the backup network element is completed, the main network element and the backup network element are switched for the backup network element. After the switch is completed, the new backup network element will be synchronized based on the new main network element. The synchronized new backup network element is also software upgraded, thereby realizing rolling upgrade.
[0072] In an exemplary embodiment, the above-mentioned active / standby switching method of the stateful network element further includes:
[0073] When a destroy creation event is detected for a master network element, a state synchronization process between the master network element where the destroy creation event occurs and a corresponding standby network element is initialized.
[0074] The above-mentioned destruction and creation events include the destruction event of the main network element and the creation event of the main network element. Therefore, in the event of destruction and creation events of the main network element, the status synchronization process between the main network element and the backup network element is initiated in time to ensure that the main network element and the backup network element are synchronized at all times and prepare for the switching of the main network element and the backup network element.
[0075] In an exemplary embodiment, the synchronization status condition is:
[0076]
[0077] Wherein, n is the number of session connections synchronized to the standby network element, N is the number of active session connections on the primary network element, and k is the threshold factor.
[0078] During the synchronization process between the primary network element and the backup network element, if the number of session connections in the primary network element is inconsistent with the number of session connections in the backup network element, and the primary network element is always carrying new customer services, then when the number of session connections synchronized to the backup network element and the number of active session connections on the primary network element satisfy the above relationship, it can be considered that the synchronization state condition is met, and the primary network element and the backup network element can be switched. The threshold factor can be determined based on the number of active session connections on the primary network element. For example, when N is 100, k can be 0.8; when the order of magnitude of N reaches 10,000, k can be 0.98.
[0079] The active session connection on the above-mentioned master network element is an unfinished session connection of the client based on a transport layer protocol such as TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
[0080] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0081] Based on the same inventive concept, the embodiment of the present application also provides a stateful network element master-slave switching device for implementing the above-mentioned stateful network element master-slave switching method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiments of the master-slave switching device for one or more stateful network elements provided below can refer to the limitations of the master-slave switching method for stateful network elements above, and will not be repeated here.
[0082] In an exemplary embodiment, Figure 3 As shown, a stateful network element active / standby switching device 300 is provided, comprising: a network element active / standby control module 302 and a network element rule setting module 304 connected to each other, wherein:
[0083] The network element master-slave control module 302 is used to mark the standby network element pointed to by the network element switching instruction as the master network element; wherein, the network element switching instruction is used to characterize a faulty network element server; the master network element is the network element that carries the customer service session connection, the standby network element is the network element cloned and backed up based on the master network element, and the standby network element is configured with a rule for discarding address resolution protocol messages, and the master network element and the standby network element run on different network element servers; the rule for discarding address resolution protocol messages is characterized by a request to discard the session connection.
[0084] The network element rule setting module 304 is used to write the session connection synchronized to the standby network element into the kernel, clear the standby network element's discarding address resolution protocol message rules, control the standby network element to send free address resolution protocol messages, and configure the master network element's discarding address resolution protocol message rules.
[0085] In an exemplary embodiment, Figure 4 As shown, the above-mentioned active / standby switching device 300 of the stateful network element further includes: a network element intelligent scheduling module 306 connected to the network element active / standby control module 302 .
[0086] The network element intelligent scheduling module 306 is used to detect the working status of all network element servers and output a network element switching instruction when there is a faulty network element server.
[0087] In an exemplary embodiment, Figure 4 As shown, the above-mentioned active / standby switching device 300 of a stateful network element further includes: a network element state synchronization module 308 connected to the network element active / standby control module 302 .
[0088] The network element state synchronization module 308 is used to synchronize the session connection running in the primary network element to the corresponding backup network element, and output a synchronization state ready signal when it is detected that the current synchronization state process meets the synchronization state condition.
[0089] The synchronization state condition is determined according to the number of session connections synchronized to the standby network element and the number of active session connections on the primary network element.
[0090] The network element active / standby control module 302 is further configured to mark the standby network element pointed to by the network element switching instruction as the active network element when a network element switching instruction and a synchronization state ready signal are detected.
[0091] In an exemplary embodiment, the above-mentioned network element intelligent scheduling module 306 is also used to detect the load status of all network element servers; in the case of load imbalance, rebuild the backup network element on the target server; when receiving the synchronization status ready signal, output the network element switching instruction; wherein, the target server is a load-balanced network element server.
[0092] In an exemplary embodiment, Figure 4 As shown, the above-mentioned active / standby switching device 300 of the stateful network element further includes: a network element manual scheduling module 310 connected to the network element active / standby control module 302 .
[0093] The network element manual scheduling module 310 is used to generate and send a network element switching instruction in response to a user's network element switching operation.
[0094] In an exemplary embodiment, the above-mentioned network element master-slave control module 302 is also used to destroy the standby network element, and clone and back up the master network element on other servers to generate a new standby network element; wherein the other servers are any network element servers other than the network element server corresponding to the standby network element and the network element server corresponding to the master network element before the standby network element is destroyed.
[0095] In an exemplary embodiment, the network element active-standby control module 302 is also used to perform software upgrades on the standby network element in response to a standby network element upgrade instruction, and after the software upgrade is completed, mark the standby network element undergoing software upgrade as the active network element and output an active-standby switching signal.
[0096] In an exemplary embodiment, the network element state synchronization module 308 is further configured to, when monitoring a primary network element where a destroy create event occurs, initialize a state synchronization process between the primary network element where the destroy create event occurs and a corresponding backup network element.
[0097] In an exemplary embodiment, the synchronization state condition is:
[0098]
[0099] Wherein, n is the number of session connections synchronized to the standby network element, N is the number of active session connections on the primary network element, and k is the threshold factor.
[0100] Each module in the active / standby switching device of the stateful network element can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0101] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store rules for discarding address resolution protocol messages. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a master-slave switching method of a stateful network element is implemented.
[0102] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0103] In an exemplary embodiment, a disaster recovery system is provided, including a cloud computing server, wherein the cloud computing server stores a computer program, and when executing the computer program, the cloud computing server performs the steps of any one of the above-mentioned methods for master-slave switching of stateful network elements.
[0104] The cloud computing server equipped with the active-standby switching method of the stateful network element can smoothly switch the active network element and the standby network element in time when a network element server fails, thereby improving the disaster recovery capability of the cloud computing server.
[0105] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor executes the steps of any one of the above-mentioned methods for active / standby switching of stateful network elements.
[0106] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps of any one of the above-mentioned methods for active-standby switching of stateful network elements are implemented.
[0107] In one embodiment, a computer program product is provided, including a computer program, which, when executed by a processor, implements the steps of any one of the above-mentioned methods for active-standby switching of stateful network elements.
[0108] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.
[0109] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.
[0110] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.
Claims
1. A method for switching between active and standby stateful network elements, characterized in that: include: Marking the standby network element pointed to by the network element switching instruction as the main network element; wherein the network element switching instruction is used to indicate a network element server with a fault; The primary network element is a network element that carries a customer service session connection, the backup network element is a network element that is cloned and backed up based on the primary network element, and the backup network element is configured with a rule for discarding an address resolution protocol message, and the primary network element and the backup network element run on different network element servers; the rule for discarding an address resolution protocol message is characterized by a request to discard the session connection; The session connection synchronized to the standby network element is written into the kernel, the address resolution protocol message discarding rule of the standby network element is cleared, the standby network element is controlled to send free address resolution protocol messages, and the address resolution protocol message discarding rule is configured for the main network element.
2. The method for active / standby switching of a stateful network element according to claim 1, characterized in that: Also includes: The working status of all network element servers is detected, and when there is a faulty network element server, the network element switching instruction is output.
3. The method for active / standby switching of a stateful network element according to claim 2, characterized in that: Also includes: Synchronize the session connection running in the primary network element to the corresponding backup network element, and output a synchronization state ready signal when detecting that the current synchronization state process meets the synchronization state condition; The synchronization state condition is determined according to the number of session connections synchronized to the standby network element and the number of active session connections on the primary network element; The step of marking the standby network element pointed to by the network element switching instruction as the primary network element comprises: When the network element switching instruction and the synchronization state ready signal are detected, the standby network element pointed to by the network element switching instruction is marked as a primary network element.
4. The method for active / standby switching of a stateful network element according to claim 3, characterized in that: Also includes: Detect the load status of all network element servers; In case of load imbalance, rebuild the backup network element on the target server; When receiving the synchronization state ready signal, outputting the network element switching instruction; Wherein, the target server is a load-balanced network element server.
5. The method for active / standby switching of a stateful network element according to claim 3, characterized in that: The network element switching instruction includes an instruction generated and sent by the user terminal in response to the user's network element switching operation.
6. The method for active / standby switching of a stateful network element according to claim 1, characterized in that: After the step of configuring the address resolution protocol message discarding rule for the primary network element, the method further includes: Destroying the standby network element, and cloning and backing up the main network element on other servers to generate a new standby network element; The other server is any network element server other than the network element server corresponding to the standby network element and the network element server corresponding to the primary network element before the standby network element is destroyed.
7. The method for active / standby switching of a stateful network element according to claim 1, characterized in that: Also includes: In response to the backup network element upgrade instruction, the backup network element is software upgraded, and after the software upgrade is completed, the backup network element undergoing software upgrade is marked as a primary network element, and a primary-standby switching signal is output.
8. The method for active / standby switching of a stateful network element according to claim 3, characterized in that: Also includes: When a destroy creation event is detected for a master network element, a state synchronization process between the master network element where the destroy creation event occurs and a corresponding standby network element is initialized.
9. The method for active / standby switching of a stateful network element according to claim 3, characterized in that: The synchronization status conditions are: Wherein, n is the number of session connections synchronized to the standby network element, N is the number of active session connections on the primary network element, and k is a threshold factor.
10. A disaster recovery system, characterized in that: It includes a cloud computing server, which stores a computer program. When executing the computer program, the cloud computing server performs the steps of the active-standby switching method of the stateful network element as described in any one of claims 1 to 9.
Citation Information
Patent Citations
A disaster tolerance switching method, system and apparatus
CN101426306A
SCTP protocol stack synchronization method and device
CN114978872A
Network element switching method and communication system
CN115802436A
Network element switching method and device, cross-device link aggregation group and storage medium
CN117376243A