How LVS Works

Source: Internet
Author: User

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

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.