Red Hat Enterprise Linux 6

Load Balancer Administration

Load Balancer Add-on for Red Hat Enterprise Linux


Steven Levine

Red Hat Customer Content Services

John Ha

Red Hat Customer Content Services

Legal Notice

Copyright © 2017 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, OpenShift, Fedora, the Infinity logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.


Building a Load Balancer Add-On system offers a highly available and scalable solution for production services using specialized Linux Virtual Servers (LVS) for routing and load-balancing techniques. This book discusses the configuration of high-performance systems and services with Red Hat Enterprise Linux and the Load Balancer Add-On for Red Hat Enterprise Linux 6.
1. Document Conventions
1.1. Typographic Conventions
1.2. Pull-quote Conventions
1.3. Notes and Warnings
2. Feedback
1. Load Balancer Add-On Overview
1.1. A Basic Load Balancer Add-On Configuration
1.1.1. Data Replication and Data Sharing Between Real Servers
1.2. A Three-Tier Load Balancer Add-On Configuration
1.3. Load Balancer Add-On Scheduling Overview
1.3.1. Scheduling Algorithms
1.3.2. Server Weight and Scheduling
1.4. Routing Methods
1.4.1. NAT Routing
1.4.2. Direct Routing
1.5. Persistence and Firewall Marks
1.5.1. Persistence
1.5.2. Firewall Marks
1.6. Load Balancer Add-On — A Block Diagram
1.6.1. Load Balancer Add-On Components
2. Initial Load Balancer Add-On Configuration
2.1. Configuring Services on the LVS Router
2.2. Setting a Password for the Piranha Configuration Tool
2.3. Starting the Piranha Configuration Tool Service
2.3.1. Configuring the Piranha Configuration Tool Web Server Port
2.4. Limiting Access To the Piranha Configuration Tool
2.5. Turning on Packet Forwarding
2.6. Configuring Services on the Real Servers
3. Setting Up Load Balancer Add-On
3.1. The NAT Load Balancer Add-On Network
3.1.1. Configuring Network Interfaces for Load Balancer Add-On with NAT
3.1.2. Routing on the Real Servers
3.1.3. Enabling NAT Routing on the LVS Routers
3.2. Load Balancer Add-On via Direct Routing
3.2.1. Direct Routing and arptables_jf
3.2.2. Direct Routing and iptables
3.3. Putting the Configuration Together
3.3.1. General Load Balancer Add-On Networking Tips
3.4. Multi-port Services and Load Balancer Add-On
3.4.1. Assigning Firewall Marks
3.5. Configuring FTP
3.5.1. How FTP Works
3.5.2. How This Affects Load Balancer Add-On Routing
3.5.3. Creating Network Packet Filter Rules
3.6. Saving Network Packet Filter Settings
4. Configuring the Load Balancer Add-On with Piranha Configuration Tool
4.1. Necessary Software
4.2. Logging Into the Piranha Configuration Tool
4.6.1. The VIRTUAL SERVER Subsection
4.6.2. REAL SERVER Subsection
4.7. Synchronizing Configuration Files
4.7.1. Synchronizing
4.7.2. Synchronizing sysctl
4.7.3. Synchronizing Network Packet Filtering Rules
4.8. Starting the Load Balancer Add-On
A. Using the Load Balancer Add-On with the High Availability Add-On
B. Revision History