What are the differences between the three load balancing methods of LVS?

  
                

LVS cluster uses three ip load balancing technologies, namely VS/NAT, VS/TUN and VS/DR technologies. What are the differences between these three load balancing methods? The following small series will introduce you to the difference between the three load balancing methods of LVS.

1. What is the definition of LVS?

LVS is short for Linux Virtual Server, which means Linux virtual server, which is a virtual server cluster system. In fact, it is a cluster technology, using IP load balancing technology and content-based request distribution technology. The scheduler has good throughput, shifts requests to different servers for execution, and the scheduler automatically masks out server failures, making a group of servers a high-performance, highly available virtual server. The structure of the entire server cluster is transparent to the client and there is no need to modify the client and server side programs. The project was established in May 1998 by Dr. Zhang Wenzhao and is one of the earliest free software projects in China.

To do this, you need to consider the transparency, scalability, high availability, and manageability of your system. In general, the LVS cluster three-layer structure, as shown in FIG its architecture: the architecture of the cluster


LVS

2, LVS main components are:

Load balancer (Director), which is the front-end machine of the entire cluster to the outside, responsible for sending the client's request to a group of servers for execution, and the client considers the service to be from an IP address (we can call it virtual IP) Address).

Server pool (real server) is a group of servers that actually execute client requests. The services that are executed generally include WEB, MAIL, FTP, and DNS.

Shared storage, which provides a shared storage area for server pools, which makes it easy for server pools to have the same content and provide the same services.

3, LVS load balancing mode:

Virtual Server via Network Address Translation NAT (VS/NAT)

VS/NAT is one of the easiest ways, all RealServer only needs to point its own gateway to the Director. The client can be any operating system, but in this mode, a RealServer that a Director can drive is limited. In the VS/NAT mode, the Director can also be a RealServer. The architecture of VS/NAT is shown in the figure.

VS /NAT architecture

Virtual Server via IP Tunneling (VS /TUN)

IP tunnel (IP Tunneling) an IP packet is encapsulated within another The technology of IP packets, which enables data packets destined for one IP address to be encapsulated and forwarded to another IP address. IP tunneling technology is also known as IP encapsulation. The IP tunnel is mainly used for the mobile host and the virtual private network. The tunnel is statically established. The tunnel has an IP address on one end and a unique IP address on the other end. Its connection scheduling and management is the same as in VS/NAT, except that its packet forwarding method is different. The scheduler dynamically selects a server according to the load of each server, encapsulates the request packet in another IP packet, and forwards the encapsulated IP packet to the selected server. After receiving the packet, the server receives the packet. The packet is first decapsulated to obtain the packet whose original destination address is VIP. The server finds that the VIP address is configured on the local IP tunnel device, so the request is processed, and then the response packet is directly returned to the client according to the routing table. Architecture

VS /TUN Previous 12 Next Total of 2

Copyright © Windows knowledge All Rights Reserved