LandmannRed Hat Enterprise Linux 4Virtual Server AdministrationLinux Virtual Server (LVS) for Red Hat Enterprise LinuxEdition 1.0
static int kvm_vm_ioctl_deassign_device(struct kvm *kvm, struct kvm_assigned_pci_dev *assigned_dev){ int r = 0; struct
Be sure to mention the manual's identifier:Virtual_Server_Administration(EN)-4.8 (2009-04-23T15:41)By mentioning this manual's identifier, w
Chapter 1. Linux Virtual Server OverviewLinux Virtual Server (LVS) is a set of integrated software components for balancing the IP load across aset of
Figure 1.1. A Basic LVS Configurat ionService requests arriving at the LVS routers are addressed to a virtual IP address, or VIP. This is apublicly-ro
However, this type of data synchronization does not optimally function if the configuration is overloadedwith users constantly uploading files or issu
1.3. LVS Scheduling OverviewOne of the advantages of using LVS is its ability to perform flexible, IP-level load balancing on the realserver pool. Thi
dynamic scheduling algorithm, making it a better choice if there is a high degree of variation inthe request load. It is best suited for a real server
suppose there are three servers in the real server pool. Servers A and B are weighted at 1 and the third,server C, is weighted at 2. If server C goes
physical device on the LVS router nodes, having more than two NICs is not a requirement.Using this topology, the active LVS router receives the reques
bottleneck under heavy network load.1.4 .2.1. Direct Routing and the ARP LimitationWhile there are many advantages to using direct routing in LVS, the
Red Hat Enterprise Linux 4 Virtual Server AdministrationLinux Virtual Server (LVS) for Red Hat Enterprise LinuxEdition [email protected]
the problem of grouping together connections destined for different ports. For these situations, it is bestto use firewall marks.1.5.2. Firewall Marks
nanny process checks the state of one configured service on one real server, and tells the lvs daemonif the service on that real server is malfunction
Chapter 2, Initial LVS Configuration reviews important post-installation configuration steps you shouldtake before configuring Red Hat Enterprise Linu
Chapter 2. Initial LVS ConfigurationAfter installing Red Hat Enterprise Linux, you must take some basic steps to set up both the LVS routersand the re
WarningTurning any of the above services on using chkconfig does not actually start the daemon. T odo this use the /sbin/service command. See Section
WarningIf the command /sbin/service httpd stop or /sbin/service httpd restart is issuedon an LVS router, you must start the piranha-gui service by iss
Order deny,allowDeny from allAllow from 127.0.0.1You can also allow specific hosts or subnets as seen in this example:Order deny,allowDeny from allA
Chapter 3. Setting Up LVSLVS consists of two basic groups: the LVS routers and the real servers. T o prevent a single point offailure, each groups sho
DEVICE=eth0BOOTPROTO=staticONBOOT=yesIPADDR=192.168.26.9NETMASK=255.255.255.0GATEWAY=192.168.26.254The /etc/sysconfig/network-scripts/ifcfg-eth1 for t
So the real server's /etc/sysconfig/network-scripts/ifcfg-eth0 file could look similar to this:DEVICE=eth0ONBOOT=yesBOOTPROTO=staticIPADDR=10.11.
Legal NoticeCopyright © 2009 Red Hat, Inc.This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 UnportedLicense.
response to the client. So, for example, if the client is on the Internet, and sends the packetthrough the LVS router to a real server, the real serve
To configure each real server to ignore ARP requests for each virtual IP addresses, perform thefollowing steps:1. Create the ARP table entries for ea
1. On each real server, run the following command for every VIP, port, and protocol (TCP or UDP)combination intended to be serviced for the real serv
WarningDo not use the ifup scripts to bring up any floating IP addresses you may configureusing Piranha Configuration Tool (eth0:1 or eth1:1). Use the
network packets.Before creating network packet filter rules, make sure there are no rules already in place. To do this,open a shell prompt, login as r
determines how the server responds and on what ports transactions will occur.The two types of data connections are:Active Connect ionsWhen an active c
servers that IPVS does not know about:/sbin/iptables -t nat -A POSTROUTING -p tcp -s n.n.n.0/24 --sport 20 -j MASQUERADEIn the iptables command, n.n.
Finally, you need to be sure that the appropriate service is set to activate on the proper runlevels. Formore on this, refer to Section 2.1, “Configur
Chapter 4. Configuring the LVS Routers with PiranhaConfiguration ToolThe Piranha Configuration Tool provides a structured approach to creating the nec
Figure 4 .1. T he Welcome PanelClick on the Login button and enter piranha for the Usernam e and the administrative password youcreated in the Passwor
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figure 4 .2. T he CONTROL/MONITORING PanelAuto updateThe status display on this page can be updated automatically at a user configurable interval.To e
Figure 4 .3. T he GLOBAL SETT INGS PanelThe top half of this panel sets up the primary LVS router's public and private network interfaces. Thesea
Use network typeClick the NAT button to select NAT routing.Click the Direct Routing button to select direct routing.The next three fields deal specif
Figure 4 .4 . The REDUNDANCY PanelRedundant server public IPEnter the public real IP address for the backup LVS router node.Redundant server private I
WarningRemember to click the ACCEPT button after making any changes in this panel to make sure youdo not lose any changes when selecting a new panel.
allows you to configure an individual virtual server. Links to subsections related specifically to this virtualserver are located along the top of the
protocols or creating a multi-port virtual server for separate, but related protocols. In thisexample, the above virtual server has a Firewall Mark of
WarningLoad monitoring is not the same as load balancing and can result in hard to predictscheduling behavior when combined with weighted scheduling a
subsection. It displays the status of the physical server hosts for a particular virtual service.Figure 4 .7. T he REAL SERVER SubsectionClick the ADD
This panel consists of three entry fields:NameA descriptive name for the real server.NoteThis name is not the hostname for the machine, so make it des
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Figure 4 .9. T he EDIT MONIT ORING SCRIPTS SubsectionSending ProgramFor more advanced service verification, you can use this field to specify the path
NoteIf an external program is entered in the Sending Program field, then the Send field isignored.SendEnter a string for the nanny daemon to send to
/etc/sysconfig/ha/lvs.cf — the configuration file for the LVS routers./etc/sysctl — the configuration file that, among other things, turns on packet f
4.7.3. Synchronizing Network Packet Filtering RulesIf you are using iptables, you will need to synchronize the appropriate configuration file on the b
Using LVS with Red Hat ClusterYou can use LVS routers with a Red Hat Cluster to deploy a high-availability e-commerce site thatprovides load balancing
Each tier provides the following functions:First tier — LVS routers performing load-balancing to distribute Web requests.Second tier — A set of Web se
Revision HistoryRevision 1.0-5.4 00 2013-10-31 Rüdiger LandmannRebuild with publican 4.0.0Revision 1.0-5 2012-07- 18 Anthony T ownsRebuild for Publica
ipvsadm program, ipvsadmJjob scheduling, LVS, LVS Scheduling OverviewLleast connections (see job scheduling, LVS)LVS- /etc/sysconfig/ha/lvs.cf file, /
- starting LVS, Starting LVS- synchronizing configuration files, Synchronizing Configuration Files- three-tier- Red Hat Cluster Manager, A Three-T ier
piranha-passwd, Setting a Password for the Piranha Configurat ion Toolpulse daemon, pulsepulse service, Configuring Services on the LVS Rout ersRreal
Table of Contents 3
IntroductionThis document provides information about installing, configuring, and managing Red Hat Virtual LinuxServer (LVS) components. LVS provides
1. Document ConventionsThis manual uses several conventions to highlight certain words and phrases and draw attention tospecific pieces of information
Next. T he character you sought will be highlighted in the Character Table. Double-clickthis highlighted character to place it in the T ext to copy fi
Comments to this Manuals