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

Testing the System - Administration

In this conclusion to a two-part series on load-balanced clusters, you'll learn how to configure the load balancer and test the system. This article 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. Configuring Load-Balanced Clusters
  2. Testing the System
  3. Testing the System continued
  4. Adding HA to LB
By: O'Reilly Media
Rating: starstarstarstarstar / 1
May 08, 2008

print this article
SEARCH DEV SHED

TOOLS YOU CAN USE

advertisement

Let’s check that the load balancer is running on lb:

  # ldirectord ldirectord.cf status

You should see something like this:

  ldirectord for /etc/ha.d/ldirectord.cf is running with pid:
  1455

If you see something like this instead:

  ldirectord is stopped for /etc/ha.d/ldirectord.cf

there’s some problem. You can stop the director and restart it with the debug flag -d, and see whether any errors appear in the output:

  # /usr/sbin/ldirectord /etc/ha.d/ ldirectord.cf stop 
  # /usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf start
 
DEBUG2: Running exec(/usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf start)
  Running exec(/usr/sbin/ldirectord -d /etc/ha.d/ldirectord.cf start)
  DEBUG2: Starting Linux Director v1.77.2.32 with pid: 12984
  Starting Linux Director v1.77.2.32 with pid: 12984
  DEBUG2: Running system(/sbin/ipvsadm -A -t 70.253.158.42:80 -s rr )
  Running system(/sbin/ipvsadm -A -t 70.253.158.42:80 -s rr )
  DEBUG2: Added virtual server: 70.253.158.42:80
  Added virtual server: 70.253.158.42:80
  DEBUG2: Disabled server=70.253.158.45
  DEBUG2: Disabled server=70.253.158.41
  DEBUG2: Checking negotiate: real 
 server=negotiate:http:tcp:70.253.158.41:80:::\/
director\.html:I\'m\ alive\!
  (virtual=tcp:70.253.158.42:80)
  DEBUG2: check_http: url="http://70.253.158.41:80/director.html"
  virtualhost="70.253.158.41"
  LWP::UserAgent::new: ()
  LWP::UserAgent::request: ()
  LWP::UserAgent::send_request: GET http://70.253.158.41:80/director.html
  LWP::UserAgent::_need_proxy: Not proxied
  LWP::Protocol::http::request: ()
  LWP::Protocol::collect: read 11 bytes
  LWP::UserAgent::request: Simple response: OK
  45:80/director.html is up

The output is shorter ifchecktypeischeck.

Just to be nosy, we’ll see what the lower-level IP virtual server says:

  # ipvsadm -L -n
  IP Virtual Server version 1.2.0 (size=4096)
  Prot LocalAddress:Port Scheduler Flags

  -> RemoteAddress:Port

Forward Weight ActiveConn InActConn

TCP

70.253.158.42:80 rr

 

  -> 70.253.158.45:80

Route

1

1

2

  -> 70.253.158.41:80

Route

1

0

3

This shows that our first realserver is active, but the second is not.



 
 
>>> 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: