A process-level dual-machine hot standby redundant system and method
By adopting a process-level dual-machine hot standby redundant system in the rail transit operation monitoring system, and using dual heartbeat lines and watchdog processes for process-level monitoring and switching, the problems of large granularity and difficulty in fault location in the existing technology are solved, and equipment utilization efficiency and system reliability are improved.
Patent Information
- Application Number
- CN202011026775.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-09-25
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2040-09-25
AI Technical Summary
The dual-machine hot standby redundancy technology used in the existing rail transit operation monitoring system has a large granularity, making it difficult to achieve process-level fault location of application software, and the utilization efficiency of physical equipment is low.
The process-level dual-machine hot standby redundant system is adopted, and two identical devices are connected through dual heartbeats. The watchdog process is configured for communication and monitoring. The process management mode is selected to realize a single process mode, process group mode or process group cluster management mode. The host and standby status are accurately determined, and automatic switching is performed when a fault occurs.
It realizes accurate monitoring and fault location of application software process status, improves the utilization efficiency of physical equipment, and ensures high reliability and availability of the system through process-level redundant switching.
Smart Images

Figure CN112346925B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of automation control technology, and in particular to a process-level dual-machine hot standby redundant system and method. Background Art
[0002] The rail transit operation monitoring system includes the train automatic monitoring subsystem of the signal system, the integrated monitoring system, the passenger information system, the passenger broadcasting system, the video monitoring system, the power dispatching monitoring system, etc. In order to ensure the long-term reliable operation of the entire operation monitoring system, the key information processing equipment of these systems almost all adopts dual-machine hot standby redundancy.
[0003] So far, the dual-machine hot standby redundancy technology used in rail transit operation monitoring systems is generally based on hot standby redundancy based on physical devices as the basic unit, that is: two completely identical hardware devices are configured, and the two devices deploy the same operating system and application platform software, and deploy the same application software; the two devices receive data at the same time, one device sends data outward, and the other device serves as a backup and does not send data outward; the two devices synchronize the master and backup information through a number of heartbeat data, and monitor each other's operating status; when the device sending data outward (the main device) encounters hardware failure, application software error, system platform software error, power outage, communication abnormality, program termination and other adverse conditions that make it impossible to complete normal information processing functions, the backup device will take over as a whole and become the main device, and cut off the output of the original main device (which is in a faulty state at this time) to achieve dual-machine hot standby switching.
[0004] The present invention discloses a process-level dual-machine hot standby redundant system and method, which can greatly reduce the granularity of monitoring to the application software process level, make fault location more accurate, and greatly improve the utilization efficiency of physical equipment. Summary of the invention
[0005] The purpose of the present invention is to provide a process-level dual-machine hot standby redundant system and method, which greatly reduces the granularity of monitoring to the application software process level, realizes more accurate fault location, and greatly improves the utilization efficiency of physical equipment.
[0006] The above-mentioned object of the present invention is achieved through the following technical solutions:
[0007] A process-level dual-machine hot standby redundant system, comprising two devices with completely identical software and hardware configurations, characterized in that: the two devices are connected via a dual heartbeat line, the two devices are both configured with a watchdog process and the two watchdog processes communicate via the dual heartbeat line; the system comprises a selection module for selecting a process management mode, a process configuration module for configuring a main process or a main process group, a server / client calibration module for calibrating the watchdog process as a server mode or a client mode, and a master-slave mode determination module for determining whether the device is a master or a standby, and the watchdog process is also used to monitor the running status of the master process;
[0008] The process configuration module configures the main process or the main process group according to the process management mode, the server / client calibration module calibrates the two devices as server or client mode, and the client watchdog process uses the master-slave mode determination module to determine a host in the two devices according to the operating status of the main process or the main process group.
[0009] The present invention is further configured as follows: when the process management mode is a single process mode, the process configuration module only configures one main process, and when the main process of the server device runs normally, the main-standby mode determination module determines that the server device is the host and the client device is the standby device; otherwise, the client device is the host and the server device is the standby device; when the main process of the host fails, the standby device becomes the host.
[0010] The present invention is further configured as follows: when the process management mode is the process group mode, the process configuration module configures a main process group composed of several processes, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are running normally, otherwise, the client device is the host and the server device is the standby; when any process in the main process group of the host fails, the standby becomes the host.
[0011] The present invention is further configured as follows: when the process management mode is a process group cluster management mode, the process configuration module configures a main process group composed of several processes, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are running normally, otherwise, the client device is the host and the server device is the standby; when any process in the main process group of the host fails, the host runs all processes except the failed process, and the standby runs the corresponding process of the failed process.
[0012] The present invention is further configured as follows: the master-slave mode determination module is also used to restart the original faulty process of the host and stop the corresponding process of the faulty process of the backup machine after the faulty process of the host main process group is repaired.
[0013] The present invention is further configured such that: in the host main process group, when the proportion of faulty processes is higher than a preset value, the standby machine is converted to the host.
[0014] The present invention is further configured as follows: the server / client calibration module sets the watchdog process after startup as the server by default, and makes the watchdog processes started successively send their own heartbeat information; when the watchdog process started later sends the first heartbeat information, it has received the heartbeat information of the other party and is calibrated as the client; when the watchdog process started later sends the first heartbeat information, it has not received the heartbeat information of the other party, the watchdog process started earlier determines that it is the server, and sends the heartbeat information to the watchdog process started later again, and the watchdog process started later receives the heartbeat information of the other party before sending the second heartbeat message, determines that it is the client and calibrates itself.
[0015] The second object of the present invention is achieved through the following technical solutions:
[0016] A process-level dual-machine hot standby redundancy method comprises two system deployments of devices with completely identical software and hardware configurations, the two devices being connected via a dual heartbeat line, the two devices being both configured with a watchdog process and the two watchdog processes communicating via the dual heartbeat line, characterized in that the method comprises the following steps:
[0017] The two watchdog processes are started to send heartbeat information to each other, and the two devices are respectively determined as server mode and client mode according to the heartbeat information, and the client device synchronizes the server device clock;
[0018] Select the process management mode. When the process management mode is set to process group cluster management mode, configure a main process group consisting of several processes to monitor all processes in the main process group of the server device. If all processes are running normally, the server device is determined to be the host and the client device is the backup device. Otherwise, the client device is the host and the server device is the backup device.
[0019] When any process in the main process group of the host fails, the host runs all processes except the failed process, and the standby machine runs the corresponding process of the failed process.
[0020] The present invention is further configured as follows: when the process management mode selects the single process mode, a main process is configured, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when the main process of the server device runs normally; otherwise, the client device is the host and the server device is the standby; when the main process of the host fails, the standby becomes the host.
[0021] The present invention is further configured as follows: when the process management mode selects the process group mode, the process configuration module configures a main process group composed of several processes, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are running normally, otherwise, the client device is the host and the server device is the standby; when any process in the main process group of the host fails, the standby becomes the host.
[0022] In summary, the beneficial technical effects of the present invention are as follows: the process-level dual-machine hot standby redundancy system and method can monitor the process status of each application software deployed in the device, the error status of the operating system and application platform software, and the status of the hardware device communication component. Among them, the monitoring of the application software process status is achieved by configuring the process level (main process, main process group) and providing three hot standby redundancy modes: single main process mode, process group mode, and process group cluster management mode. Users can set it according to different application scenarios and business needs. BRIEF DESCRIPTION OF THE DRAWINGS
[0023] Figure 1 It is a schematic diagram of the principle of a process-level dual-machine hot standby redundant system in Embodiment 1 of the present invention;
[0024] Figure 2 This is a legal process registration state transition diagram in Embodiment 1 of the present invention;
[0025] Figure 3 This is a timing diagram of the watchdog process client / server determination in scenario 1 in embodiment 1 of the present invention;
[0026] Figure 4 This is a timing diagram of the watchdog process client / server determination in scenario 2 in embodiment 1 of the present invention;
[0027] Figure 5 This is a schematic diagram of a single main process mode in the first embodiment of the present invention;
[0028] Figure 6 This is a device state transition diagram in a single main process mode in the first embodiment of the present invention;
[0029] Figure 7 This is a schematic diagram of a process group mode in Embodiment 1 of the present invention;
[0030] Figure 8 This is a device state transition diagram in the process group mode of the first embodiment of the present invention;
[0031] Fig. 9 This is a schematic diagram of a process group cluster management mode in Embodiment 1 of the present invention;
[0032] Fig.10It is a device state transition diagram under the process group cluster management mode in the first embodiment of the present invention;
[0033] Fig.11 This is a schematic diagram of a case where both the double heartbeat lines lose communication in the second embodiment of the present invention;
[0034] Fig.12 This is a device state transition diagram for the double heartbeat loss situation in the second embodiment of the present invention. DETAILED DESCRIPTION
[0035] Embodiment 1
[0036] The present invention discloses a process-level dual-machine hot standby redundant system, which can be used as a key information processing system of a rail transit operation monitoring system. Figure 1 In the dual-machine hot standby redundant system, two identical devices are deployed, named Device 1 and Device 2; both devices are deployed with the same operating system and application platform software, namely "OS and platform software" in the figure; the same application software is deployed, P0, P1, ..., Pn and W1, W2 in the figure are all application software processes, W1 and W2 are watchdog processes, W1 is deployed on Device 1, and W2 is deployed on Device 2; dual heartbeat lines are connected between the two devices. In addition, the two devices are connected to the external system or device dual network.
[0037] The system includes a selection module for selecting a process management mode, a process configuration module for configuring a main process or a main process group, a server / client calibration module for calibrating a watchdog process as a server mode or a client mode, and a master-slave mode determination module for determining whether a device is a host or a backup.
[0038] The process configuration module configures the main process or main process group according to the process management mode. Except for the watchdog process and the main process or main process group, the remaining processes are secondary processes. The server / client calibration module calibrates the two devices as server or client mode. The master-slave mode determination module determines one host and one backup in the two devices.
[0039] The watchdog process in this embodiment mainly includes the following functions:
[0040] 1. Support manual configuration of process ID and level, and setting of redundancy mode;
[0041] 2. Monitor the status of the communication components of the hardware device;
[0042] 3. Monitor the error status of the operating system and application platform software;
[0043] 4. Monitor the process status of application software deployed on the device;
[0044] 5. The watchdog process deployed on another device of the monitoring and redundant system communicates through a dual heartbeat line;
[0045] 6. Monitor the heartbeat communication status;
[0046] 7. Decision-making redundancy switching;
[0047] 8. Send the monitored information to external systems or devices.
[0048] Reference Figure 2 Before the process configuration, each application software process will send a registration message to the watchdog process of the device when it is started. The watchdog process determines whether the application software process is legal and whether it is registered repeatedly based on the unique process identifier configured in advance. If it is legal, a registration success message will be fed back to the corresponding application software process; if it is illegal, an alarm message will be sent to the external system for manual inspection, and no longer process information about the process; if the same process is already running, that is, repeated registration, the watchdog process will send a duplicate registration alarm to the external system. A legal application software process can only start and run normally after receiving a successful registration within a certain time limit, otherwise it will terminate the startup; the watchdog process does not process messages from illegal processes, nor does it send data to illegal processes, so illegal processes can run, but cannot be monitored by the watchdog process.
[0049] When the application software process is running normally, each application software process will periodically report the process ID, the number of communication cycles with other processes or external systems, and the number of messages sent and received to the watchdog process of the device where it is located.
[0050] In particular, when the watchdog process detects a local hardware failure, a fatal error in the operating system, or an application platform software error, it will actively block all local application software processes from sending information to the outside world, and only retain the communication between the watchdog process itself and the outside world in order to report the communication, device and process status; another device will take over all tasks as the host.
[0051] After the redundant system is started, the watchdog process is started manually. The watchdog process will first establish a heartbeat thread and periodically send heartbeat messages to the other party. The heartbeat message contains the heartbeat cycle count of the own party, the heartbeat cycle count of the other party received, and the server / client mark. The above work is completed through the server / client calibration module.
[0052] Specifically, in the case of scenario 1, refer to Figure 3 , the watchdog processes of the two devices are started successively, for example, W1 is started first and W2 is started later. The watchdog process W2 that is started later has received the heartbeat information of the other party when sending the first heartbeat information, and immediately sets itself as the client.
[0053] In the case of scenario 2, refer to Figure 4, the watchdog processes of the two devices are started successively, for example, W1 is started first and W2 is started later. The watchdog process W2 that is started later does not receive the heartbeat message of the other party when sending the first heartbeat message, so it is still the server in the first heartbeat message it sends; after receiving the message, the watchdog process W1 that is started first determines the communication cycle count, determines that it is the server, and sends the heartbeat message to the watchdog process that is started later again; the watchdog process that is started later receives the heartbeat message of the other party before sending the second heartbeat message, determines that it is the client through the heartbeat cycle count, and changes the mark in the heartbeat message.
[0054] When the watchdog process of the redundant system determines the server / client, the client will synchronize the device clock on the server, and then the client watchdog process will initiate the master / slave mode determination process of the redundant system.
[0055] Different configurations will be performed depending on the process management mode selected.
[0056] Reference Figure 5 When the process management mode selects the single process mode, the process configuration module only configures one main process. For example, P0 is used as the main process in the figure. The master-slave mode determination module determines the master-slave status of device 1 and device 2 based on the status of P0. When the main process P0 of the host fails, the entire machine will be switched.
[0057] Specifically, refer to Figure 6 , assuming that W1 is the server and W2 is the client. After the clock is synchronized, when W2 detects that the P0 process of device 2 is registered normally, it will initiate the master-slave mode determination to W1. When the main process of the device where W1 is located has been started and is running normally, the device where W2 is located will become the backup device; when the main process of the device where W1 is located has not been started, the device where W2 is located will become the host.
[0058] After the master-slave mode of device 1 and device 2 is established, periodic master process status monitoring information exchange will be established between W1 and W2. When the redundant system is running, if the master process of the master fails, the master process of the standby machine will automatically take over, and the standby machine will become the master.
[0059] In this mode, there is no information exchange between application software processes on different devices.
[0060] Reference Figure 7 When the process management mode selects the process group mode, the process configuration module configures a main process group composed of several processes. For example, P01...P0m constitute the main process group P0 in the figure. The master-slave mode determination module determines the state of P0 based on the state of any process in P01...P0m, and then determines the master-slave state of device 1 and device 2. That is, when any process in the main process group of the host fails, the main process group will be determined to be faulty, thereby determining the host failure, and then realizing the whole machine switching.
[0061] Specifically, refer to Figure 8 , assuming that W1 is the server and W2 is the client. After clock synchronization, when W2 detects that all processes in the main process group P0 of device 2 are registered normally, it will initiate the master-slave mode determination to W1. When all processes in the main process group of the device where W1 is located have been started and run normally, the device where W2 is located will become the backup machine; when any process in the main process group of the device where W1 is located has not been started, the device where W2 is located will become the host.
[0062] After the master-slave mode of device 1 and device 2 is established, periodic master process status monitoring information exchange will be established between W1 and W2. When the redundant system is running, if any process in the master process group of the master fails, the master process group of the backup machine automatically takes over all master process tasks, and the backup machine becomes the master.
[0063] In this mode, there is no information exchange between application software processes on different devices.
[0064] Reference Fig. 9 When the process management mode selects the process group cluster management mode, the process configuration module configures a main process group composed of several processes, such as P01...P0m in the figure forming the main process group P0. When a process fails in the main process group, the device 1 and device 2 of the redundant system have no real master-slave status.
[0065] When the redundant system is started, similar to the process group mode, the master-slave mode determination module will determine the master-slave mode of device 1 and device 2. Specifically, assuming that W1 is the server and W2 is the client, after clock synchronization, when W2 detects that all processes in the main process group P0 of device 2 are normally registered, it will initiate a master-slave mode determination to W1. When all processes in the main process group of the device where W1 is located have been started and run normally, the device where W2 is located will be converted to a backup machine; when any process in the main process group of the device where W1 is located has not been started, the device where W2 is located will be converted to a host machine.
[0066] Reference Fig.10 , assuming that device 1 is the host in the figure, when P01 in the P0 process group in device 1 fails, W1 will notify W2 to enable the P01 process in device 2 and establish a channel for process communication between devices. At this time, all processes except P01 are running in device 1, including secondary processes, and P01 process is running in device 2, realizing a similar cluster software management function, and there is no real distinction between the master and the slave between devices 1 and 2.
[0067] If the faulty process P01 in the main process group of device 1 is repaired and re-registered successfully, the watchdog process W1 will notify W2, and the P01 process in device 1 will take over, and P01 in device 2 will be downgraded to the standby state. At this time, the entire device 1 is still the main one, and device 2 is the standby one.
[0068] When the proportion of faulty processes in the main process group of device 1 exceeds the preset value, device 2 will take over completely, and device 2 will become the master, and device 1 will become the backup. In this embodiment, the preset value is 30%, that is, if 30% or more processes in the main process group of device 1 are faulty, device 2 will take over completely.
[0069] Embodiment 2
[0070] On the basis of the first embodiment, the dual heartbeat lines are used to connect devices 1 and 2, which has avoided the occurrence of "single point failure". However, when both heartbeat lines are disconnected, the communication between the watchdog processes W1 and W2 will be lost. At this time, the watchdog process of the standby machine actively blocks all application software processes from sending information to the outside world, and only retains the communication between the watchdog process itself and the outside world, so as to report the communication, device and process status; the watchdog process of the host actively reports the heartbeat line status to the external system or device.
[0071] When the redundant system is in a cluster-like state under the process group cluster management mode, if both heartbeat lines are disconnected, the watchdog process on the device with the faulty process will actively block all application software processes from sending information to the outside world, and only retain the communication between the watchdog process itself and the outside world in order to report the communication, device and process status; the device that originally had only some main processes running will be completely taken over and become the main device.
[0072] Embodiment 3
[0073] The present invention discloses a process-level dual-machine hot standby redundancy method, comprising two devices with completely identical software and hardware configurations deployed in two systems, the two devices being connected via a double heartbeat line, the two devices being both configured with a watchdog process, and the two watchdog processes communicating via the double heartbeat line, characterized in that the method comprises the following steps:
[0074] Start two watchdog processes, send heartbeat information to each other, and determine the two devices as server mode and client mode respectively according to the heartbeat information. The client device synchronizes the server device clock.
[0075] Select the process management mode. When the process management mode is set to process group cluster management mode, configure a main process group consisting of several processes to monitor all processes in the main process group of the server device. If all processes are running normally, the server device is determined to be the host and the client device is the backup device. Otherwise, the client device is the host and the server device is the backup device.
[0076] When any process in the main process group of the host fails, the host runs all processes except the failed process, and the standby machine runs the corresponding process of the failed process.
[0077] When the process management mode selects the single process mode, a main process is configured. When the main process of the server device is running normally, the main-standby mode determination module determines that the server device is the host and the client device is the standby. Otherwise, the client device is the host and the server device is the standby. When the main process of the host fails, the standby becomes the host.
[0078] When the process management mode selects the process group mode, the process configuration module configures a main process group composed of several processes. The main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are operating normally. Otherwise, the client device is the host and the server device is the standby. When any process in the main process group of the host fails, the standby becomes the host.
[0079] When the system is deployed, the unique identifier of the application software process of the device, the main process / secondary process, and the startup path are manually configured in the configuration file of the watchdog process, and the process management mode is selected. The process management mode includes single main process mode, process group mode, and process group cluster management mode. Among them, the single main process mode only allows the configuration of one main process, the process group mode and the process group cluster management mode will allow the configuration of multiple main processes to form a main process group, and multiple secondary processes are allowed to be configured in all three modes. After the watchdog process is started, the application software process will be manually started through the relevant operations provided by the watchdog process.
[0080] The watchdog process will also configure the network address, port, heartbeat period and other communication parameters of the redundant system peer.
[0081] After the watchdog process is running, multiple independent threads will be established to monitor the addresses and status of all network components and interfaces of the device, obtain the error status of the operating system and platform software, monitor the status of each process, monitor the communication status with the watchdog process on another device, decide on redundant switching, collect all status data and send it to the outside world.
[0082] The specific implementation is as follows:
[0083] After the watchdog process is manually started, a heartbeat thread will be first established between the watchdog processes and heartbeat messages will be periodically sent to each other to determine the server / client mode of the watchdog process of the dual-machine redundant device.
[0084] When each application software process starts, it sends a registration message to the watchdog process of the device where it is located. The watchdog process determines whether the application software process is legal and whether it is registered repeatedly. A legal application software process can only start and run normally after receiving a successful registration within a certain time limit, otherwise it will terminate the startup. When the application software process runs normally, it will periodically report the process ID, the number of communication cycles with other processes or external systems, and the number of messages sent and received to the watchdog process of the device where it is located.
[0085] After the watchdog process of the redundant system determines the server / client, the client will synchronize the device clock on the server side, and then the client watchdog process will initiate the master / slave mode determination process of the redundant system according to the process management mode.
[0086] Select the process management mode. When the process management mode is single master process mode, only one master process is configured. When the master process of the host fails, the entire machine will be switched back;
[0087] When the process management mode is the process group mode, several main processes can be configured in the watchdog process to form a main process group. When any process in the main process group of the host fails, the main process group will be judged as a failure, and thus the host will be judged as a failure, and the whole machine will be switched back;
[0088] When the process management mode is the process group cluster management mode, several main processes can be configured in the watchdog process to form a main process group. When a process in the main process group fails, the corresponding process in the standby main process group will be enabled, but the master-standby switch will not be performed. The master-standby switch will only be implemented when 30% or more of the processes in the host's main process group fail. In the process group cluster management mode, if less than 30% of the processes in the host's main process group fail, the failed process will be repaired and re-registered successfully, and it will continue to take over the task operation.
[0089] When the master and standby machines of the redundant system are clear, the dual heartbeat communication is lost, and the watchdog process of the standby machine will actively block all application software processes of the local machine from sending information to the outside world, and only retain the communication between the watchdog process itself and the outside world; the watchdog process of the host machine will actively report the heartbeat line status to the external system or device.
[0090] When the redundant system is in a cluster-like state under the process group cluster management mode and loses dual heartbeat communication, the watchdog process on the device with the faulty process will actively block all local application software processes from sending information to the outside world, and only retain the communication between the watchdog process itself and the outside world; the device that originally only had some main processes running will be completely taken over and become the main device.
[0091] When the watchdog process detects a hardware failure on the local machine, a fatal error in the operating system, or an error in the application platform software, it will actively block all local application software processes from sending information to the outside world, and only retain the communication between the watchdog process itself and the outside world; another device in the redundant system will act as the host to take over all tasks.
[0092] The embodiments of this specific implementation method are all preferred embodiments of the present invention, and are not intended to limit the protection scope of the present invention. Therefore, any equivalent changes made based on the structure, shape, and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A process-level dual-machine hot standby redundant system, comprising two systems with completely identical software and hardware configurations, characterized in that: The two devices are connected via a dual heartbeat line, both devices are configured with a watchdog process and the two watchdog processes communicate via the dual heartbeat line; the system comprises a selection module for selecting a process management mode, a process configuration module for configuring a main process or a main process group, a server / client calibration module for calibrating the watchdog process as a server mode or a client mode, and a master-slave mode determination module for determining whether the device is a master or a standby, and the watchdog process is also used to monitor the running status of the master process; The process configuration module configures the main process or the main process group according to the process management mode, the server / client calibration module calibrates the two devices as the server or client mode, and the client watchdog process uses the main-standby mode determination module to determine a host in the two devices according to the running status of the main process or the main process group; When the process management mode is a single process mode, the process configuration module configures only one main process, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when the main process of the server device is running normally, otherwise, the client device is the host and the server device is the standby; when the main process of the host fails, the standby becomes the host; When the process management mode is the process group mode, the process configuration module configures a main process group composed of several processes, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are running normally, otherwise, the client device is the host and the server device is the standby; when any process in the main process group of the host fails, the standby becomes the host; When the process management mode is a process group cluster management mode, the process configuration module configures a main process group composed of several processes, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are running normally. Otherwise, the client device is the host and the server device is the standby. When any process in the main process group of the host fails, the host runs all processes except the failed process, and the standby runs the corresponding process of the failed process.
2. A process-level dual-machine hot standby redundant system according to claim 1, characterized in that: The master-slave mode determination module is also used to restart the original faulty process of the host and stop the corresponding process of the faulty process of the backup machine after the faulty process of the host master process group is repaired.
3. The process-level dual-machine hot standby redundant system according to claim 1, characterized in that: When the proportion of faulty processes in the host main process group is higher than a preset value, the standby machine is converted to the host.
4. A process-level dual-machine hot standby redundant system according to any one of claims 1 to 3, characterized in that: The server / client calibration module sets the watchdog process after startup as the server by default, and makes the watchdog processes started successively send their own heartbeat information; when the watchdog process started later sends the first heartbeat information, it has received the other party's heartbeat information and is calibrated as the client; when the watchdog process started later sends the first heartbeat information but does not receive the other party's heartbeat information, the watchdog process started earlier determines that it is the server, and sends the heartbeat information to the watchdog process started later again. The watchdog process started later receives the other party's heartbeat information before sending the second heartbeat message, determines that it is the client and calibrates itself.
5. A process-level dual-machine hot standby redundancy method, comprising two system deployments of devices with identical software and hardware configurations, the two devices being connected via a dual heartbeat line, the two devices being configured with a watchdog process and the two watchdog processes communicating via a dual heartbeat line, characterized in that: The following steps are involved: The two watchdog processes are started to send heartbeat information to each other, and the two devices are respectively determined as server mode and client mode according to the heartbeat information, and the client device synchronizes the server device clock; Select the process management mode. When the process management mode is set to process group cluster management mode, configure a main process group consisting of several processes to monitor all processes in the main process group of the server device. If all processes are running normally, the server device is determined to be the host and the client device is the backup device. Otherwise, the client device is the host and the server device is the backup device. When any process in the main process group of the host fails, the host runs all processes except the failed process, and the standby machine runs the corresponding process of the failed process; Wherein, when the process management mode is a single process mode, the process configuration module configures only one main process, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when the main process of the server device is running normally, otherwise, the client device is the host and the server device is the standby; when the main process of the host fails, the standby becomes the host; When the process management mode is the process group mode, the process configuration module configures a main process group composed of several processes, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are running normally, otherwise, the client device is the host and the server device is the standby; when any process in the main process group of the host fails, the standby becomes the host; When the process management mode is a process group cluster management mode, the process configuration module configures a main process group composed of several processes, and the main-standby mode determination module determines that the server device is the host and the client device is the standby when all processes in the main process group of the server device are running normally. Otherwise, the client device is the host and the server device is the standby. When any process in the main process group of the host fails, the host runs all processes except the failed process, and the standby runs the corresponding process of the failed process.
Citation Information
Patent Citations
Duplicate hot standby method of embedded system
CN107634855A