tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yogesh hingmire <yogesh.hingm...@gmail.com>
Subject Re: Designing for Load on TomCat
Date Sat, 04 May 2013 12:20:13 GMT
Thanks Andre and sorry for not mentioning about the other content that are
actually requested by http get's from the jsp served.,
There is quite a lot of ajax calls and static content and that can be
served out of httpd, but as of now it is not. I know not the best way, so i
assume i have to increment my thread count correspondingly..

While planning to threads on a single node, do i have to take into account
the failure scenario where say all other 4 nodes fail and just this one
node has to serve out the entire web app load. For that, do i have to
provision the thread count as many as 4 times what i arrive for a single
node ?

Your thoughts?


On Sat, May 4, 2013 at 7:07 AM, André Warnier <aw@ice-sa.com> wrote:

> yogesh hingmire wrote:
>
>> While planning / designing to build a web app that must scale to 2000
>> concurrent users, distributed across 5 Tomcat nodes in a cluster, Apache
>> at
>> the front of course and the ability to serve 20 concurrent requests per
>> seconds during business hours, with a page response time of 5 seconds, how
>> would we go about the ask ? What Apache / Tomcat / System (CPU/JVM)
>> parameters should be considered for this design ?
>>
>>
> I will provide the ABC, and leave the details for someone else.
> You have 20 requests arriving per second, and it takes 5 seconds to
> process one request and return the response.
> So, over time, it will look like this
>
> Time   new requests   requests in-process  requests terminated
>
> 0        20              20                      0
> +1s      20              40                      0
> +2s      20              60                      0
> +3s      20              80                      0
> +4s      20             100                      0
> +5s      20             100                     20
> +6s      20             100                     40
> +7s      20             100                     60
> etc...
>
> So, in principle, and assuming nothing else is going on, you need 100
> concurrent threads in Tomcat to process these requests.
> (I would take a healthy margin of security and double that).
> Whether for that you need a cluster of Tomcats is another discussion.
> And how much memory you need to allocate to your Tomcat(s) JVM(s) is a
> function of what your webapp needs, to process one request.
>
> The numer of concurrent users should be relatively irrelevant, if all you
> mean by that is that some of these requests come from the same user, but
> they are otherwise independent of one another.
>
> Note that I have a suspicion that what you describe as "requests" above
> probably only count the requests to your webapp code, and do not count the
> additional requests for stylesheets, images, etc.. which may be embedded in
> any page that the user's browser eventually displays.
> So unless you plan on serving those directly from the Apache httpd
> front-end, you should take them into account too.
>
>
>
> ------------------------------**------------------------------**---------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.**apache.org<users-unsubscribe@tomcat.apache.org>
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message