tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Balahura" <rj-ba...@sciborg.uwaterloo.ca>
Subject RESIN VS TOMCAT
Date Thu, 25 May 2000 07:50:42 GMT
Does Tomcat offer load balancing? I have read that Resin supports load
balancing.

-----Original Message-----
From: Jim Rudnicki [mailto:jdr5list@pacbell.net]
Sent: Thursday, May 25, 2000 3:31 AM
To: tomcat-user@jakarta.apache.org
Cc: ssi@austria.eu.net
Subject: Re: Tomcat & SingleThreadModel?


Note this snip from the servlet spec:

In the case of a servlet that implements the SingleThreadModel interface,
the servlet container
may instantiate multiple instances of that servlet so that it can handle a
heavy request load while
still serializing requests to a single instance.

The key word is "may instantiate".  That does not exclude that the server
can simply block the second request until the first completes, which is just
what you saw.  The more I hear about SingleThreadModel, the less it seems to
really help.  You could run your servlet on another engine and it could
behave different--that'd be fun.

Jim

----- Original Message -----
From: "Christoph Mack" <C.Mack@austria.eu.net>
To: <tomcat-user@jakarta.apache.org>
Cc: <ssi@austria.eu.net>
Sent: Wednesday, May 24, 2000 8:29 AM
Subject: Tomcat & SingleThreadModel?


> Hello!
>
> I have Tomcat 3.1 installed on a x86 SuSE 6.3 Linux. I implemented the
> following very simple servlet:
>
> import java.io.*;
> import javax.servlet.*;
> import javax.servlet.http.*;
>
> public class Loop extends HttpServlet
>        implements SingleThreadModel
> {
>     int global;
>
>     public void doGet(HttpServletRequest req,
>                       HttpServletResponse res)
>            throws ServletException, IOException
>     {
>         int j;
>         res.setContentType("text/html");
>         PrintWriter out = res.getWriter();
>         for(j=0;j<1000000;j++) {
>           out.println(global++);
>         }
>     }
> }
>
> Next I startet two WebBrowsers to connect to my servlet. I expected
> Tomcat to create two servlet instances (one for each GET-reqest) and
> thought output will be generated and displayed concurrently.
> But what really happened is that the second request was obviously NOT
> served concurrently. The second WebBrowser started to display data AFTER
> the first WebBrowser finished.
> What went wrong???
>


--------------------------------------------------------------------------
To unsubscribe, email: tomcat-user-unsubscribe@jakarta.apache.org
For additional commmands, email: tomcat-user-help@jakarta.apache.org


Mime
View raw message