Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Linux Virtual Server: Users

[lvs-users] MySQL Cluster Balancing

 

 

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded


alejandrob at olx

Aug 25, 2011, 8:28 AM

Post #1 of 5 (598 views)
Permalink
[lvs-users] MySQL Cluster Balancing

Hi Guys,

Anyone here using lvs + heartbeat + ldirectod with the option to test mysql
server using a simple query ? Just test in a QA enviroment and worker great
but when i tried the same configuration in a Production environment results
where bad..

Here the configuration used


virtual=10.0.0.1:3306
real=10.0.0.2:3306 gate 10
real=10.0.6.3:3306 gate 10
service=mysql
scheduler=wlc
checktype = negotiate
login = "lbuser"
passwd = "lbpassword"
database = "db_name"
request = "select 1"


Thanks,
Cheers.
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


Darren.Mansell at opengi

Aug 25, 2011, 9:00 AM

Post #2 of 5 (551 views)
Permalink
Re: [lvs-users] MySQL Cluster Balancing [In reply to]

That looks fine. This is mine from a production cluster:

virtual=10.167.20.100:3306
fallback=10.167.20.20:3306
real=10.167.20.10:3306 gate 1000
service=mysql
login="servicecheck"
passwd="password"
database="ldirectord"
request="SELECT * from connectioncheck;"
scheduler=wlc
protocol=tcp
checktype=negotiate


What's not working? LVS giving it a 0 score?

If so, look in the ldirectord log, it may just be something like
Perl-MySQL not installed.


-----Original Message-----
From: lvs-users-bounces [at] linuxvirtualserver
[mailto:lvs-users-bounces [at] linuxvirtualserver] On Behalf Of Alejandro
Bednarik
Sent: 25 August 2011 16:29
To: lvs-users [at] linuxvirtualserver
Subject: [lvs-users] MySQL Cluster Balancing

Hi Guys,

Anyone here using lvs + heartbeat + ldirectod with the option to test
mysql server using a simple query ? Just test in a QA enviroment and
worker great but when i tried the same configuration in a Production
environment results where bad..

Here the configuration used


virtual=10.0.0.1:3306
real=10.0.0.2:3306 gate 10
real=10.0.6.3:3306 gate 10
service=mysql
scheduler=wlc
checktype = negotiate
login = "lbuser"
passwd = "lbpassword"
database = "db_name"
request = "select 1"


Thanks,
Cheers.
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


alejandrob at olx

Aug 25, 2011, 10:22 AM

Post #3 of 5 (555 views)
Permalink
Re: [lvs-users] MySQL Cluster Balancing [In reply to]

Already Test Ldirectord in Debug Mode al modulesa are installed an
dldirectord shows server up and running. When there is no traffic all
servers are up, but when i start sending traffic, in this case is like 3000
k queries per second in a cluster with 10 DBs servers are mark as down and
up all the time. Without this MySQL check LVS is working fine, in fact is
what we are using.

Thanks for help!

On Thu, Aug 25, 2011 at 1:00 PM, <Darren.Mansell [at] opengi> wrote:

> That looks fine. This is mine from a production cluster:
>
> virtual=10.167.20.100:3306
> fallback=10.167.20.20:3306
> real=10.167.20.10:3306 gate 1000
> service=mysql
> login="servicecheck"
> passwd="password"
> database="ldirectord"
> request="SELECT * from connectioncheck;"
> scheduler=wlc
> protocol=tcp
> checktype=negotiate
>
>
> What's not working? LVS giving it a 0 score?
>
> If so, look in the ldirectord log, it may just be something like
> Perl-MySQL not installed.
>
>
> -----Original Message-----
> From: lvs-users-bounces [at] linuxvirtualserver
> [mailto:lvs-users-bounces [at] linuxvirtualserver] On Behalf Of Alejandro
> Bednarik
> Sent: 25 August 2011 16:29
> To: lvs-users [at] linuxvirtualserver
> Subject: [lvs-users] MySQL Cluster Balancing
>
> Hi Guys,
>
> Anyone here using lvs + heartbeat + ldirectod with the option to test
> mysql server using a simple query ? Just test in a QA enviroment and
> worker great but when i tried the same configuration in a Production
> environment results where bad..
>
> Here the configuration used
>
>
> virtual=10.0.0.1:3306
> real=10.0.0.2:3306 gate 10
> real=10.0.6.3:3306 gate 10
> service=mysql
> scheduler=wlc
> checktype = negotiate
> login = "lbuser"
> passwd = "lbpassword"
> database = "db_name"
> request = "select 1"
>
>
> Thanks,
> Cheers.
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>



--
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


graeme at graemef

Aug 25, 2011, 1:09 PM

Post #4 of 5 (544 views)
Permalink
Re: [lvs-users] MySQL Cluster Balancing [In reply to]

Alejandro Bednarik <alejandrob [at] olx> wrote:

>Already Test Ldirectord in Debug Mode al modulesa are installed an
>dldirectord shows server up and running. When there is no traffic all
>servers are up, but when i start sending traffic, in this case is like
>3000
>k queries per second in a cluster with 10 DBs servers are mark as down
>and
>up all the time. Without this MySQL check LVS is working fine, in fact
>is
>what we are using.
It sounds very much like the DB cluster or each server on their own cannot cope with the load.

Check the network also as that could be saturated.

Graeme.

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users


Darren.Mansell at opengi

Aug 26, 2011, 12:59 AM

Post #5 of 5 (558 views)
Permalink
Re: [lvs-users] MySQL Cluster Balancing [In reply to]

I get that when the DB server is overloaded. It's just that the query
times out. Looking at the script to check MySQL in ldirectord, it's very
simple and doesn't specify any timeouts etc so I assume will be using
Perl DBI defaults. Thing is, if the server is heavily loaded and
ldirectord is moving traffic away from it, then it's working and it's
the desired behaviour.

You can either modify the check_sql routine in ldirectord to lengthen
the timeouts, or just change the checktype to connect. But then you're
losing the ability to see if MySQL is actually responding as it should
and just checking it's listening on 3306.

Darren



-----Original Message-----
From: lvs-users-bounces [at] linuxvirtualserver
[mailto:lvs-users-bounces [at] linuxvirtualserver] On Behalf Of Alejandro
Bednarik
Sent: 25 August 2011 18:22
To: LinuxVirtualServer.org users mailing list.
Subject: Re: [lvs-users] MySQL Cluster Balancing

Already Test Ldirectord in Debug Mode al modulesa are installed an
dldirectord shows server up and running. When there is no traffic all
servers are up, but when i start sending traffic, in this case is like
3000 k queries per second in a cluster with 10 DBs servers are mark as
down and up all the time. Without this MySQL check LVS is working fine,
in fact is what we are using.

Thanks for help!

On Thu, Aug 25, 2011 at 1:00 PM, <Darren.Mansell [at] opengi> wrote:

> That looks fine. This is mine from a production cluster:
>
> virtual=10.167.20.100:3306
> fallback=10.167.20.20:3306
> real=10.167.20.10:3306 gate 1000
> service=mysql
> login="servicecheck"
> passwd="password"
> database="ldirectord"
> request="SELECT * from connectioncheck;"
> scheduler=wlc
> protocol=tcp
> checktype=negotiate
>
>
> What's not working? LVS giving it a 0 score?
>
> If so, look in the ldirectord log, it may just be something like
> Perl-MySQL not installed.
>
>
> -----Original Message-----
> From: lvs-users-bounces [at] linuxvirtualserver
> [mailto:lvs-users-bounces [at] linuxvirtualserver] On Behalf Of
> Alejandro Bednarik
> Sent: 25 August 2011 16:29
> To: lvs-users [at] linuxvirtualserver
> Subject: [lvs-users] MySQL Cluster Balancing
>
> Hi Guys,
>
> Anyone here using lvs + heartbeat + ldirectod with the option to test
> mysql server using a simple query ? Just test in a QA enviroment and
> worker great but when i tried the same configuration in a Production
> environment results where bad..
>
> Here the configuration used
>
>
> virtual=10.0.0.1:3306
> real=10.0.0.2:3306 gate 10
> real=10.0.6.3:3306 gate 10
> service=mysql
> scheduler=wlc
> checktype = negotiate
> login = "lbuser"
> passwd = "lbpassword"
> database = "db_name"
> request = "select 1"
>
>
> Thanks,
> Cheers.
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer

> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>
> _______________________________________________
> Please read the documentation before posting - it's available at:
> http://www.linuxvirtualserver.org/
>
> LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer

> Send requests to lvs-users-request [at] LinuxVirtualServer
> or go to http://lists.graemef.net/mailman/listinfo/lvs-users
>



--
_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

_______________________________________________
Please read the documentation before posting - it's available at:
http://www.linuxvirtualserver.org/

LinuxVirtualServer.org mailing list - lvs-users [at] LinuxVirtualServer
Send requests to lvs-users-request [at] LinuxVirtualServer
or go to http://lists.graemef.net/mailman/listinfo/lvs-users

Linux Virtual Server users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.