Three Modes and their advantages and disadvantages of LVS, and three modes of lvs

Source: Internet
Author: User
Tags haproxy

Three Modes and their advantages and disadvantages of LVS, and three modes of lvs

LVS Classification

LVS-DR: Direct routing, which is the most common method. All ctor and RealServer are in the same physical network (switch) and have only one Nic.

LVS-NAT: address translation, packet back and forth through NAT translation, so Director Server (that is, LVS Server) will become a system bottleneck. In NAT mode, two IP addresses of different CIDR blocks are required. One IP address is used to receive external request services, which is generally an Internet ip address. This IP address is called a VIP address. One IP address is the same as the other IP address segment of the realserver, communication is called DIP. The gateway address of the backend realserver must point to DIP. At the same time, you must enable the packet forwarding function of the Linux kernel.

LVS-TUN: Tunnel, similar to LVS/TUN and LVS/DR. Only an IP address is added to the packet. The entire process is one more packet encapsulation/unblocking process than the LVS/DR mode. LVS/DR only supports local networks, while LVS/TUN supports cross-data centers.

LVS has the following advantages: it has a strong load carrying capability. It works on Layer 4 of the network and has no traffic. This feature determines that it has the strongest performance in the load balancing software, low memory cpu consumption. Its configuration is very simple and generally does not need to be configured, which reduces the chance of configuration errors. It has no traffic, that is, it only distributes requests, which ensures that io performance will not be affected by traffic. At the same time, it has a wide range of applications. It can load balance almost all services (http, database, etc ..)

LVS disadvantages: Static and Dynamic separation is not allowed. In addition, many websites now have such requirements, and all the advantages of Nginx/Haproxy + keeplived exist. If the website application is large, the implementation of LVS/DR + Keepalived is complicated. Nginx/HAProxy + Keepalived is much simpler.

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.