Administration
  Home arrow Administration arrow Page 4 - Configuring 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

Configuring Load-Balanced Clusters
By: O'Reilly Media
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 1
    2008-05-08

    Table of Contents:
  • Configuring Load-Balanced Clusters
  • Testing the System
  • Testing the System continued
  • Adding HA to LB

  • 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

    Configuring Load-Balanced Clusters - Adding HA to LB
    (Page 4 of 4 )

    The load balancer is a single point of failure. If it starts pining for the fjords, the web servers behind it will become inaccessible. To make the system more reliable, you can install a second load balancer in an HA configuration with the first. Detailed instructions, which use the Ultra Monkey package that you’ve already installed, can be found in “How To Set Up A Loadbalanced High-Availability Apache Cluster,” (http://www.howtoforge.com/ high_availability_loadbalanced_apache_cluster). 

    You may not need HA for the Apache servers themselves, because ldirectord is already prodding them everycheckintervalseconds for status and adjusting weights, which is similar in effect to the heartbeat of HA.

    Adding Other LB Services

    We’ve used Apache web servers as this chapter’s example because they’re the most likely to be part of a server farm. Other services that could benefit from LB/HA include MySQL, email servers, or LDAP servers. See “How To Set Up A Load-Balanced MySQL Cluster” (http://www.howtoforge.com/ loadbalanced_mysql_cluster_debian) for a MySQL example.

    Scaling Without LB and HA

    If you offered a wonderful service, would your server survive a Slashdotting (i.e., a huge activity spike)? If not, your credibility could suffer and many visitors might never return. But because implementing LB and HA requires significant effort and hardware investments, it’s worth considering other solutions. There are ways to get more from your present server. For instance, you can disable .htaccess files in your Apache configuration (AllowOverride None), and use mod_expires to avoid stat calls for infrequently changed files such as images. Apache books and web sites contain many such optimization tips.

    Once you reach the limits of your web server software, consider alternatives. In many cases, web servers such as lighttpd (http://www.lighttpd.net), Zeus (http://www. zeustech.net), and litespeed (http://litespeedtech.com) are faster than Apache and use less memory.

    You can also get huge boosts from caching. Code caches, which include PHP accelerators such as
    e-accelerator (http://eaccelerator.net) and APC (http://apc.communityconnect.com), save PHP bytecode and avoid parsing overhead on each page access. Data caches such as MySQL’s query cache save the results of identical queries. Replication is a form of LB. memcached (http://danga.com/memcached) is a fast way to cache data such as database lookup results. Squid (http://www.squid-cache.org), when used as a caching reverse proxy, is a page cache that can bypass the web server entirely.

    When servers are in separate tiers (e.g., MySQL -> PHP -> Apache), improvements are multiplicative; for example, the presentation “Getting Rich with PHP 5” (http:// talks.php.net/show/oscon06) combines many small fixes to scale a PHP application from 17 calls/second to 1,100 calls/second on a single machine.

    If you’re already using these techniques and are still straining to meet demand, definitely try LB, and provide HA if stability is critical.

    Further Reading

    More details on the software used in this chapter are available via the products’ web pages:

    • The Linux Virtual Server Project (http://www.linuxvirtualserver.org)
    • Ultra Monkey (http://www.ultramonkey.org)
    • Heartbeat/The High-Availability Linux Project (http://linux-ha.org)

    You may also want to check out the Red Hat Cluster Suite (http://www.redhat.com/software/rha/cluster), a commercial LB/HA product for Linux built on LVS. The same software is freely available (but without support) in CentOS.


    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