Linux Virtual Server Administration

Linux Virtual Server Administration

RHEL5: Linux Virtual Server (LVS)

Legal Notice

Abstract

Building a Linux Virtual Server (LVS) system offers highly-available and scalable solution for production services using specialized routing and load-balancing techniques configured through the PIRANHA. This book discusses the configuration of high-performance systems and services with Red Hat Enterprise Linux and LVS.


Table of Contents

1. Introduction to Linux Virtual Server
1.1. Technology Overview
1.2. Basic Configurations
1.2.1. Load-Balancing Clusters Using Linux Virtual Servers
2. Linux Virtual Server Overview
2.1. A Basic LVS Configuration
2.1.1. Data Replication and Data Sharing Between Real Servers
2.2. A Three Tiered LVS Configuration
2.3. LVS Scheduling Overview
2.3.1. Scheduling Algorithms
2.3.2. Server Weight and Scheduling
2.4. Routing Methods
2.4.1. NAT Routing
2.4.2. Direct Routing
2.5. Persistence and Firewall Marks
2.5.1. Persistence
2.5.2. Firewall Marks
2.6. LVS Cluster — A Block Diagram
2.6.1. Components of an LVS Cluster
3. Initial LVS Configuration
3.1. Configuring Services on the LVS Routers
3.2. Setting a Password for the Piranha Configuration Tool
3.3. Starting the Piranha Configuration Tool Service
3.3.1. Configuring the Piranha Configuration Tool Web Server Port
3.4. Limiting Access To the Piranha Configuration Tool
3.5. Turning on Packet Forwarding
3.6. Configuring Services on the Real Servers
4. Setting Up a Red Hat Enterprise Linux LVS Cluster
4.1. The NAT LVS Cluster
4.1.1. Configuring Network Interfaces for a NAT LVS Cluster
4.1.2. Routing on the Real Servers
4.1.3. Enabling NAT Routing on the LVS Routers
4.2. LVS Cluster via Direct Routing
4.2.1. Direct Routing and arptables_jf
4.2.2. Direct Routing and IPTables
4.3. Putting the Cluster Together
4.3.1. General LVS Networking Tips
4.4. Multi-port Services and LVS Clustering
4.4.1. Assigning Firewall Marks
4.5. FTP In an LVS Cluster
4.5.1. How FTP Works
4.5.2. How This Affects LVS Routing
4.5.3. Creating Network Packet Filter Rules
4.6. Saving Network Packet Filter Settings
5. Configuring the LVS Routers with Piranha Configuration Tool
5.1. Necessary Software
5.2. Logging Into the Piranha Configuration Tool
5.3. CONTROL/MONITORING
5.4. GLOBAL SETTINGS
5.5. REDUNDANCY
5.6. VIRTUAL SERVERS
5.6.1. The VIRTUAL SERVER Subsection
5.6.2. REAL SERVER Subsection
5.6.3. EDIT MONITORING SCRIPTS Subsection
5.7. Synchronizing Configuration Files
5.7.1. Synchronizing lvs.cf
5.7.2. Synchronizing sysctl
5.7.3. Synchronizing Network Packet Filtering Rules
5.8. Starting the Cluster
A. Using LVS with Red Hat Cluster
Index

Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.