You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Nicholas Tham Soon Hing <sh...@tm.net.my> on 2004/02/01 09:24:34 UTC
Load Balancing Problem...Urgent
Hi,
I'm an undergraduate student from Malaysia. I'm using Tomcat 4.1.27 to
do a load balancing system. This system consists of several tomcat
servers and one of them will be the load balancer. When a user accesses
a url page, the load balancer will select a server to response to that
request. The problem that I faced now is I don't know how to make the
selected server to process the request from user browser. As I know the
tomcat connector will assign the socket to processor to process it. So
how can I send the request from load balancer connector to the connector
in that selected server? What should I send (socket? Input stream? Or
the request line? How to get these?)?After the selected server has
finished the process, how can the server send back the response to load
balancer and then the load balancer sends back to user? Can anyone help
me on this? Or is there any one has done this before? Can someone show
me the sample code for solving this problem? It's urgent. Your help is
appreciated.
Thanks,
Nicholas Tham
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Load Balancing Problem...Urgent
Posted by David Rees <dr...@greenhydrant.com>.
Kok Wei, Koh wrote, On 2/1/2004 1:33 AM:
>
> Why not go with the latest:-
> * apache 1.3.29
I would recommend Apache 2.0.48 myself as it has the mod_deflate module
which enables gzip compression and can save a LOT of bandwidth as well.
I've been using Apache 2 along with mod_jk and load-balanced Tomcats
with no problems.
-Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Load Balancing Problem...Urgent
Posted by "Kok Wei, Koh" <ko...@imocha.com.my>.
Hi Nicholas,
It is great to see undergraduates students (especially from Malaysia),
using Tomcat in their projects ;-) High five dude!
Ok first of all, if you're building a web application you may want to
consider placing Apache 1.3.x in front of your Tomcat instance, to serve
a all static contents such as html/images and proxy all tomcat related
stuffs to the Tomcat instances.
Why not go with the latest:-
* apache 1.3.29
* tomcat 4.1.29
* and the mod_jk connector
You may find a very good tutorial on how to setup load balanced Tomcat
servers at the following URL:-
http://www.ubeans.com/tomcat/index.html
To answer your question...
<snip>
how can I send the request from load balancer connector to the connector
in that selected server?
After the selected server has finished the process, how can the server
send back the response to load balancer and then the load balancer sends
back to user?
</snip>
An example of a complete flow of a request to a web application eg:
http://www.xxx.com/myapp/start.do is ...
User -> Apache -> Tomcat -> Apache -> User
The way Apache determines if a particular request is to be proxied to
Tomcar, is via the JkMount directive in the httpd.conf, see below:
JkMount /myapp/* loadbalancer
where "loadbalancer" is a worker of type "lb".
Please go through the above URL to find out more.
Good luck!
Nicholas Tham Soon Hing wrote:
> Hi,
>
> I'm an undergraduate student from Malaysia. I'm using Tomcat 4.1.27 to
> do a load balancing system. This system consists of several tomcat
> servers and one of them will be the load balancer. When a user accesses
> a url page, the load balancer will select a server to response to that
> request. The problem that I faced now is I don't know how to make the
> selected server to process the request from user browser. As I know the
> tomcat connector will assign the socket to processor to process it. So
> how can I send the request from load balancer connector to the connector
> in that selected server? What should I send (socket? Input stream? Or
> the request line? How to get these?)?After the selected server has
> finished the process, how can the server send back the response to load
> balancer and then the load balancer sends back to user? Can anyone help
> me on this? Or is there any one has done this before? Can someone show
> me the sample code for solving this problem? It's urgent. Your help is
> appreciated.
>
> Thanks,
> Nicholas Tham
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org