Dual-machine Hot Standby solution for Linux

Source: Internet
Author: User

Currently, the dual-host and cluster operating systems mainly include UNIX, Linux, BSD, and Microsoft's Windows NT/2000. With
With the rapid development of Linux, the stability, security, and functions of Linux are constantly enhanced.
As an important operating system in the server market, there are more and more dual-host and Cluster Systems Based on Linux.

Linux clusters have the following advantages: high reliability, high performance, and low cost.

1.1 Overview
1.1.1 Implementation
Hot Standby is a high-reliability application solution that combines software and hardware. The dual-machine hot standby system is independent of two
Server and the corresponding control software. The two servers act as a single system in the network and act as a single server.
And control and manage network IP addresses in a single system. The system sets the data and running status (Package
Images, including hard disk data and memory data, can achieve Hot Backup between two servers, and can achieve seamless switching,
This provides stable and reliable services to external users and achieves high availability solutions for dual-host systems.

1.1.2 function Overview
The dual-machine hot backup system is controlled by the corresponding application software. The operating system and applications are installed on the system disks of the two servers.
Each server is assigned a fixed IP address, and an independent IP address is also specified as the cluster IP address ),
This IP address is an interface that the dual-host system provides external services.

One of the two servers becomes the master node (Primary Server) and the other becomes the slave node (Standby Server ).
The heartbeat signal at a fixed interval between the point and the slave node is implemented through the heartbeat signal.
Handshakes to monitor the running status of the other party and detect faults of the host and network.

Normally, the master node occupies system resources and runs all services to provide support for the information system.
The heartbeat signal monitors the running status of the master node. If the master node fails (such as a host fault, network fault, or software fault ),
The slave node automatically takes Over the resources and services of the master node and continues to support information operations to ensure the entire dual-node
Non-Stop ). After the master node resumes running, it can automatically obtain resources and replace the slave node.

1.2 Runtime Environment
1.2.1 hardware requirements
In the implementation scheme of the cluster system, the dual-machine Hot Backup System is the simplest and cheapest solution for hardware configuration.
The hardware configuration of the Service requires two independent servers. Each server has an independent operating system hard disk and data storage hard disk,
Each server has a network adapter that provides the network connection function. In addition, you can have a pair of NICs that complete the internal connection and data mirroring functions.

The two servers in the dual-host system have shared data storage space (either a data storage hard disk or a dedicated data storage space ).
Storage Server ). When running services, any server reads and stores data from the shared data storage space. Each Server
The operating system and application files of the server are stored in their local buckets.

The dual-machine hot backup system uses the memory image technology, that is, the data and running status of the two servers (including hard disk data and memory)
Data. The advantage of this technology is that all applications and operation data are synchronized on two servers.
When a node fails, the slave node can take over the services run on the master node with almost no delay, thus achieving seamless switch.
Replacement and hot backup. The disadvantage of this technology is that because the memory of the two servers is completely consistent, when system applications have defects
As a result, when the system goes down, the two servers will be down simultaneously.

You can also use a third-party disk array cabinet in the dual-host system to install the disk array control card in the disk array cabinet.
The hard disks in the cabinet can be directly configured as logical disk arrays. This structure does not use the memory image technology, so a certain amount
Switch time, and because all data is stored in the disk array, when the master node fails, the slave node takes over the master
Node to read data from the disk array, so data will not be synchronized. Network Mirroring is not required for this solution.
Such as synchronization, so the performance of the Cluster Server is much higher than that of the backup server.

The two servers of the dual-machine hot backup system are connected through the internal LAN, and communicate and perform through periodic heartbeat Signals
Mutual monitoring. The two servers can be connected in multiple ways. You can use a serial line or ethernet
You can also use the coexistence of multiple connection methods to achieve multiple connections between the two hosts. If the dual-machine system has redundant connections,
When the first communication path fails, the control software can try to connect to the second communication path. Therefore,
To avoid unnecessary failover, we recommend that you create two or more independent physical paths and use at least two heartbeat methods.

The dual-machine hot backup system has many advantages, such as simple configuration, easy to use, and low price.
Image Data is synchronized using the image software. Therefore, the CPU and memory resources of the network server need to be occupied, resulting in
The server performance is reduced.

1.2.2 software requirements
This solution only discusses the implementation of the dual-machine Hot Backup System in the Redhat Linux system. The dual-machine control software used is Linux-HA.
Heartbeat. Therefore, in addition to installing the operating system and related application services, heartbeat control software must be installed.

By configuring the heartbeat software, you can specify the two servers as the master node and slave node respectively, and specify the heartbeat signal
Specify the cluster IP address, subnet mask, broadcast address, and authentication method. You can also set the service started by heartbeat,
The service is finally provided by the dual-host system through the cluster IP address.

Heartbeat can protect the application continuity of the client to the maximum extent. Hardware resources (such as network cards) and software resources (such
The operating system, database management system, database application system, and email system can all be in the heartbeat Fault Tolerant Software.
Under protection, heartbeat Fault Tolerance software can implement system resources at any time when these protected resources are technically faulty.
. Therefore, heartbeat enables online system and application layer when the user's hardware or software resources fail.
Hot switch.

The Heartbeat software has the following features:
No additional hardware resources are required. Dual-host fault tolerance is implemented in software-only mode, and dual-host fault tolerance is not required.
Supports DB2, Notes, Exchange, SQL Server, Sybase, Informix, Oracle, SAP, and other systems.
Layer hot switch.
Supports multiple methods, such as shared disk array cabinets and memory images, to provide users with the flexibility of choice, and can also adapt to various models,
Network structure, software platform and application system.
It consumes less system resources, does not increase network load, and does not interfere with the operation and operation of specific applications.
Truly unattended, fully automated system resource and application service switching.

1.3.2 solution description
Server A and Server B constitute two hosts of the dual-host hot backup system, which are respectively used as the master node (Primary Server)
And slave node (Standby Server ). Both hosts run Linux-HA heartbeat. The software becomes the control program of the Hot Standby System.

The two hosts are connected through a serial port, Ethernet, and other methods to transmit data and heartbeat signals, and monitor the status of each other. Yes
Only one connection method (such as Ethernet connection) is used, but redundant paths in multiple connection modes can ensure the reliability and
Service quality.

The database server or disk array cabinet is a dedicated data storage and sharing device. Both servers read and
Store data. This method can effectively improve data transmission efficiency, improve the system performance of the dual-host Hot Standby server, and ensure
Data synchronization between servers.

1.4 Problems

The dual-Machine backup system can be configured in two ways: "Two-machine system based on system switching" and "two-Machine System Based on System Image ",
The difference between the two is:
The dual-host system based on system switching only mirrors the hard disk data of the two servers. When the master node fails
System-level switch. This method cannot achieve seamless switching, but implements cold backup.

The system image-based dual-host system mirrors both the hard disk data and memory data of the two servers. To ensure full memory image, two
Servers need to maintain a continuous, bidirectional mirroring process in real time through dedicated connection network segments. This process ensures that
Data synchronization. Once a fault occurs, no matter whether one server is invalid, the data and applications on the server will be immediately switched to another
Server, so that users can continue to use the services provided by the dual-host system without interruption. This method enables seamless switching,
Hot Backup is implemented.

The heartbeat dual-machine hot backup system described in this solution is a system image-based dual-machine system. The implementation method is that the master node fails.
In this case, the cluster IP address is seamlessly switched to the slave node, so that client access to the server can be supported by the slave node. But two
There is no image process between servers to complete a thorough memory image, so the data information running on the master node during the fault cannot be switched to the slave Node
Point, causing data loss and service interruption. Therefore, this solution is not a system image in a strict sense. It implements a service-level switch and
Real-time data switching is not possible.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.