Red Hat Enterprise Linux 7

Load Balancer Administration

Load Balancer for Red Hat Enterprise Linux

Logo

Steven Levine

Red Hat Customer Content Services

Stephen Wadeley

Red Hat Customer Content Services

Abstract

Building a Load Balancer system offers a highly available and scalable solution for production services using specialized Linux Virtual Servers (LVS) for routing and load-balancing techniques configured through Keepalived and HAProxy. This book discusses the configuration of high-performance systems and services using the Load Balancer technologies in Red Hat Enterprise Linux 7.
1. Load Balancer Overview
1.1. keepalived
1.2. haproxy
1.3. keepalived and haproxy
2. Keepalived Overview
2.1. A Basic Keepalived Load Balancer Configuration
2.2. A Three-Tier keepalived Load Balancer Configuration
2.3. keepalived Scheduling Overview
2.3.1. Keepalived 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 with Keepalived
2.5.1. Persistence
2.5.2. Firewall Marks
3. Setting Up Load Balancer Prerequisites for Keepalived
3.1. The NAT Load Balancer Network
3.1.1. Configuring Network Interfaces for Load Balancer with NAT
3.1.2. Routing on the Real Servers
3.1.3. Enabling NAT Routing on the LVS Routers
3.2. Load Balancer Using Direct Routing
3.2.1. Direct Routing Using arptables
3.2.2. Direct Routing Using firewalld
3.2.3. Direct Routing Using iptables
3.2.4. Direct Routing Using sysctl
3.3. Putting the Configuration Together
3.3.1. General Load Balancer Networking Tips
3.4. Multi-port Services and Load Balancer
3.4.1. Assigning Firewall Marks Using firewalld
3.4.2. Assigning Firewall Marks Using iptables
3.5. Configuring FTP
3.5.1. How FTP Works
3.5.2. How This Affects Load Balancer Routing
3.5.3. Creating Network Packet Filter Rules
3.6. Saving Network Packet Filter Settings
3.7. Turning on Packet Forwarding and Nonlocal Binding
3.8. Configuring Services on the Real Servers
4. Initial Load Balancer Configuration with Keepalived
4.1. A Basic Keepalived configuration
4.1.1. Creating the keeaplived.conf file
4.2. Keepalived Direct Routing Configuration
4.3. Starting the service
5. HAProxy Configuration
5.1. HAProxy Scheduling Algorithms
5.2. Global Settings
5.3. Default Settings
5.4. Frontend Settings
5.5. Backend Settings
5.6. Starting haproxy
A. Example Configuration: Load Balancing Ceph Object Gateway Servers with HAProxy and Keepalived
A.1. Prerequisites
A.2. Preparing HAProxy Nodes
A.3. Install and Configure keepalived
A.4. Install and Configure HAProxy
A.5. Test Your HAProxy Configuration
B. Revision History
Index