Introduction to LVS's NAT mode +DR mode storage mount

Source: Internet
Author: User
Tags linux

One: Introduction of LVS cluster:

Virtual services for LVS (Linux virtual Server) Linux

The rapid growth of the Internet makes multimedia network servers face a rapid increase in the number of accesses, the server needs to provide a large number of concurrent access services, so for a large load of servers, CPU, I/O processing capacity will soon become a bottleneck. Because the performance of a single server is always limited, simply improving the hardware performance does not really solve the problem. For this reason, multiple servers and load balancing techniques must be used to meet the needs of a large number of concurrent accesses. The Linux virtual server (SERVERS,LVS) uses load balancing technology to make multiple servers into a single virtual server. It provides a scalable, affordable solution to meet fast-growing network access requirements

Second: The structure and working principle of LVS:

LVS consists of a front-end load balancer (load balancer,lb) and a real-server,rs-server group at the back end. RS can be connected via LAN or WAN. This structure of LVS is transparent to the user, and the user sees only one virtual server as LB, but not the RS group that provides the service.

Three: LVS's working mode has three kinds:

1.nat (Lvs-nat)

A. Cluster contacts must be in the same subnet as lb (i.e. dip and) and not across domain segments

B.rip is a private address

C. All RIP gateways must point to dip

D. The scheduler handles all requests

E. Port address Translation

F. Because it's NAT.

H. Single-point bottlenecks

2. Direct Routing (LVS-DR)

A. Cluster contacts must and LB must be in a physical network segment and cannot have routers between

B.rip can use public network address, recommend to use public network address

C.LB only processes requests, does not process responses

D.real Server gateway does not point to dip

E. Cannot do port conversion

F. Not all systems are capable of making contacts

H.LVS-DR can drive more contacts than Lvs-nat.

3. Tunnel (Lvs-tun)

A. Cluster contacts and LB contacts do not have to be in the same physical network

B.rip Use public network address

C.LB only process incoming requests and do not process out requests

D. Requests for response must not go through lb.

E. Port address translation is not supported

F. Cluster contacts can only be done using an operating system that supports IP tunneling protocols

Four: LVs of the LB scheduling method and each scheduling method corresponding to the algorithm:

1. Static Dispatch method: (fixed scheduling) does not consider back-end connection state

A:RR (Round-robin) round, it will request in order to allocate different RS, that is, in the RS to divide the request. This algorithm is simple, but only suitable for RS processing performance difference is not very good;

B:WRR (weight round-robin) weighted rotation, which assigns tasks based on the weights of different Rs. RS with higher weights will be given priority to tasks, and the number of connections allocated will be more than RS with lower weights. RS with the same weight value get the same number of connections;

C:destination hashing is forwarded to a specific server based on a service request, creating stickiness with the user and increasing the cache hit rate

D:source hashing will be requested from the same user, always forwarded to a specific router or firewall (average intranet load)

2. Dynamic Scheduling method: (dynamic scheduling) consider back-end connection status

A:LC (least-connect) Minimum connection, check active and inactive, connection number (overhead) Minimum acceptance request

B:WLC (weight least-connect) weighted minimum connection number (best algorithm for clustering)

C:shortest expected delay (SED) minimum expectation delay, regardless of inactivity, add the total number of inactive states to 1 before calculating overhead

D:NQ (never query) as long as there is idle, do not consider the algorithm to accept requests;

E:LBLC (LOCALITY-BASED-LEAST-CONNECT:DH) supports the weights (followed by the cache server) based on the minimum number of connection scheduling (locality-based least-connection) Assign a request from the same destination address to the same RS if the server is not full load, the minimum number of connections is allocated to RS, and it is the first consideration for the next allocation;

F:LBLCR (locality-based-least-connect with replication scheduling) is an improvement to LBLC, and for a given destination address, there should be a subset of Rs. A request for this address, which allocates the smallest number of RS in the sub-central connection; If all the servers in the subset are full, select a server with a smaller number of connections from the cluster, add it to this subset, and assign the connection; If this subset is not modified for a certain amount of time, remove the node with the largest load in the child set from the subset ;

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.