RedHat Linux 6.4 under lvs+keepalived load balancer configuration

Source: Internet
Author: User
Tags openssl server array

LVS is a short name for Linux virtual server, the Linux web, is a free software project initiated by Dr. Zhangwensong and is now part of the Linux standard kernel. Prior to the Linux2.4 kernel, the LVS had to be recompiled to support the LVS function module, but since the Linux2.4 kernel, the various functions of LVS have been built-in, without any patching of the kernel, and the functions provided by LVS can be used directly. The goal of using LVS technology is to achieve a high-performance, highly available server cluster with the load balancing technology provided by LVS and the Linux operating system, which has good reliability, scalability and operability. To achieve the best service performance at low cost.

The LVS framework can be used to achieve highly scalable, highly available network services such as WWW service, cache service, DNS service, FTP service, mail service, video/audio on demand service, etc., there are many more famous websites and organizations are using LVS set up the cluster system, For example: The Linux portal (www.linux.com), the real Company (Www.real.com) known for providing audio and video services to RealPlayer, The world's largest open source website (sourceforge.net).

Using LVS to set up a server cluster system has three parts, the most front-end load balancer layer, with load balancer, the middle of the server group layer, with server array, the bottom of the data sharing storage layer, with shared storage, in the view of users, All internal applications are transparent and users are using only the high-performance services provided by a virtual server.

configuation Example

now we "re going to using Keepalived to contruct a highly-available vs/nat Web cluster with the load balancers and three Web servers. The topology is illustrated in the following figure. In the example, virtual IP address and gateway IP address is 10.23.8.80 and 172.18.1.254, which is floating between the Both load balancers (LD1 and LD2), and the IP addresses of three real servers are 172.18.1.11, 172.18.1.12 and 172.18.1.13 respectively.

650) this.width=650; "title=" 111233.png "alt=" wkiom1g2od3jwkxnaagridr3oru542.png-wh_50 "src=" http://s4.51cto.com/ Wyfs02/m00/8a/a9/wkiom1g2od3jwkxnaagridr3oru542.png-wh_500x0-wm_3-wmp_4-s_2765529799.png "/>

In we example, the keepalived configuration file (/etc/keepalived/keepalived.conf) at the LD1 looks like:

Lab Environment:

System platform: RedHat Linux 6.4 32-bit

kernel:2.6.32-358.el6.i686

LVS version ipvsadm-1.26-1.src.rpm (http://www.linuxvirtualserver.org/)

Keepalived version keepalived-1.3.1.tar.gz (http://www.keepalived.org/download.html)

1. Configure lvs+keepalived on the two director servers separately

2, installation of LVS before the system needs to install popt-static,kernel-devel,make,gcc,openssl-devel,lftp,libnl*,popt*

[Email protected] pakge]# Rpm-qa | grep popt-static kernel-devel make gcc openssl-devel lftp libnl* popt*

Yum install popt-static kernel-devel make gcc openssl-devel lftp

1. Configure lvs+keepalived on the two director servers separately

[Email protected] lvs]# RPM-IVH ipvsadm-1.26-1.src.rpm
1:ipvsadm Warning:user Wensong does not exist-using root
Warning:group Wensong does not exist-using root
Warning:user Wensong does not exist-using root)
Warning:group Wensong does not exist-using root
########################################### [100%]
[Email protected] lvs]#

TAR-XVF keepalived-1.3.1.tar.gz

cd/soft/keepalived/keepalived-1.3.1

This article is from the "httpblog.mvp-610163.com" blog, make sure to keep this source http://mvp2008.blog.51cto.com/331103/1876244

RedHat Linux 6.4 under lvs+keepalived load balancer configuration

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.