Options for a loadbalancer

83 views
Skip to first unread message

Walter Heck

unread,
Jun 30, 2009, 6:10:02 AM6/30/09
to mmm-...@googlegroups.com
Hey guys,

I started looking into options for possible pieces of software we
could incorporate into MMM in some way to do actual loadbalancing. I
would like teh loadbalancer to be simple, but smart. That means that
it should be able to decide how much traffic to forward to each server
not just based on round-robin, btu based on server load, number of
mysql connections, or slave status.

Possible solutions I looked at:

- MySQL proxy: I thought this was a nice option, but from some recent
blog posts i understand it is a bit immature and has quite a bit of
overhead.
- HA Proxy, doesn't do TCP, only HTTP proxying
- MySQL Load balancer. A google search ran me into it, i had never
heard of it. It seems nice, but jduging from the email address they
are giving out to wannabe users, it is an enterprise-only beta
feature.
- Pen. Recommended by a friend as " so simple it has no failure"

Does any of you have any suggestions that would fit our needs?

Cjheers,

Walter
--
Walter Heck, Engineer @ Open Query (http://openquery.com)
Affordable Training and ProActive Support for MySQL & related technologies

Follow our blog at http://openquery.com/blog/
OurDelta: free enhanced builds for MySQL @ http://ourdelta.org

Istvan Podor

unread,
Jun 30, 2009, 6:19:15 AM6/30/09
to mmm-...@googlegroups.com
Hi Walter and list,

For this purpose I a really simple architechture. Its contains 2
loadbalanceres (heartbeat+ldirectord) with 1 VIP for the mysqls. (im
using XEN mashines so its doesnt take too much hardware and not even too
much resource. A typical loadbalancer runs on 128mb ram with 2gb of hdd
(just for HA logs :P )).

In my configurations i use WLC (weight-least-connection) to handle 'less
thread' issue. I "think/hope" the server with the less connection means
less job. (but of course its not valid in most cases! but for website
running usualy true).

Now, lets say I have the following IPs:
RW - managed by mmm
RO - primary RO ip provided by LVS
RO2 - A secondary IP. Its handled by the developers, if the RO ip fail,
they fail back to the RO2 and if RO2 fail, they fail back to RW. If rw
failed we suck.. ;)

In this cases its takes up two physical machine each is a xen host with
3 vm.
For checking the mysql status i use ldirectord . Its querying a table
named as loadbalancer and its contains only one row. If the table
renamed or doesnt exists, its remove from the pool.
Its still have problems, not handling replication lag or replication
fails. So i have another script, which checking the statement of the
replica and if its failes, its renames the table.

I have mesures about the strength of this machines and that makes me
help to configure the weight of each node.

Working perfectly! :)

Regards,
Istvan

Walter Heck írta:

Walter Heck

unread,
Jun 30, 2009, 9:10:21 AM6/30/09
to mmm-...@googlegroups.com
Hey Istvan,

thnaks for sharing! That seems like a really neat setup! Anyone else
out there doing similar stuff? I would like to find the simplest
solution that we can sort of provide out of the box, in order to make
it as easy as possible for people to have a load balancing MySQL
cluster with MMM :)

Walter
Reply all
Reply to author
Forward
0 new messages