High Availability in Linux

Source: Internet
Author: User
High Availability in Linux-Linux Enterprise Application-Linux server application information. The following is a detailed description. It becomes more and more important to ensure continuous and stable system running time, while the traditional Minicomputer System can discourage common users. Users need higher availability and lower costs. High Availability (HA) technology can automatically detect errors and failures of server nodes and service processes, and automatically and appropriately reconfigure the system when this happens, so that other nodes in the cluster can automatically undertake these services, so that the service is not interrupted.
Cluster applications can be divided into three aspects: High-Availability (HA), Load Balance (Server Load balancer Cluster), and Scientific (Scientific Cluster ). The three basic types of a cluster are often mixed and mixed. As a result, it can be found that high-availability clusters can also balance user load between their nodes, while still trying to maintain high-availability. Similarly, you can find a parallel cluster from the cluster to be compiled into the application, which can perform load balancing between nodes. This article focuses on the issues of the Linux-based HA solution.
LVS-based HA solution Linux must take appropriate measures to enter the high-end market, so many companies have increased research efforts in this regard. Now, we can use some existing software to build an LVS system with high availability. The two solutions are listed below for your reference.
[Solution 1] mon + heartbeat + fake + coda
We can use four software, "mon", "heart beat", "fake", and "coda", to build a high-availability Virtual Server ). "Mon" is a popular resource management system that monitors server nodes and network services on the network. "Heartbeat" enables "heartbeat information" to be transmitted between two computers over a serial line using UDP protocol ". "Fake" is a method that uses ARP spoofing to implement IP takeover.
When a server fails, the "mon" process runs on the server Load balancer and monitors the server nodes and service processes of the entire cluster. Write in the configuration file "fping. monitor" to check the server node. Then, the "mon" process checks whether the corresponding server node is still active every t S.
In addition, the related service monitor also needs to be configured, so that the "mon" process will detect the corresponding service processes of all nodes every m seconds. For example, http. monitor is used to configure the monitoring http service, ftp. monitor is used to configure the monitoring ftp service, and so on. When the configuration is complete, a server node becomes invalid or takes effect again, the service process becomes invalid, or the Server Load balancer returns a notification. Therefore, the Server Load balancer can know whether the server node can accept the service.
Now, the Server Load balancer becomes a single point of failure for the entire system. To prevent this problem, we must install a backup server for the Server Load balancer. The "fake" software automatically takes over the IP address and continues the service when the server Load balancer fails. Heartbeat automatically activates/disables the fake process on the backup server at any time based on the server Load balancer status. A "heartbeat" process is running on both the Server Load balancer and backup server, which periodically sends an "I'm alive" message through a serial line. If the backup server fails to receive the "I'm alive" information from the Server Load balancer within a specified period of time, the "fake" process is automatically activated to take over the IP address of the Server Load balancer, and begin to provide the load balancing service; and when again received from the Load balancer "I m alive" message, the backup server will automatically shut down the "fake" process, release the server it takes over, and the Server Load balancer starts working again.
However, if the server Load balancer fails when the customer is requesting the Server Load balancer, the request will fail and the customer must send the request again.
Coda is a fault-tolerant distributed file system derived from Andrew's file system. The directory on the server can be stored on "coda", so files can be highly available and easy to manage.
[Solution 2] ldirectord + heartbeat
"Ldirectord" (Linux ctor Daemon) is an independent process programmed by Jacob Rief to monitor services and physical servers. It is widely used in http and https services.
"Ldirectord" is easy to install and can work well with "heartbeat. The "ldirectord" program is included in the "contrib" directory in the "ipvs" package.
The following are some advantages of "ldirectord:
"Ldirectord" is a dedicated LVS monitoring program.
It reads all configuration information about the IPVS route table from the/etc/ha. d/xxx. cf file. When "ldirectord" runs, the IPVS route table is configured as appropriate.
You can place the Virtual service configuration in multiple configuration files. Therefore, you can modify the parameters of a service without affecting other services. "Ldirectord" can be easily managed by "heartbeat"-start and close.
Put "ldirectord" in the/etc/ha. d/resource. d/directory, and add a line in/etc/ha. d/haresources:
Node1 IPaddr: 10.0.0.3ldirectord: www ldirectord: mail
"Ldirectord" can be manually enabled or disabled. It can be used in an LVS cluster without a backup Load balancer.
As mentioned above, the latch ha solution (HA) of Xlinux is extremely important, and many vendors have invested a lot of research into it. The Xlinux release provides the latch ha solution. Let's take a look at the latch ha solution.
The most typical system structure of the latch ha solution: two hosts, A and B, share A disk array, A, and B, work machines, and backup machines. They are connected by a heartbeat line, known as "Heartbeat detection", mainly through a RS232 detection link. Latch ha also uses Ping to verify system downtime. The HA software installed on the host uses the heartbeat line to monitor the running status of the other Party in real time. Once the active host A suffers A system fault due to various hardware faults, the host B is immediately put into work. How is it like ibm hacmp!
Latch ha implements the "high-reliability shared storage" architecture. The architecture consists of two or three Redundant servers, one shared redundant disk array, one optional DBMS, and latch ha system software. Under the Protection of latch ha, enterprise computer systems can provide uninterrupted information services to avoid downtime caused by hardware faults or routine maintenance, therefore, it can ensure optimal reliability and minimize downtime.
Solution Application
Latch ha can be applied in various centralized, Client/Server modes or OLTP systems. At the same time, it is also compatible with various mainstream database systems and OLTP Software on the market (such as Oracle, SYBASE, Informix, and Tuxedo. Latch ha also provides various application interfaces. Therefore, customers can integrate various functions in their private software to ensure high system reliability.
Latch ha/HS2000 online standby mode
In this mode, a server acts as the master server. Under normal circumstances, it undertakes all the services. The other server acts as the standby server (normally, except for monitoring the status of the master server, no other operations are performed ). Once the master server goes down, the slave server takes over the work and becomes a new master server. Customers can still have the same server IP address, NFS, Data, database, and other ...... This application mode is similar to the typical application mode described above (the two servers are actually completing the same functional application ), the HA software installed on the host uses the heartbeat line to monitor the running status of the other host in real time. Once the active host A has various hardware faults, if the system fails due to power failure, failure of the main component, or failure of the boot disk, host B is immediately put into work.
Latch ha/DA2000 dual-host ready mode
In this mode, both hosts share their own disk arrays as the master server, and each server is responsible for some services. For example, server A is executing application A, server B is executing application B, and both hosts are running their own application logic under normal circumstances, both hosts act as the standby server of the other host, and monitor the status of the other host through the heartbeat line. Once a server goes down, the other server undertakes all the services and serves all the customers. Once server A fails, server B immediately takes over the original application of server A; or server B fails, server A immediately takes over the original application of server B, this is a redundant mode.
Obviously, once a server goes down, the workload of another server is heavy, so there is a three-host mode.
Latch ha/HC2000 three host mode
This application mode is the highest-end HA application mode, which ensures system device redundancy and avoids system downtime, in addition, it can ensure that sufficient system resources are available when the system goes down.
In this mode, the Standby server C also monitors the status of the master server A and B. Once server A or server B goes down, server C will assume its services and serve customers. This system structure not only ensures the safe operation of the system, but also ensures the system resources.
The Linux HA solution is certainly not limited to the above two types, but its core idea is the same, that is, to provide uninterrupted services. In recent years, as the Linux operating system continues to mature and its functions are constantly enhanced, especially the features of the GPL and standardized PVM and MPI message transmission mechanisms and the increasing support for high-performance networks on general PCs, all of these provide a solid technical foundation for the development of Linux-based cluster systems, high-end HA applications stand out with stable and reliable performance and price advantages over Unix. As Intel-based servers have become the mainstream servers for key services and applications, the application of Linux HA cluster technology will become increasingly widespread.



(400) {this. resized = true; this. width = 400; this. alt = 'click here to open new window';} "onmouseover =" if (this. resized) this. style. cursor = 'hand'; "onclick =" window. open ('HTTP: // tech.sina.com.cn/s/2001-11-27/4152-39-464_2001112793431.jpg'); ">
HA cluster structure

HA is actually a hot backup of two (or more) computers by listening to each other in a certain way. When a problem occurs with the Primary server, the Standby server can automatically take over the work immediately, so that the user does not feel the shutdown. After the Primary server returns to normal, the Standby server returns the work to the Primary server.
Related Article

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.