Mailing List Archive

backhand on 3 boxes
Hi List

This is my first post, so thanks for listening

Im currently running our datbase (mysql) on box1 and all the perl for the
site is running on box2 and speaking to box1 via TCP. These are connected
over a 10Mb link which will soon be upgraded to 100Mb.

Box2 gets bogged down with perl requests and we are going to add another box
to share the load.

So this is what Im looking for...
A single database server (box1) and then the other 2 (box2 and box3) sharing
requests to www.mysite.com so they can share the load of the perl requests
which is our biggest problem at the moment.

I've been reading into backhand and am still not too sure how it works... Im
not sure if it needs to be installed on all three servers or only the inital
box that receives all the requests.

Im thinking of using box1 to host tha apache that receives all requests to
www.mysite.com and then spitting them out to box2.mysite.com or
box3.mysite.com. Is it a good idea to have the main apache on the same box
as the mysql?

Another problem is that I want to get a firewall up and running, but box1
has FreeBSD on it and apprently needs recompiling to be able to do this.
Howere the new box has linux and I will be able to run IPTABLES on this, so
I am thinking of running the new box as box1 and swapping the vurrent box1
to be box3... Only problem is box3 has an ide drive while the other 2 have
scsi drives...

Your ideas will be greatfully received.

Cheers

Gary
backhand on 3 boxes [ In reply to ]
Gary Sewell wrote:

>Hi List
>
>This is my first post, so thanks for listening
>
>Im currently running our datbase (mysql) on box1 and all the perl for the
>site is running on box2 and speaking to box1 via TCP. These are connected
>over a 10Mb link which will soon be upgraded to 100Mb.
>
>Box2 gets bogged down with perl requests and we are going to add another box
>to share the load.
>
>So this is what Im looking for...
>A single database server (box1) and then the other 2 (box2 and box3) sharing
>requests to www.mysite.com so they can share the load of the perl requests
>which is our biggest problem at the moment.
>
>I've been reading into backhand and am still not too sure how it works... Im
>not sure if it needs to be installed on all three servers or only the inital
>box that receives all the requests.
>
All machines that run Apache that are participating in cluster activity
(whether receiving originating requests to proxied requests) must have
mod_backhand installed.

>Im thinking of using box1 to host tha apache that receives all requests to
>www.mysite.com and then spitting them out to box2.mysite.com or
>box3.mysite.com. Is it a good idea to have the main apache on the same box
>as the mysql?
>
If by "main" you mean the one doing the least amount of work, then it
make good sense. :-D
If you plan on having the single frontend machine running a thin Apache
that just backhands requests to box2 and box3, then I don't see any
problem with it. Other than you have a pretty severe single point of
failure.

If you have some IPs to use, I might suggest this:

box1 run mysql and Apache.
box2 and box3 have a standby copy of mysql and run apache.
All three are publicly accessible. All are running mod_backhand.
Use DNS RR to cycle through the boxes.
Use wackamole to make sure that all 3 IP addresses are always up in the
event of a box failure.

This is must more complicated, but provides you with a bit more
horsepower and infinitely more redundancy (as you had zero before).

>Another problem is that I want to get a firewall up and running, but box1
>has FreeBSD on it and apprently needs recompiling to be able to do this.
>
If this is a standard FreeBSD install, this is unlikely. You just need
to load the ipfw module. man ipfw :-) Be careful, it defaults to deny
all, you will lock yourself out of your machine if you are not _very_
careful... This is best to do for the first few times from the console.

>Howere the new box has linux and I will be able to run IPTABLES on this, so
>I am thinking of running the new box as box1 and swapping the vurrent box1
>to be box3... Only problem is box3 has an ide drive while the other 2 have
>scsi drives...
>
>Your ideas will be greatfully received.
>
>
If you perl requests are bogging down your server, perhaps some
application rearchitecting might alleviate the problem. Most
applications have plenty of slow code that could be optimized (even if
they are 2nd or 3rd generation). The key is figuring out _what_ to try
to optimize.

--
Theo Schlossnagle
1024D/82844984/95FD 30F1 489E 4613 F22E 491A 7E88 364C 8284 4984
2047R/33131B65/71 F7 95 64 49 76 5D BA 3D 90 B9 9F BE 27 24 E7
backhand on 3 boxes [ In reply to ]
Gary,

Slightly off-topics here, but I was wondering if you were using mod_perl
or doing any kind of caching against the perl applications? We had
issues
with perl sucking up resources across a few machines and moving the
more used applications to mod_perl really decreased our load.

You can get more information at http://perl.apache.org .

Jeremy

___________________________________________
Jeremy 'Case' Rusnak
President & Founder
Case's Ladder, Inc. http://www.igl.net/
an eUniverse company - Nasdaq: EUNI
___________________________________________



-----Original Message-----
From: backhand-users-admin@lists.backhand.org
[mailto:backhand-users-admin@lists.backhand.org] On Behalf Of Gary
Sewell
Sent: Thursday, September 12, 2002 3:12 AM
To: backhand-users@lists.backhand.org
Subject: [m_b_users] backhand on 3 boxes


Hi List

This is my first post, so thanks for listening

Im currently running our datbase (mysql) on box1 and all the perl for
the site is running on box2 and speaking to box1 via TCP. These are
connected over a 10Mb link which will soon be upgraded to 100Mb.

Box2 gets bogged down with perl requests and we are going to add another
box to share the load.

So this is what Im looking for...
A single database server (box1) and then the other 2 (box2 and box3)
sharing requests to www.mysite.com so they can share the load of the
perl requests which is our biggest problem at the moment.

I've been reading into backhand and am still not too sure how it
works... Im not sure if it needs to be installed on all three servers or
only the inital box that receives all the requests.

Im thinking of using box1 to host tha apache that receives all requests
to www.mysite.com and then spitting them out to box2.mysite.com or
box3.mysite.com. Is it a good idea to have the main apache on the same
box as the mysql?

Another problem is that I want to get a firewall up and running, but
box1 has FreeBSD on it and apprently needs recompiling to be able to do
this. Howere the new box has linux and I will be able to run IPTABLES on
this, so I am thinking of running the new box as box1 and swapping the
vurrent box1 to be box3... Only problem is box3 has an ide drive while
the other 2 have scsi drives...

Your ideas will be greatfully received.

Cheers

Gary



_______________________________________________
backhand-users mailing list
backhand-users@lists.backhand.org
http://lists.backhand.org/mailman/listinfo/backhand-users
backhand on 3 boxes [ In reply to ]
Hi Jeremy

We are going to be migrating to mod_perl soon, tried a few bits of code and
it looks like we need a semi-major re-write of the code. If I remember there
are 2 variations

Apache : PerlRun
and
Apache : Registry

We looked into this first, but decided to go with the backhand option then
we also have this to fallback on as well in the future.

How have you found it?

Gary

-----Original Message-----
From: backhand-users-admin@lists.backhand.org
[mailto:backhand-users-admin@lists.backhand.org]On Behalf Of Jeremy
Rusnak
Sent: 12 September 2002 6:36 PM
To: backhand-users@lists.backhand.org
Subject: RE: [m_b_users] backhand on 3 boxes


Gary,

Slightly off-topics here, but I was wondering if you were using mod_perl
or doing any kind of caching against the perl applications? We had
issues
with perl sucking up resources across a few machines and moving the
more used applications to mod_perl really decreased our load.

You can get more information at http://perl.apache.org .

Jeremy

___________________________________________
Jeremy 'Case' Rusnak
President & Founder
Case's Ladder, Inc. http://www.igl.net/
an eUniverse company - Nasdaq: EUNI
___________________________________________



-----Original Message-----
From: backhand-users-admin@lists.backhand.org
[mailto:backhand-users-admin@lists.backhand.org] On Behalf Of Gary
Sewell
Sent: Thursday, September 12, 2002 3:12 AM
To: backhand-users@lists.backhand.org
Subject: [m_b_users] backhand on 3 boxes


Hi List

This is my first post, so thanks for listening

Im currently running our datbase (mysql) on box1 and all the perl for
the site is running on box2 and speaking to box1 via TCP. These are
connected over a 10Mb link which will soon be upgraded to 100Mb.

Box2 gets bogged down with perl requests and we are going to add another
box to share the load.

So this is what Im looking for...
A single database server (box1) and then the other 2 (box2 and box3)
sharing requests to www.mysite.com so they can share the load of the
perl requests which is our biggest problem at the moment.

I've been reading into backhand and am still not too sure how it
works... Im not sure if it needs to be installed on all three servers or
only the inital box that receives all the requests.

Im thinking of using box1 to host tha apache that receives all requests
to www.mysite.com and then spitting them out to box2.mysite.com or
box3.mysite.com. Is it a good idea to have the main apache on the same
box as the mysql?

Another problem is that I want to get a firewall up and running, but
box1 has FreeBSD on it and apprently needs recompiling to be able to do
this. Howere the new box has linux and I will be able to run IPTABLES on
this, so I am thinking of running the new box as box1 and swapping the
vurrent box1 to be box3... Only problem is box3 has an ide drive while
the other 2 have scsi drives...

Your ideas will be greatfully received.

Cheers

Gary



_______________________________________________
backhand-users mailing list
backhand-users@lists.backhand.org
http://lists.backhand.org/mailman/listinfo/backhand-users


_______________________________________________
backhand-users mailing list
backhand-users@lists.backhand.org
http://lists.backhand.org/mailman/listinfo/backhand-users
backhand on 3 boxes [ In reply to ]
> We are going to be migrating to mod_perl soon, tried a few bits of code and
> it looks like we need a semi-major re-write of the code. If I remember there
> are 2 variations
>
> Apache : PerlRun
> and
> Apache : Registry
>
> We looked into this first, but decided to go with the backhand option then
> we also have this to fallback on as well in the future.
>
> How have you found it?

If you want to avoid a major rewrite, PerlRun is your friend and
should let most of your code work out of the box without causing a
rewrite. -sc

--
Sean Chittenden
backhand on 3 boxes [ In reply to ]
>Apache : PerlRun
>and
>Apache : Registry
>
>We looked into this first, but decided to go with the backhand
>option then we also have this to fallback on as well in the future.

We are using both Registry and PerlRun. WE have an older mod_perl
box using Registry. It took quite a bit of effort to get mod_perl
running smoothly there.

Thankfully mod_perl has progressed a good bit since we first
started using it. We are running PerlRun on another couple boxes
with virtually no changes needed to their code to run under mod_perl.

The only changes that were required were when we were using VERY
old versions of things like cgi-lib -- simply changing scripts to
use CGI.pm solved those problems.

Backhand is a great tool, but mod_perl will definitely increase
the efficiency on your machines quite a bit if you're doing a lot
of Perl traffic.

Of course, backhand is needed to not have a single point of failure
as others have pointed out (unless you have another product).

Jeremy