Installing a high-availability load balancer

This recipe turns four Raspberry Pis into a highly available website cluster.

Two Raspberry Pis are used as web servers sharing the load of hosting the website. The other two Raspberry Pis are load balancers and they distribute the load of the incoming web requests across the two web servers.

Only one load balancer is required to balance the load. The second is configured to replace the first, if the first load balancer should fail.

The web servers in this recipe use the Apache HTTP server to serve simple stateless websites that demonstrate load balancing in action.

The load balancers in this recipe use HA Proxy to balance web requests between the two web servers and Keepalived to create a virtual IP address ...

Get Raspberry Pi Networking Cookbook - Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.