LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

Re: ldirectord checking mysql

To: LVS Users <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: Re: ldirectord checking mysql
From: Horms <horms@xxxxxxxxxxxx>
Date: Wed, 23 Apr 2003 09:29:43 +0900
On Tue, Apr 22, 2003 at 04:41:34PM -0400, Jeff Bearer wrote:
> Has anyone come up with how to have ldirectord connect to mysql services
> on real servers?  Currently I have a simple setup as seen below, where
> it checks that port 3306 is open.  I'm curious if there is any way to
> use the request and receive directives or something else that will
> connect to the service and compare the results like the supported
> services under ldirectord.
> 
> 
> virtual=192.168.0.30:3306
>         real=192.168.1.11:3306 masq
>         real=192.168.1.12:3306 masq
>         scheduler=rr
>         protocol=tcp

At the moment you can only test mysql using checktype=connect
or by setting service=none. The latter would be the default
in this case as you are using port 3306 which is
not associated with a service that ldirectord knows about.

To use the request and receive directives, which would
presumably be an sql query of some sort and an expected response,
you would need to add mysql support to ldirectord.
This should be quite simple as I believe mysql has perl bindins.

Take a look inside ldirectord for check_http and others for
an idea of how this should work.

-- 
Horms
<Prev in Thread] Current Thread [Next in Thread>