Sean Ward wrote:
>
> Actually, I ran into the same problem (ie, load balancing and scaling mysql)
> recently.
the parallel database application was the thing that attracted me to LVS a year
ago.
> The way that I solved this is I wrote a sql dispatch daemon, which
> can execute a sql statement concurrently on several backend systems. Then, I
> rewrote my app so that it seperated reads from writes. Basically, what my
> program now does is track a set of open connections to mysql servers, and
> how many requests are pending on each, and when a new request comes in, it
> choses the least weighted connection, and processes all the reads along
> that. Any writes which are required (I have a high read/write ratio) are
> written to a file, which is then picked up by the dispatch daemon, and
> executed in parallel across the server. The dispatch daemon also has the
> advantages that because it records a global log of changes, I can bring a
> new server into sync my snapshotting another server's DB files, and then
> replaying the log from the time of the snapshot.
neat. My thinking stopped when I had to deal with a server that died. I like
this.
> If that kind of arrangement
> is of any help to you, check out lsdproject.sourceforge.net where I've stuck
> up the source for the dispatch deamon.
you have no bugs at all :-) what a project.
I couldn't get to www.geocrawler.com for the mailing lists - it just timed out.
> I'll probably have the read only
> connection balancer up there too in a few days, depending on interest.
interested. I just enrolled for a sourceforge account and would like to join
the lsd if that's OK with you guys (nice project name). (I saw 2 developer
names on the lsd list, neither of them looked like yours).
> The
> problem I found with using LVS for load balancing was the need to create a
> new connection for each request (a slow operation) to get the new connection
> load balanced. Its faster to have a pool of open connections and balance
> between them in user land.
yes. you have a plan for this?
Joe
--
Joseph Mack PhD, Senior Systems Engineer, Lockheed Martin
contractor to the National Environmental Supercomputer Center,
mailto:mack.joseph@xxxxxxx ph# 919-541-0007, RTP, NC, USA
|