Configure the DR Mode LVs cluster

Source: Internet
Author: User
Tags server array vmware server

Basic Terminology :  
Director: Front-End load balancer, running LVS, currently only for Linux, for FreeBSD just out, performance is not very good. can be used for Web, FTP, cache, MMS and even MySQL services to do load balances.
Realserver: The back end requires a load-balanced server that can be used for a variety of systems, Linux, Solaris, Aix, BSD, Windows, and even director itself as a realserver.
LVS (Linux Virtual Server), Linux load balancer, support Lvs-nat, LVS-DR, lvs-tunl three different ways, NAT is not used a lot, mainly in the way of DR, TUNL.
The Dr method is suitable for all Realserver under the same network segment, which is connected to the same switch.
TUNL way for the realserver position can be arbitrary, can be across the region, space, as long as the system support tunnel can be. Convenient later expansion of the words directly tunl way.

So , Configuring the cluster is divided into the following scenarios :

Configuration based on Dr Mode LVs cluster
Second, the configuration based on the tunnel mode LVS cluster
Iii. configuration based on high availability lvs+heartbeat
Four, this kind of configuration can strengthen the high security of the main node of LVS (the main node referred to as DR, backup master node Drbak), consider the full use of resources can be drbak as realserver.

The basic structure of cluster system :



Load balancer (Loading balancer):

The Load balancer is the front-end of the entire cluster system and is responsible for forwarding customer requests to real server.

Backup is backing up the load balancer, replacing it when the load balancer is not available, becoming the actual load balancer.

The Load balancer monitors the health status of real servers through Ldirectord. Remove the real server from the cluster when it is unavailable, and rejoin it when it resumes.

Server Array (server farm):
The Server array is a set of machines that run the actual application services, such as Web, Mail, FTP, DNS, media, and so on. In practical applications, Load balancer and backup can also serve as real server roles. The following test is a server that serves both as a lvsserver and as a realserver node.

Shared Storage (shared storage):
Shared storage provides sharing storage space and consistent data content for all real servers. This section is detailed below here.

LVS Installation and Deployment

LVS+DRDeployment of Patterns

I. Preparatory work:

1. VMware Server
Using VMware GSX server3.2, and then installing 2 CENTOS4.4 on the virtual machine, the CentOS is installed because it is completely free and can be upgraded and is a stable redhat version.

2. Operating system:

CENTOS 4.4 Download:
Download 1,2,3,4 to http://isoredirect.centos.org/centos/4/isos/i386/. ISO is OK.

3. Ipvs Management Software

You can download the source code compilation file to Http://www.linuxvirtualserver.org/software/ipvs.ht ml ipvsadm-1.24.tar.gz
You can also download similar ipvsadm-1.24-6.i386.rpm directly in http://mirror.centos.org/centos/4.4/csgfs/i386/RPMS/, The piranha-0.8.2-1.i386.rpm RPM package is installed.

4: Address planning:

LB Real Address: 192.168.60.132
VIP Address (vistual IP, that is, your URL needs to be resolved to the address, or to provide an external HTTP service IP) 192.168.60.200
realserver1:192.168.60.132
realserver2:192.168.60.144
Namely 192.168.60.132 is Lvsserver, also is realserver.

Two. Start Installation:

1. Install CENT OS 4.4 in VMware
I chose Xwindows System, GNOME desktop environment when I chose to install the package,
KDE K DESKTOP Environment, development tools, X software Development,
Gnome Software development, KDE software development.
2. After the installation is complete, copy operating system. Generate a second.

3. The IP of three operating systems is:
(LVS server) 192.168.60.132
255.255.255.0
192.168.60.1 (GW)
(Real server) 192.168.60.132
255.255.255.0
192.168.60.1 (GW)
(Real server) 192.168.60.144
255.255.255.0
192.168.60.1 (GW)
192.168.60.132 is both a LVS server and a real server.

4: Install the Ipvs management software on the Lvsserver

Ipvs installation mainly includes three aspects:

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.