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

Mailing List Archive: mod_backhand: users

Newbie question: Loadbalancing Apache and Tomcat

 

 

mod_backhand users RSS feed   Index | Next | Previous | View Threaded


john.weir at gs

Apr 23, 2002, 11:50 PM

Post #1 of 6 (1753 views)
Permalink
Newbie question: Loadbalancing Apache and Tomcat

All,

I have a geographically disparate site ( LDN, NY, TKY, HK ) each running an
Apache 1.3.23 instance, with 1 or 2 tomcat 4.0.2 servlet engines at each
site. I use mod_jk between the apaches and tomcat for load balancing. should
I use mod_backhand for load balancing instead, and can I cluster the
disparate sites ?

Thoughts appreciated


yairamir at cnds

Apr 24, 2002, 5:17 AM

Post #2 of 6 (1681 views)
Permalink
Newbie question: Loadbalancing Apache and Tomcat [In reply to]

Hi,

mod_backhand can do a good job balancing each of the clusters.
To balance globally you need to augment it with another method.

You can read some ideas on how to do that in some other work done at
Hopkins/CNDS here:

http://www.cnds.jhu.edu/pub/papers/web_opt.pdf

The following web site has in one place several things from CNDS that might be of
interest for those that need balancing and replication on the wide area network.
http://www.cnds.jhu.edu/rep.html

Cheers,

:) Yair. http://www.cs.jhu.edu/~yairamir

Weir, John wrote:

> All,
>
> I have a geographically disparate site ( LDN, NY, TKY, HK ) each running an
> Apache 1.3.23 instance, with 1 or 2 tomcat 4.0.2 servlet engines at each
> site. I use mod_jk between the apaches and tomcat for load balancing. should
> I use mod_backhand for load balancing instead, and can I cluster the
> disparate sites ?
>
> Thoughts appreciated
>
> _______________________________________________
> backhand-users mailing list
> backhand-users [at] lists
> http://lists.backhand.org/mailman/listinfo/backhand-users
>
>
>


john.weir at gs

Apr 25, 2002, 7:03 AM

Post #3 of 6 (1683 views)
Permalink
Newbie question: Loadbalancing Apache and Tomcat [In reply to]

I am a bit confused:-( sorry for being dumb.

With Apache and Tomcat, I use mod_jk to loadbalance jsp requests across
multiple servlet engines. This works well. If I replace mod_jk, with
mod_backhand, would it be better to loadbalance requests across multiple
Apaches, with each Apache associated with a single tomcat servlet engine,
and as Yair suggests use an alternative strategy to route requests correctly
globally?

Anyone got experience of this? If so, I'd really appreciate a look at a
sample config file and any tips that you may have.

Thanks in advance

John

-----Original Message-----
From: Yair Amir [mailto:yairamir [at] cnds]
Sent: Wednesday, April 24, 2002 1:18 PM
To: backhand-users [at] lists
Subject: Re: [m_b_users] Newbie question: Loadbalancing Apache and
Tomcat


Hi,

mod_backhand can do a good job balancing each of the clusters.
To balance globally you need to augment it with another method.

You can read some ideas on how to do that in some other work done at
Hopkins/CNDS here:

http://www.cnds.jhu.edu/pub/papers/web_opt.pdf

The following web site has in one place several things from CNDS that might
be of
interest for those that need balancing and replication on the wide area
network.
http://www.cnds.jhu.edu/rep.html

Cheers,

:) Yair. http://www.cs.jhu.edu/~yairamir

Weir, John wrote:

> All,
>
> I have a geographically disparate site ( LDN, NY, TKY, HK ) each running
an
> Apache 1.3.23 instance, with 1 or 2 tomcat 4.0.2 servlet engines at each
> site. I use mod_jk between the apaches and tomcat for load balancing.
should
> I use mod_backhand for load balancing instead, and can I cluster the
> disparate sites ?
>
> Thoughts appreciated
>
> _______________________________________________
> backhand-users mailing list
> backhand-users [at] lists
> http://lists.backhand.org/mailman/listinfo/backhand-users
>
>
>



_______________________________________________
backhand-users mailing list
backhand-users [at] lists
http://lists.backhand.org/mailman/listinfo/backhand-users


jesus at omniti

Apr 25, 2002, 7:56 AM

Post #4 of 6 (1676 views)
Permalink
Newbie question: Loadbalancing Apache and Tomcat [In reply to]

Weir, John wrote:

>I am a bit confused:-( sorry for being dumb.
>
>With Apache and Tomcat, I use mod_jk to loadbalance jsp requests across
>multiple servlet engines. This works well. If I replace mod_jk, with
>mod_backhand, would it be better to loadbalance requests across multiple
>Apaches, with each Apache associated with a single tomcat servlet engine,
>and as Yair suggests use an alternative strategy to route requests correctly
>globally?
>
>Anyone got experience of this? If so, I'd really appreciate a look at a
>sample config file and any tips that you may have.
>
>Thanks in advance
>
Asking questions about how to best accomplish your goals is seldom dumb
and often many people benefit from observing the conversation on these
mailing lists. However, I didn't really get a good feeling for your goals.

Do you need to load-balancing globally? Is it really likely at all that
one geographic location could get so overloaded that you would want to
push someone to another geographic location? If so, you will want to
use some sort of resource monitoring on the clusters to make these
decisions and redirect people based on that information. mod_backhand
can do this.

If, on the other hand, you simply want people in the americas to go to
your SJC datacenter, Eurpoe to go to your LDN datacenter and the far
east to go to your TKY datacenter, then you aren't looking for load
balancing. You are looking for a service resolution protocol. DNS
works, but wasn't designed for this. There are a few papers and even
fewer implementations that can give you the result you are looking for
-- but they exist. Yair referenced a paper already.

UltraDNS (www.ultradns.net) can help you out with this. They have an
implementation of a global DNS system that can return different IPs
based on the location of the requestor. (effectively finding the closest
cluster).

I think you need to sit down and clearly define the business
requirements of the system. If it is a large system, it stand to
reason, there will be some money in it... You should probably hire a
consultant to review your goals and your proposed implementation. It is
good to use someone who has done this before as a sounding board. Saves
time. Saves money.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
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


john.weir at gs

Apr 25, 2002, 9:08 AM

Post #5 of 6 (1688 views)
Permalink
Newbie question: Loadbalancing Apache and Tomcat [In reply to]

Theo,

I was planning to use a simple http redirect from the primary site, to the
nearest local site, using info in the request header. At each site I have
several servers, some running tomcat, some running apache and tomcat. I have
several issues I need to address:

- The JSP's are fairly intensive and experience shows that I need
several servers
- I would like to be able to avoid redirecting to a site that has no
webserver, even if the machine is available.
- Authenticated User sessions should be sticky WRT to servlet engine
- Users like a single address for access to the site.
- The servers are 'cheap' hardware that can fail
- I have servers in multiple datacentres within a MAN. The Links are
high speed, but multicast access is restricted
- If I lose a whole location ( e.g. LDN ) I want to fall over to
another location seamlessly
- Some requests make sense to be executed in specific regional
centers for access to local data

Today I use mod_jk for loadbalancing the work and keeping sessions together.
I assign a weighting for load at startup time, and use a statistical
round-robin algorithm to 'spread' the requests. Server and site failure are
dealt with manually.

I am trying to workout if spending time in learning how to use mod_backhand
etc will offer me a good return on investment, and seek a jump start into
the process through the good people on this mailing list

Thanks for the encouragement

John

-----Original Message-----
From: Theo Schlossnagle [mailto:jesus [at] omniti]
Sent: Thursday, April 25, 2002 3:56 PM
To: backhand-users [at] lists
Subject: Re: [m_b_users] Newbie question: Loadbalancing Apache and
Tomcat


Weir, John wrote:

>I am a bit confused:-( sorry for being dumb.
>
>With Apache and Tomcat, I use mod_jk to loadbalance jsp requests across
>multiple servlet engines. This works well. If I replace mod_jk, with
>mod_backhand, would it be better to loadbalance requests across multiple
>Apaches, with each Apache associated with a single tomcat servlet engine,
>and as Yair suggests use an alternative strategy to route requests
correctly
>globally?
>
>Anyone got experience of this? If so, I'd really appreciate a look at a
>sample config file and any tips that you may have.
>
>Thanks in advance
>
Asking questions about how to best accomplish your goals is seldom dumb
and often many people benefit from observing the conversation on these
mailing lists. However, I didn't really get a good feeling for your goals.

Do you need to load-balancing globally? Is it really likely at all that
one geographic location could get so overloaded that you would want to
push someone to another geographic location? If so, you will want to
use some sort of resource monitoring on the clusters to make these
decisions and redirect people based on that information. mod_backhand
can do this.

If, on the other hand, you simply want people in the americas to go to
your SJC datacenter, Eurpoe to go to your LDN datacenter and the far
east to go to your TKY datacenter, then you aren't looking for load
balancing. You are looking for a service resolution protocol. DNS
works, but wasn't designed for this. There are a few papers and even
fewer implementations that can give you the result you are looking for
-- but they exist. Yair referenced a paper already.

UltraDNS (www.ultradns.net) can help you out with this. They have an
implementation of a global DNS system that can return different IPs
based on the location of the requestor. (effectively finding the closest
cluster).

I think you need to sit down and clearly define the business
requirements of the system. If it is a large system, it stand to
reason, there will be some money in it... You should probably hire a
consultant to review your goals and your proposed implementation. It is
good to use someone who has done this before as a sounding board. Saves
time. Saves money.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
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-users mailing list
backhand-users [at] lists
http://lists.backhand.org/mailman/listinfo/backhand-users


jesus at omniti

Apr 25, 2002, 10:02 AM

Post #6 of 6 (1688 views)
Permalink
Newbie question: Loadbalancing Apache and Tomcat [In reply to]

Weir, John wrote:

> - The JSP's are fairly intensive and experience shows that I need
>several servers
>
Damn JSPs. I found the same thing when I tested the "Hello World" JSP,
it takes java a lot of resources to write those 11 characters to
someone's browser :-D

>
> - I would like to be able to avoid redirecting to a site that has no
>webserver, even if the machine is available.
>
I am not sure I understand. If the site doesn't have a web server, then
don't avertise it. Are you talking about failures? I think that good
HA will solve all of that. mod_backhand doesn't replace a good HA
device. wackamole might, but it isn't a robust -- I like my HA devices
running on hardware not intel boxes -- I have enough problems with
those. My experience with running HA on Intel with wackamole has been a
pleasant one, but I still prefer a pair of failover ServerIrons or
something like that. The advantage there is that they are very
reliable, easy to get support and you can pin somebody's balls to the
wall to fix them when the break.

Every tool has its place. You can run everything off a set of Extreme
switches if you want. However, every different implementation has its
advantages. mod_backhand has some really cool features that will
_never_ be in hardware load balancers and vice-versa. The point is that
none of these technologies are mutually exclusive. I have mod_backhand,
ServerIrons and wackamole all running in one set up. It works fine and
I get to reap the advantages from each of the technologies with no cost.

>
> - Authenticated User sessions should be sticky WRT to servlet engine
>
Very very easy.

>
> - Users like a single address for access to the site.
>
Silly users. :-)

>
> - The servers are 'cheap' hardware that can fail
>
servers are cheap, but the time invested in troubleshooting problems
with shotty machinery is often underestimated. I would pay 3 times as
much for 3 boxes that never crash than I would for 10 boxes that can
(and do) fail frequently. Somebody has to fix them :-(

>
> - I have servers in multiple datacentres within a MAN. The Links are
>high speed, but multicast access is restricted
>
This isn't necesary. I would highly suggest setting up an IPSEC tunnel
(or just a GRE tunnel) between all your locations. That way you can use
directed broadcast over those links.

> - If I lose a whole location ( e.g. LDN ) I want to fall over to
>another location seamlessly
>
That is tough. There are several approaches to this, but they are all
very involved. You also need to more clearly define "loose". There are
many different types of failures and it will dictate the approach you
use. For example, if you mean, all your servers die, then you can just
have a 2 machine cluster of $400 boxes that issue HTTP redirects to a
fail-over location. On the other hard, if you mean that you data center
could simply "disappear" or there is an act of God, then you want yo
have some seamlessly rectifiable routing in place -- this really has
very little to do with backhand, or web servers -- it is a network
engineering issue

> - Some requests make sense to be executed in specific regional
>centers for access to local data
>
This is an issue you really need to explore before you decide on an
implementation. There are a few ways to do this, but they have
different pros and cons and may not be flexible in the direction you
ultimately want to take your architecture.

>
>Today I use mod_jk for loadbalancing the work and keeping sessions together.
>I assign a weighting for load at startup time, and use a statistical
>round-robin algorithm to 'spread' the requests. Server and site failure are
>dealt with manually.
>
Well, I know from personal experience that using mod_backhand to balance
sticky sessions across a local cluster of Apache/Tomcat servers works
like a charm. I have had that running for months without any issues.
And server failure, is of course, automatic. The users loose their
sessions if they are only on the Tomcat instance that crashed, but the
they are immediately dropped onto another web server and "stick"there.

>I am trying to workout if spending time in learning how to use mod_backhand
>etc will offer me a good return on investment, and seek a jump start into
>the process through the good people on this mailing list
>
mod_backhand is worth looking at. It will fit in your architecture and
serve a valuable purpose -- though I am sure some other technology could
too. The course notes and presentations on www.backhand.org might be
insightful.

--
Theo Schlossnagle
Principal Consultant
OmniTI Computer Consulting, Inc. -- http://www.omniti.com/
Phone: +1 301 776 6376 Fax: +1 410 880 4879
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

mod_backhand 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.