Administration
  Home arrow Administration arrow Page 2 - Load-Balanced Clusters
Dev Shed Forums 
Administration  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Forums Sitemap 
IBM® developerWorks 
Dedicated Servers 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
Download TestComplete 
VPS Hosting 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
IBM Developerworks
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
ADMINISTRATION

Load-Balanced Clusters
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 3
    2008-05-01

    Table of Contents:
  • Load-Balanced Clusters
  • Load-Balancing Software
  • ldirectord
  • Configuring the Realservers (Apache Nodes)

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Dell PowerEdge Servers

    Load-Balanced Clusters - Load-Balancing Software
    (Page 2 of 4 )

    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 Administration Articles
    More By O'Reilly Media


       · This article is an excerpt from the book "Linux System Administration," published by...
     

    Buy this book now. This article is excerpted from chapter seven of Linux System Administration, written by Tom Adelstein and Bill Lubanovic (O'Reilly, 2007; ISBN: 0596009526). Check it out today at your favorite bookstore. Buy this book now.

       

    ADMINISTRATION ARTICLES

    - Configuring Load-Balanced Clusters
    - Load-Balanced Clusters
    - UNIX Time Format Demystified
    - Making Changes in the CVS
    - Building Your First CVS Repository
    - CVS Quickstart Guide
    - Authorizing Users in Samba
    - Handling User Accounts in Samba
    - Authentication in Samba
    - Accounts, Authentication, and Authorization
    - Advanced Concepts on Dealing with Files and ...
    - Dealing with Files and Filesystems
    - More Hacks for the User Environment in BSD
    - Personalizing the User Environment in BSD
    - Customizing the User Environment in BSD

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway