LVS function: Provides IPVS software that implements three IP Server Load balancer technologies and eight connection scheduling algorithms. In the internal implementation of IPVS, an efficient Hash function and garbage collection mechanism are used to correctly process ICMP messages related to the scheduled packets (some commercial systems cannot ). There is no limit on the number of virtual service settings. Each virtual service has its own server set. It supports persistent virtual services (such as HTTPCookie and HTTPS that require this function) and provides detailed statistics, such as the connection processing rate and the packet stream.
LVS
Function:
IPVS software implements three IP Server Load balancer technologies and eight connection scheduling algorithms. In the internal implementation of IPVS, an efficient Hash function and garbage collection mechanism are used to correctly process ICMP messages related to the scheduled packets (some commercial systems cannot ). There is no limit on the number of virtual service settings. Each virtual service has its own server set. It supports persistent virtual services (such as HTTP cookies and HTTPS that require this function) and provides detailed statistics, such as the connection processing rate and packet traffic. Three defense policies are implemented for large-scale denial-of-Service attacks.
Three LVS modes:
Virtual Server via Network Address Translation (VS/NAT) through Network Address Translation, the scheduler overwrites the target Address of the request message, and distributes the request to the real backend Server according to the preset scheduling algorithm; when the response packet of the real server passes through the scheduler, the source address of the packet is overwritten and then returned to the customer to complete the load scheduling process.
When Virtual Server via IP Tunneling (VS/TUN) adopts the NAT technology, the request and response messages must be rewritten by the scheduler address. When there are more and more requests, the processing capability of the scheduler will become a bottleneck. To solve this problem, the scheduler forwards the request packets to the real server through the IP tunnel, and the real server directly returns the response to the customer. Therefore, the Scheduler only processes the request packets. Generally, the network service response is much larger than the request message. after VS/TUN technology is used, the maximum throughput of the cluster system can be increased by 10 times.
Virtual Server via Direct Routing (VS/DR) VS/DR rewrite the MAC address of the request message to send the request to the Real Server, and the real Server directly returns the response to the customer. Like VS/TUN technology, VS/DR technology can greatly improve the scalability of Cluster Systems. This method does not involve the overhead of the IP tunnel, and does not require real servers in the cluster to support the IP tunnel protocol, however, the scheduler and the Real Server must have a network card connected to the same physical network segment.
LVS is called an algorithm:
The Round Robin scheduler uses the "Round Robin" scheduling algorithm to distribute external requests in turn to the real servers in the cluster in order, and treats each server equally, regardless of the actual number of connections and system load on the server.
The Weighted Round Robin Scheduler uses the Weighted Round Robin Scheduling Algorithm to schedule access requests based on different processing capabilities of the Real Server. This ensures that servers with high processing capabilities can process more access traffic. The scheduler can automatically query the actual server load and dynamically adjust its weight.
The Least Connections scheduler uses the "Least Connections" scheduling algorithm to dynamically schedule network requests to servers with the Least established Connections. If the real server of the cluster system has similar system performance, the "minimum connection" scheduling algorithm can better balance the load.
When the server performance of the cluster system varies greatly, the scheduler uses the Weighted Least Link (wlc) scheduling algorithm to optimize the load balancing performance, servers with higher weights will bear a large proportion of the active connection load. The scheduler can automatically query the actual server load and dynamically adjust its weight.
The Locality-Based Least Connections scheduling algorithm is a load balancing algorithm for the target IP address and is mainly used in the Cache cluster system. This algorithm finds the Server recently used by the target IP address of the request. If the server is available and is not overloaded, the request is sent to the server. If the server does not exist, alternatively, if the server is overloaded and has half of the server's workload, select an available server based on the "minimum link" principle and send the request to the server.
Applicability:
The backend server can run any operating system that supports TCP/IP, including Linux and various Unix (such as AIX FreeBSD, Sun Solaris, and HP Unix ), mac/OS and Windows NT/2000. The load scheduler supports most TCP and UDP protocols:
Protocols support UDPDNS, NTP, ICP, such as TCPHTTP, FTP, PROXY, SMTP, POP3, IMAP4, DNS, LDAP, HTTPS, and SSMTP, video and audio stream playback protocols do not need to be modified on the client and server. Most Internet services can be used.
Performance:
The LVS server cluster system is highly scalable and supports millions of concurrent connections. Configure a m Nic and adopt VS/TUN or VS/DR scheduling technology. The throughput of the cluster system can reach 1 Gbits/s. For example, configure a gigabit Nic, the maximum throughput of the system is close to 10 Gbits/s.
Reliability:
LVS server cluster software has been well applied in many large and critical sites, so its reliability has been well verified in real applications. Many schedulers have been running for more than a year without restarting.
The software License LVS cluster software is a free software issued under the GPL (GNU Public License) License. This means that you can get the source code of the software and have the right to modify it, however, you must ensure that your modifications are also released in the GPL mode.
::::::::::::::::::::::::::
The LVS Lab requires at least three servers.
The first Lvs algorithm server (must have more than two NICS)
Save two SerA Serb servers as web servers (of course, multiple server members in LVS in the LAN environment)
First configure the wheel to call the server to install the ipvsadm package (software package ipvsadm-1.25-5.fc14.i686.rpm)