9.2. Keepalived and HAProxy Replace Piranha as Load Balancer
Red Hat Enterprise Linux 7 replaces the Piranha Load Balancer technology with Keepalived and HAProxy.
Keepalived provides simple and robust facilities for load balancing and high availability. The load-balancing framework relies on the well-known and widely used Linux Virtual Server kernel module providing Layer-4 (transport layer) load balancing. Keepalived implements a set of checkers to dynamically and adaptively maintain and manage a load balanced server pool according to their health. Keepalived also implements the Virtual Router Redundancy Protocol (VRRPv2) to achieve high availability with director failover.
HAProxy is a TCP/HTTP reverse proxy which is particularly suited for high availability environments. HAProxy can:
- route HTTP requests depending on statically assigned cookies;
- spread the load among several servers while assuring server persistence through the use of HTTP cookies;
- switch to backup servers in the event a main server fails;
- accept connections to special ports dedicated to service monitoring;
- stop accepting connections without breaking existing ones;
- add, modify, and delete HTTP headers in both directions;
- block requests matching particular patterns;
- persist client connections to the correct application server depending on application cookies;
- report detailed status as HTML pages to authenticated users from a URI intercepted from the application.
With Red Hat Enterprise Linux 7, the Load Balancer technology is now included in the base operating system and is no longer a Red Hat Enterprise Linux Add-On.