Load Balancing for Websites

From ATI Chennai IT and ITES Wiki

Jump to: navigation, search


Debian Load Balancer


  • Create 4 sites on the LAN not opened out on the firewall
  • Make the index.html unique to identify the actual load bearer used
  • Create a load balancer site opened out onto the firewall on ports 80 and 443 for actual domain
  • Access the 4 sites in round robin through the load balanced from external IPs.
  • We use Debian 8 (Jessie) 64 bit with Apache2 installed. Other packages like /MySQL/PHP may also co-exist
  • Start with a template like debian-8.0-generic64jeslamp_1.0-2_amd64.tar.gz
  • Use 4 GB HDD and 512 MB RAM for each of the 5 test virtual machines

Create sites to bear the load

  • Create the 4 load bearing sites on any domain
  • Have only the port 80 running on these sites
  • Assume their IPs to be to 144

Create the Load Balancer site

  • Create the load bearing site on the target domain
  • Assume the Load Balancer IP as:
  • etc/apt/sources.list.d/backports.list to contain: deb http://ftp.debian.org/debian jessie-backports main

Configure the Load Balancer

  • /etc/apache2/load-balancer.conf needs to be configured with cluster and redirection in round robin.


Personal tools