LVS background
LVS
The project is developed by a free software project 1998年5月
established by Dr. Wensong Zhang in China Linux Virtual Server
, mainly for Linux
the development of server clusters. At the same time, the Linux Virtual Server
project is one of the earliest free software projects in China.
Linux Virtual Server
The goal of the project: to use cluster technology and Linux operating system to achieve a high-performance, highly available server, it has a very good 可伸缩性(Scalability)
, 可靠性(Reliability)
and 可管理性(Manageability)
.
Currently, the LVS
project has provided a Linux Virtual Server
framework for implementing scalable network services , as 图3
shown. In the LVS
framework, virtual server software with three IP
load balancing technologies , core switches based on content request distribution, and cluster management software are provided. The framework can be used to realize highly scalable, highly available and other network services; on this basis, highly scalable and highly available e-commerce applications that support a large number of users can be developed.IP
IPVS
Layer-7
KTCPVS
LVS
Web、Cache、Mail
Media
LVS overall architecture
The overall architecture is as follows:
Figure 1: LVS general three-tier architecture
Generally speaking, the LVS
cluster adopts a three-tier structure, and its system structure is as 图1
shown. The main components of the three-tier are:
- Load balancer, which is the front-end machine of the entire cluster to the outside, is responsible for sending customer requests to a group of servers for execution, and customers think that the service comes from an IP address (we can call it a virtual IP address) Up.
- Server pool (server pool) is a set of servers that actually execute client requests. The executed services include WEB, MAIL, FTP, DNS, etc.
- Shared storage, which provides a shared storage area for the server pool, so that it is easy to make the server pool have the same content and provide the same services.
Scheduling methods applicable to different services:
WEB
service:VS/NAT
媒体
service:VS/DR
Cache
service:VS/TUN
The specific scheduling method will be explained in detail in the next article
IPVS components
- Part of the ipvs
Linux
kernel, according to the rules to perform the requested scheduling, similar toIptabels
thenetfilter
kernel module!Linux 2.4
Incorporate into the kernel during the version. - ipadm
isipvs
a command line tool for setting rules and needs to be installed and applicable.
ipvs
We only need to apply the general architecture to the above 2
module!
IPVS cluster features
- Powerful
3
Kind ofIP
load balancing technology8
Connection scheduling algorithm- Virtual service unlimited
- Detailed statistics
- Attack defense strategy
- Strong applicability
- The back-end server can run any operating system that supports TCP/IP, including Linux, various Unix (such as FreeBSD, Sun Solaris, HP Unix, etc.), Mac/OS and Windows NT/2000, etc.
- The load scheduler can support most TCP and UDP protocols:
tcp:http、tcp、proxy、smtp、https、ldap
udp:dns、ntp以及音视频协议
- performance
- The cluster can support millions of concurrent
TUN
OrDR
technology, throughput can be close to10G/s
- reliability
LVS
The server cluster software has been well applied in many large and critical sites, so its reliability has been well confirmed in real applications. There are many schedulers running for more than a year without a restart.
- Software license
LVS
Cluster software isGPL(GNU Public License)
free software released under license, which means that you can get the source code of the software and have the right to modify it, but you must ensure that your modifications are alsoGPL
distributed in a way.
to sum up
This article mainly introduces about LVS
the background and LVS
characteristics. For the detailed load balancing technology and scheduling algorithm we will explain in detail in the next article!
lvs社区
Links to several articles you can refer to at the same time are as follows:
http://www.linuxvirtualserver.org/zh/lvs1.html
http://www.linuxvirtualserver.org/zh/lvs2.html
http://www.linuxvirtualserver.org/zh/lvs3.html
http://www.linuxvirtualserver.org/zh/lvs4.html