Fault tolerance mechanism of failover, failfast, failback and failsafe

After chopping hands, the fraud call came before the express delivery was received. How to improve the privacy and security of e-commerce>>>

1. Fail over: fail over
fail over means “fail over”, which is a backup operation mode. When the main component is abnormal, its function is transferred to the backup component. The key point is that there are both active and standby, and the standby can be enabled when the main fault occurs, and set as the main. For example, in the dual master mode of MySQL, when the master in use fails, you can take the standby master as the master

2. Failfast: fast failure
literally means “fast failure”. Try to find the errors in the system, so that the system can execute according to the preset error process. The corresponding way is “fault tolerant”. Taking the rapid failure of Java collection as an example, when multiple threads operate on the contents of the same collection, the fail fast event may occur. For example: when a thread a traverses a collection through iterator, if the content of the collection is changed by other threads; When thread a accesses the collection, it will throw a concurrent modificationexception (find the error, execute the set wrong process), and generate a fail fast event

3. Failback: automatic recovery after failure over: in a cluster network system (a network with two or more servers interconnected), network resources and services need to be temporarily redirected to the standby system because a server needs to be repaired. After that, the process of restoring the network resources and servers to the original host is called automatic recovery

4. Fail safe: fail safe
fail safe means “fail safe”, even in the case of failure, it will not cause harm or minimize harm. An image example on Wikipedia is the “conflict monitoring module” of traffic lights. When an error or conflict signal is detected, the traffic lights at the intersection will turn into flashing error mode instead of all showing as green lights

Similar Posts: