You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by GF <ga...@gmail.com> on 2009/02/16 22:21:46 UTC

Tutorial: Load Balancing Tomcat with Apache

Hello everyone
I wrote a tutorial about load balancing Tomcat with Apache Proxy Module.

This is the url:
http://www.zulutown.com/blog/2009/02/16/java-ee-load-balancing-with-tomcat-and-apache/
Any feedback will be really appreciated.

Thank You.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tutorial: Load Balancing Tomcat with Apache

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

To whom iy may concern,

On 2/16/2009 4:21 PM, GF wrote:
> I wrote a tutorial about load balancing Tomcat with Apache Proxy Module.
> 
> This is the url:
> http://www.zulutown.com/blog/2009/02/16/java-ee-load-balancing-with-tomcat-and-apache/
> Any feedback will be really appreciated.

This is less of a tutorial and more of a single example. A few things
that you don't really describe too well:

1. Why use different port numbers for each backend server?
   This is probably appropriate if you are playing with a clustered
   configuration on a single box just to test the config, but
   a production cluster is likely to have all the same port numbers
   being used in <Connectors>. You mention same IP/port but don't say
   why that would be a good or bad idea.

2. Why is ProxyPass defined within a <Location> element?

3. Why aren't you using ProxyPassReverse?

4. Why don't you explain the use of the 'retry' parameter? Why are you
   explicitly defining it to be it's default (60)?

Also, why wouldn't you include a link to the official documentation
(http://httpd.apache.org/docs/2.2/mod/mod_proxy_balancer.html) and
(http://tomcat.apache.org/tomcat-6.0-doc/cluster-howto.html)? The
official documentation contains working examples, too.

About the only thing you needed to add to the official documentation was
to talk about the stickysession and route parameters and how they
connect-up to the Tomcat configuration.

Presumably, your audience is already familiar with setting up Tomcat and
possibly Apache httpd. I think you spend too much time on those
configurations and too little explaining how to wire the sticky sessions
and jvm routes. Sure, you cover them, but it gets lost in all the other
stuff.

Don't get me wrong: I'm glad people are writing blog entries like this
and trying to publish good information, but I have seen way too many
"howtos", "tutorials", etc. that end up publishing The Way To Do Itâ„¢ and
none of the readers end up learning anything. The result is that folks
come to the list and say "I read this guy's tutorial and now my
configuration doesn't work". The problem is that they've been given an
example configuration with no background information. No depth.

You don't cover anything about the implications of load-balancing across
multiple stateful servers. This gets into clustering, which you only
really mention once. The reader is left to either a) wonder what a
cluster is or b) come to the mistaken conclusion that a cluster is a
group of servers being load-balanced.

I would recommend making this a series of articles, and go into further
depth in later installments. This first one should have been titled
"this configuration works; more to come later".

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkmZ8v8ACgkQ9CaO5/Lv0PDMCgCgiZoqn2FDLp/7qQMch/UZGn1u
EYcAniZImGWytuor6UqrzX2L7veGtOiV
=4CpF
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tutorial: Load Balancing Tomcat with Apache

Posted by GF <ga...@gmail.com>.
Thank You for feedback.
The answers:

1) I'll add that note. You're right, It's important.
2) Usually, I keep the main ServerRoot of Apache Httpd just as a
"dummy" website, and even if I have just one website to setup, I
always create a virtual host (for example on Debian, using the
symbolic linking to unable/disable virtual hosts, it's so easy to
switch them on or off and I love this feature :-)

On Mon, Feb 16, 2009 at 11:19 PM, Ben Stringer <be...@burbong.com> wrote:
> Hi,
>
> Nice work on the tutorial. I have some feedback.
>
> 1) I would mention the version of the httpd and tomcat that you are using.
> For instance, the load balancing mechanism you are using in httpd is only
> supported by Apache Httpd 2.2
>
> 2) I don't see why you need to create a virtual host in httpd, unless you
> are using the same httpdto host other sites. Otherwise, this just
> complicates the httpd configuration.
>
> Cheers, Ben
>
>> Hello everyone
>> I wrote a tutorial about load balancing Tomcat with Apache Proxy Module.
>>
>> This is the url:
>> http://www.zulutown.com/blog/2009/02/16/java-ee-load-balancing-with-tomcat-and-apache/
>> Any feedback will be really appreciated.
>>
>> Thank You.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Tutorial: Load Balancing Tomcat with Apache

Posted by Ben Stringer <be...@burbong.com>.
Hi,

Nice work on the tutorial. I have some feedback.

1) I would mention the version of the httpd and tomcat that you are using.
For instance, the load balancing mechanism you are using in httpd is only
supported by Apache Httpd 2.2

2) I don't see why you need to create a virtual host in httpd, unless you
are using the same httpdto host other sites. Otherwise, this just
complicates the httpd configuration.

Cheers, Ben

> Hello everyone
> I wrote a tutorial about load balancing Tomcat with Apache Proxy Module.
>
> This is the url:
> http://www.zulutown.com/blog/2009/02/16/java-ee-load-balancing-with-tomcat-and-apache/
> Any feedback will be really appreciated.
>
> Thank You.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org