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

 
Developer Updates  
Free Website Content 
 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? 
Google.com  
ADMINISTRATION

Load-Balanced Clusters
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 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:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log 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


    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_d h
      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
     

       

    ADMINISTRATION ARTICLES

    - Network Booting via PXE: the Basics
    - Scalix: Linux Administrator`s Guide
    - Network Administration with FreeBSD 7
    - Components of an Information Architecture
    - The Anatomy of an Information Architecture
    - 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





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek