Home arrow Site Administration arrow Page 2 - Load-Balanced Clusters

Load-Balancing Software - Administration

If you want or need the power of a supercomputer but can't afford one, you might look into creating a computer cluster. If you're interested in this relatively inexpensive solution, this two-part article series gives you a good introduction. It is excerpted from chapter seven of Linux System Administration, written by Tom Adelstein and Bill Lubanovic (O'Reilly, 2007; ISBN: 0596009526). Copyright © 2007 O'Reilly Media, Inc. All rights reserved. Used with permission from the publisher. Available from booksellers or direct from O'Reilly Media.

TABLE OF CONTENTS:
  1. Load-Balanced Clusters
  2. Load-Balancing Software
  3. ldirectord
  4. Configuring the Realservers (Apache Nodes)
By: O'Reilly Media
Rating: starstarstarstarstar / 3
May 01, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

The simplest form of load balancing is round-robin DNS, where multiple A records are defined for the same name; this results in the servers taking turns responding to any incoming requests. This doesn’t work well if a server fails, though, and it doesn’t take into account any special needs the service may have. With HTTP, for example, we might need to maintain session data such as authentication or cookies and ensure that the same client always connects to the same server. To meet these needs, we’ll get a little more sophisticated and use two tools:

  1. IP Virtual Server (IPVS), a transport-level (TCP) load-balancer module that is now a standard Linux component
  2. ldirectord, a utility that monitors the health of the load-balanced physical servers

The installation instructions are based on the Debian 3.1 (Sarge) Linux distribution.

IPVS on the Load Balancer

Since IPVS is already in the Linux kernel, we don’t need to install any software, but we do need to configure it.

On lb, add these lines to /etc/modules.

  ip_vs_dh
  ip_vs_ftp
  ip_vs
  ip_vs_lblc
  ip_vs_lblcr
  ip_vs_lc
  ip_vs_nq
  ip_vs_rr
  ip_vs_sed
  ip_vs_sh
  ip_vs_wlc
  ip_vs_wrr

Then load the modules into the kernel:

  # modprobe ip_vs_dh
  # modprobe ip_vs_ftp
  # modprobe ip_vs
  # modprobe ip_vs_lblc
  # modprobe ip_vs_lblcr
  # modprobe ip_vs_lc
  # modprobe ip_vs_nq
  # modprobe ip_vs_rr
  # modprobe ip_vs_sed
  # modprobe ip_vs_sh
  # modprobe ip_vs_wlc
  # modprobe ip_vs_wrr

To enable packet forwarding in the Linux kernel on lb, edit the file /etc/sysctl.conf and add this line:

  net.ipv4.ip_forward = 1

Then load this setting into the kernel:

  # sysctl -p
  net.ipv4.ip_forward =1



 
 
>>> More Site Administration Articles          >>> More By O'Reilly Media
 

blog comments powered by Disqus
escort Bursa Bursa escort Antalya eskort
   

SITE ADMINISTRATION ARTICLES

- Coding: Not Just for Developers
- To Support or Not Support IE?
- Administration: Networking OSX and Win 7
- DotNetNuke Gets Social
- Integrating MailChimp with Joomla: Creating ...
- Integrating MailChimp with Joomla: List Mana...
- Integrating MailChimp with Joomla: Building ...
- Integrating MailChimp with Joomla
- More Top WordPress Plugins for Social Media
- Optimizing Security: SSH Public Key Authenti...
- Patches and Rejects in Software Configuratio...
- Configuring a CVS Server
- Managing Code and Teams for Cross-Platform S...
- Software Configuration Management
- Back Up a Joomla Site with Akeeba Backup

Developer Shed Affiliates

 


Dev Shed Tutorial Topics: