Administration
  Home arrow Administration arrow Page 4 - 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 
 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
     
     
    FaxWave - Free Trial.
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Load-Balanced Clusters - Configuring the Realservers (Apache Nodes)
    (Page 4 of 4 )

    On each realserver (web1 and web2), do the following:

    1. If the server doesn’t already have Apache installed, install it:

        # apt-get install apache2

      If you haven’t installed the content files for your web site, you can do it now or after load balancing is set up.
    2. Install iproute (a Linux networking package with more features than older utilities such as ifconfig and route):

        # apt-get install iproute 
    3. Add these lines to /etc/sysctl.conf:

        net.ipv4.conf.all.arp_ignore = 1 
        net.ipv4.conf.eth0.arp_ignore = 1
        net.ipv4.conf.all.arp_announce = 2
        net.ipv4.conf.eth0.arp_announce = 2 
    4. Get the changes into the kernel:

        # sysctl -p
        net.ipv4.conf.all.arp_ignore = 1
        net.ipv4.conf.eth0.arp_ignore = 1
        net.ipv4.conf.all.arp_announce = 2
        net.ipv4.conf.eth0.arp_announce = 2 
    5. Assuming that your realserver is a Debian system, edit the /etc/network/interfaces file, associating the VIP (70.253.15.42) with the loopback aliaslo:0:

        auto lo:0
        iface lo:0 inet static
            address 70.253.15.42
            netmask 255.255.255.255
            pre-up sysctl -p > /dev/null 
    6.  Enable the loopback alias:

        # ifup lo:0 
    7. Create the file /var/www/ldirector.html with the contents:

        I'm alive! 
    8. On web1:

        # echo "I'm web1" > /var/www/which.html 
    9. On web2

        # echo "I'm web2" > /var/www/which.html 
    10. Start Apache, or restart it if it’s already running:

       # /etc/init.d/apache2 restart

    The Apache access logs should not yet show any activity, because lb is not talking to them yet.

    Please check back next week for the conclusion to this article.


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · 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