Talking about Linux cluster

Source: Internet
Author: User

Cluster sounds like a very high-end technology, in fact, is not, then the cluster is actually a collection of computers, to provide users with the same service of a group of computers, called the cluster, for users as if a computer provides services, clusters are divided into three major categories,

LB Load Balancer Cluster

Load Balancing cluster is mainly to improve the responsiveness of the service, for example, a server's concurrency response capacity is 100, this time often someone reflects that even not on the server, this time the solution generally has two, one, upgrade hardware, upgrade hardware is obviously not a good solution, If the upgrade hardware after a period of time due to the increase in business, the server is not load up how to do it, two, the existing idle low equipment combination to make a high concurrency load Balancer cluster, multiple computers at the same time load user requests, so the server pressure is not so big, then this Clusters of classes have good scalability, reliability, and low cost benefits,

HA High Availability Cluster

High-availability cluster is mainly to provide 7 * 24-hour uninterrupted service, can not be said because one or several servers down the machine can not provide services, if a down machine, will automatically switch to other computers to work, so as to achieve high availability of the effect,

HP High Performance clusters

High-performance clusters are mainly used in scenarios that require a large number of CPU operations, such as weather forecasts, foreign 3D blockbuster production, and a series of applications that require a lot of computation.

The above describes the three categories of cluster application, below to introduce the three major applications of the various implementation mechanisms,

LB load Balancing cluster is also divided into hardware level and software level

The price of hardware class is more expensive, F5, etc.

Software-level comparison is common in the following two kinds: LVS, Haproxy

Solutions for HA highly available clusters are common in the following types of

Heartbeat, Corosync+openais RHCs, Ultramokey, keepalived

HP High performance cluster solutions are common in the following

Bowerful

It says a variety of cluster solutions, typically load-balanced clusters and high-availability clusters are used in combination, the following is the more commonly used LVS in load Balancer cluster

LVS (Linux virtual Server) Linux virtualization server

LVS is a free software developed by the People Zhangwensong, LVS with good scalability, reliability, and manageability, through the Linux system and LVS can achieve a high-availability, high-performance, low-cost server cluster,

LVS is a three-tier architecture, which means that LVs has three parts: the most front-end load balancer lb, the middle is the application server group, the backend is shared storage, see

Three kinds of working models of LVS

NAT Model

The NAT model is obviously based on the name, and is implemented through network address translation, and he works by first asking the user to reach the front-end load balancer (that is, the director Server). The load balancer then modifies the target address of the user request to the backend application server (that is, real server) according to the pre-defined scheduling algorithm, and the application server returns the result to the user after processing the request, which must go through the load balancer and the load Balancer's source address of the message To the target address requested by the user, and then forwarded to the user, thus completing the entire load balancing process,

The NAT model is characterized by the following

All nodes must be in an IP network

Only one public address is required

Support Port Mappings

The backend application server is platform-insensitive

Both incoming and outgoing packets need to go through the load balancer, and when the load is too large, the load balancer will be the bottleneck of the entire cluster.

Supports up to 8 nodes,

Dr Model

The DR model is a load balancing technique implemented by routing technology, which differs from the NAT model in that the load Balancer sends the request to real server by overwriting the MAC address in the user request message, and the real server responds directly to the user. This greatly reduces the pressure of the load balancer, the DR model is also the most used one,

The DR model is characterized by the following

All cluster nodes must be in the same physical network

RIP can be a public IP or a private IP

The load balancer responds only to inbound requests,

Port mappings are not supported

Tun model

The Tun model is implemented by IP tunneling, and the Tun model is somewhat similar to the Dr model, where the load balancer (Director server) communicates with the application server (real server) through IP tunneling technology that forwards the user's request to a real Server, and real server responds directly to the user,

The characteristics of the Tun model,

All cluster nodes can be anywhere

RIP must be a public IP

The load balancer responds only to incoming requests

Port mappings are not supported

The working model of LVS is described above, and the following is the scheduling algorithm supported by LVS.

The scheduling algorithm can also be called a load balancing method, which says that the front-end load Balancer (Director server) will allocate the user's request to the backend application server (Real server), then the load Balancer (Director server)  How do you know which application server to distribute user requests to (Real server)? is based on the scheduling algorithm to achieve the specific allocation of user requests to which application server (Real server), in LVS support up to 10 scheduling algorithms, the following is a few common scheduling algorithms,

Polling, the polling schedule is the average allocation of user requests to real Server,

Weighted polling, weighted polling can set different weights for real server, for a good real server can have higher weights, and the poor performance of the real server can set a lower value, so that the full use of server resources,

Minimum connection, the least connection schedule dynamically dispatches user requests to the established real server with the least number of connections,

Weighted least connection, the weighted least connection can be good server's full value set high, poor performance of the server to set a lower weight,

In addition to the above four, there are target address hash algorithm scheduling, the source address hash algorithm, the least expected delay scheduling, basic minimum connection scheduling, with replication of the least connection scheduling, and so on,

said the load Balancer cluster LVS, in fact, LVS has a fatal disadvantage, when there is a load balancer (Director Server) hangs, then the entire cluster will be paralyzed, said the load Balancer cluster is generally used with high-availability cluster, This avoids the failure of one of the director servers and causes the entire cluster system to collapse.

Source: http://www.codesky.net/article/201208/171298.html

Talking about Linux cluster

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.