New Load Balancing with 2.1 & InterWorx

OK, I am sort of new to clusters and load balancing, but something I am definitely interested in.

Some one PLEASE help me understand this load balancing and clustering thing.

Lets say I have two dedicated servers, say, Server A and Server B, lets say I installed Interworx 2.1 on both.
Let say I have a site mysite.com and that site uses a php script with database for the, say ecommerce package installed.

OK, its my understanding that a install of mysite.com will need to be installed on Server A and Server B, complete with mysql database.

When someone comes to mysite.com and lets say they purchase a blue widget, and that sell is put into the mysql database on server A.

NOW, lets say Server A goes down, crashed, for what ever reason. But Server B will pick up the slack of Server A so my web site mysite.com will not go down. Now lets say the customer that purchased a blue widget came back to mysite.com right after the Server A crash and wanted to make a change to his order, aka, making a change to the mysql database.

  1. Question is, will the mysql database on Server B be up to date with Server A up until the crash?

  2. If I understand the load balance correctly all my files for my web site mysite.com and the associated mysql database’s are kept in “synch” by InterWorx?

  3. And lets say when the Server A comes back up the most up to date mysql database will be on Server B, will Interworx some how “resynch” the two databases?

Thanks for helping me understand what the Interwork “load balancing” will actually do and what I can expect from it.

Your understanding is incorrect.

The site and database is ONLY installed on the Master server. The slaves (NODES) mount the /home partition on the MASTER.

The load balanceing comes in with the load – processor power, bandwidth – of the site being spread across the two or more servers (shareing the load).

NOTE: If your server was provisioned prior to the 2.1.0 version of InterWorx you will need to make some changes to the file system before it will work or the options apper in NodeWorx. Specifically /home/interworx and /home/vpopmail will need to be moved out of the /home directory to other locations. DO NOT TRY THIS YOURSELF – I’m sure Chris or Paul will post a tutorial over the next few days. There may also need to be other things done as well.

[How do I know this? I was snooping at the install script the other day and it showed moving those directories :wink: ]

Tim did a good job on the overview but I wanted to address some of these questions as well and make a few brief points.

  1. Question is, will the mysql database on Server B be up to date with Server A up until the crash?

There is only 1 MySQL server, all nodes share a single MySQL server instance.

  1. If I understand the load balance correctly all my files for my web site mysite.com and the associated mysql database’s are kept in “synch” by InterWorx?

I’m trying to stay away from the “sync[h]” word becuase the solution we’ve developed doesn’t have any after-the-fact syncing going on. The storage and DB space is shared so any changes made from any node are instant to the shared storage device. “Shared storage device” in this context means the cluster manager node (there will be docs up by Monday 9/12 that spell all this out in detail).

  1. And lets say when the Server A comes back up the most up to date mysql database will be on Server B, will Interworx some how “resynch” the two databases?

Again, since the data is shared it “just works” for most applications. InterWorx-CP itself does some internal “syncing” but the data is always there UNLESS of course the server holding the data dies, in which case it’s no different than a single-server-solution where the server dies.

I know this is light on details but trust me that lots-o-docs will be up on Monday re: load balanced clusters and many other iworx features (new and old).

Chris

Hello Chris,
I still don’t understand very well the sharing of files and databases. If you are in the context of R-n-R example :

  • Why is there only one MySQL server ? Can't you use the cluster feature of MySQL ?
  • Why is the disk space of each node not shared to be as one big disk space ? It is possible with OpenAFS

Using LVS + MySQL cluster (seems not done currently in IWorx) + OpenAFS (seems not done currently in IWorx) gives a real high availability (along with the load balancing of course).
As of now, as I understood the two previous replies, there is only one server which hosts files and databases, and if it goes down, then all services are obselete (I hope I am wrong).

Roman2K,

You’re looking for a full blown HA solution with all the bells and whistles. This is NOT it. It WILL be, but the current implementation (which is stage 1) is DEFINITELY NOT it :).

* Why is there only one MySQL server ? Can't you use the cluster feature of MySQL ?

Because this is the initial design, it servers the purpose for now.

* Why is the disk space of each node not shared to be as one big disk space ? It is possible with OpenAFS

Because this is the initial design, it servers the purpose for now :). It’s easy to add hardware on this end (NAS, RAID etc) anyway and while openafs works there are other (possibly better) solutions (dbda, coda etc.) but we’ll be looking into that later.

As of now, as I understood the two previous replies, there is only one server which hosts files and databases, and if it goes down, then all services are obselete (I hope I am wrong).

You are not wrong, you are 100% right and we want to make this clear. THIS IS NOT AN HA SOLUTION. If you have a single box, and it dies, your site is down. If you use our current LB/clustering solution and the cluster manager dies, then your site is down. end of story.

If however, you lose a clustered node, it’s not a problem.

!!! TO RESTATE: THIS IS NOT AN HA SOLUTION AND STAGE 1 (THIS STAGE) WASN’T MEANT TO BE !!!

You’ll be happy to note that a full blown HA solution (stages 2, 3 and possibly 4) are on the way.

This solution works, and works well for LB/clustering. If you’re worried about the manager then by all means use RAID/NAS and spend as much on the manager as you want as there are options out there for this. If you’re looking for an HA solution then sorry to disappoint, but it’s not here yet :).

Chirs

Thank you Chris for the once again complete/precise/clear reply :cool:.

Thanks Chris :slight_smile:

Yeah, guys, Thanks, I have a much better understanding now.

I can’t wait for the full HA (+ LB) enabled InterWorx :smiley: ! The perfect thing would be a cluster of HA+LB InterWorx nodes running under Gentoo…

Agreed, but I would settle also for HA + LB on CentOS 4.x :slight_smile:

The LB on CentOS 4.x as is is pretty cool IMHO :)… but yes, HA + LB on anything that works well would be better ;).’

Chris

Hi Chris, what about Gentoo ? :wink:

Already addressed the gentoo issue here roman2k:

http://interworx.info/forums/showthread.php?t=732&highlight=gentoo

Okay, thank you Chris :).

what about FreeBSD? or RH EL ?

my sysadmins are familiar with those.

also i’ve heard centos are pretty much rhel but without monthly license, no?

Hello guys,

I apologize in advance for reviving an old thread.

I was just wondering if it is easy, hard or impossible to move on to HA interworx-CP when its available from the current version.[URL=“http://www.interworx.com/forums/forumdisplay.php?f=6”]

We’ll make the upgrade path as easy as wel can Roy, but we’re far enough away that I don’t have any specifics at this point.

Chris

Just noticed that Iworx picked up my setting for a second SMTP that I had configured a while ago on port 26.

InterWorx just reads existing config files, so apparently you implemented it the same way they did (files and locations) and it is picking up your config settings

Well to be honest I implemented it where it was “working”, but wasn’t a 100% perfect setup. Socheat help resolve a zombie process problem that was created by my attempt to set it up manually. So I’m sure thats helped it align with Iworx :slight_smile: