Re: [load balancing] Can BigIP F5 consider an http 500 error or 404 error?

From: <Vince.Power [izzat] medavie.bluecross.ca>
Date: Fri Aug 04 2006 - 07:36:37 EDT

I have monitors (like the one listed below) that will mark a node down
when a page in the application doesn't work. The monitor looks for a
keyword that will only show up on a properly generated page (ie: not an
error condition).

<code>
monitor http-es {
   defaults from http
   interval 30
   timeout 11
   recv "User ID:"
   send "GET /es/Unifi/Console/UDS_Templates/login.jsp"
}
</code>

The other option would be to write an external monitor (using perl/libwww
or something) that will check the status code. The monitor would be
something like:

<code>
#!/usr/bin/perl
use LWP;

my $url = 'http://iappsaccp/sso/SplashScreen.jsp';
my $browser = LWP::UserAgent->new;
my $response = $browser->get( $url );

if ($response->status_line =~ /^40/) {
    print ("DOWN\n");
} elsif ($response->status_line =~ /^50/) {
    print ("DOWN\n");
} else {
    print ("UP\n");
}
</code>

Regards,
Vince

Rick Upton <rick@rickupton.com>
Sent by: owner-lb-l@vegan.net
08/03/2006 07:23 PM
Please respond to
lb-l@vegan.net

To
lb-l@vegan.net
cc

Subject
[load balancing] Can BigIP F5 consider an http 500 error or 404 error?

Hello,
 
Is there a way to configure BigIP to consider a web service to be "down"
if the web service generates a 404 or 500 error?
 
I'm a load balancing newbie. I have a web service running on two servers,
and the web service is unreliable on both of them. When the web service
fails, my browser gets a 404 error from the server running the Windows
2000 Server, or a 500 error from the server running Windows Server 2003. I
have a BigIP F5 sitting in front of the two servers, but it appears that
the BigIP F5 doesn't react when these errors are generated, which I assume
is due the fact that an error is being returned (as opposed to nothing at
all).
 
If the BigIP F5 can't do the job, is there anything else that can do the
job (short of making the web services more reliable so that these errors
don't occur)?
 
Best regards,
 
Rick Upton
http://www.rickupton.com

- ---------------------------------------------------------------------
This communication, including any attached documentation, is intended only for the person or entity to which it is addressed, and may contain confidential, personal, and/or privileged information. Any unauthorized disclosure, copying, or taking action on the contents is strictly prohibited. If you have received this message in error, please contact us immediately so we may correct our records. Please then delete or destroy the original transmission and any subsequent reply. Thank you.

La présente communication, y compris toute pièce qui y a été jointe, est destinée uniquement à la personne ou à l’entité à laquelle elle a été adressée, et contient des renseignements à caractère confidentiel et personnel. Toute diffusion ou reproduction non autorisée ou toute intervention entreprise relativement à son contenu est strictement interdite. Si vous avez reçu ce message par erreur, veuillez nous le signaler immédiatement afin que nous puissions effectuer la correction à nos dossiers. Veuillez par la suite supprimer ou détruire le contenu de la transmission originale ainsi que toute réponse ultérieure. Merci.
- ---------------------------------------------------------------------
____________________
The Load Balancing Mailing List
Unsubscribe: mailto:majordomo@vegan.net?body=unsubscribe%20lb-l
Archive: http://vegan.net/lb/archive
LBDigest: http://lbdigest.com
MRTG with SLB: http://vegan.net/MRTG
Hosted by: http://www.tokkisystems.com
Received on Fri Aug 4 07:36:42 2006

This archive was generated by hypermail 2.1.8 : Fri Aug 04 2006 - 07:45:16 EDT