LB Load balancing: Solution
Hardware:
F5 Big-IP
Citrix Citrix Netscaler
A10 A10
Array
Redware
Software: LVS
Dr. Zhangwensong, Linux Virtual Server author
Ipvs equivalent to NetFilter, works in the kernel, forwards the user
Framework that relies on the rule to complete forwarding
Ipvs Cluster Service
Define a server for one or more back ends
Ipvsadm
LVS: four-layer switching, four-tier routing (supposedly concurrent 400w,f5 600w)
Vip:
Keepalived
CIP Client IP
Director: Load Balancer
Real server
DIP: Interacting with Real server
Rip
Cip<-->vip--dip<-->rip
Type of LVS:
Nat:--> (DNAT)
DR
TUN
Fullnat
How the LVS Works
650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20161207/1481099053629137.png "title= "1481099053629137.png" alt= "Blob.png"/>
Model of LVS NAT
650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20161207/1481099090189183.png "title= "1481099090189183.png" alt= "Blob.png"/>
Features of LVS NAT
1.RS should use a private address
The 2.RS gateway must point to the dip
3.RIP and dip must be within the same network segment
4. Request and response messages are subject to director, and in high-load scenarios, the director is likely to become a performance bottleneck
5. Support Port Mapping
6.RS can use any OS that supports cluster services
650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20161207/1481099126623801.png "title= "1481099126623801.png" alt= "Blob.png"/>
LVS Dr Type
1. Let the previous route send the request to the VIP, only the VIP on the Dirctor
Solution Solutions
1. Static Address Binding
There may not be configuration permissions for the router
Static address binding will be difficult to use when Director calls
2.arptables
3. Modify the Linux kernel parameters, the VIP on the RS is configured on the Lo interface alias, limit Linux only to the corresponding interface ARP request to do the corresponding
Features of the LVS Dr type
1.RS can use a private address, you can also use the public address, at this time can be directly connected to the Internet through the RS, to achieve configuration, monitoring and other
2.RS Gateway must not point to dip
3.RS and dirctory to be within the same physical network (cannot have routers separated)
4. The request message passes through the director, but the response message must not go through the Director
5. Port mappings are not supported
6.RS can use most of the operating system
650) this.width=650; "src=" Http://www.178linux.com/ueditor/php/upload/image/20161207/1481099166240554.png "title= "1481099166240554.png" alt= "Blob.png"/>
LVS tun Type: IP tunnel
1.RIP,DIP,VIP is a public address.
The 2.RS gateway does not point to or cannot point to the dip
3. The request message passes through the director, but the response message must not go through the Director
4. Port mappings are not supported
5.RS OS must support tunnel function
Summary: The most commonly used or LVS Dr Mode, has been deployed many times online
How LVS Works