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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to