Return-Path: X-Original-To: apmail-tomcat-users-archive@www.apache.org Delivered-To: apmail-tomcat-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 084BF100D7 for ; Sat, 4 May 2013 12:08:23 +0000 (UTC) Received: (qmail 53428 invoked by uid 500); 4 May 2013 12:08:20 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 53279 invoked by uid 500); 4 May 2013 12:08:19 -0000 Mailing-List: contact users-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Users List" Delivered-To: mailing list users@tomcat.apache.org Received: (qmail 53249 invoked by uid 99); 4 May 2013 12:08:18 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 May 2013 12:08:18 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of aw@ice-sa.com designates 212.85.38.228 as permitted sender) Received: from [212.85.38.228] (HELO tor.combios.es) (212.85.38.228) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 May 2013 12:08:11 +0000 Received: from [192.168.2.206] (stargate.glomas.de [213.23.110.130]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id 0FCC73C2AFB for ; Sat, 4 May 2013 14:08:15 +0200 (CEST) Message-ID: <5184FA11.7040004@ice-sa.com> Date: Sat, 04 May 2013 14:07:45 +0200 From: =?ISO-8859-1?Q?Andr=E9_Warnier?= Reply-To: Tomcat Users List User-Agent: Thunderbird 2.0.0.23 (Windows/20090812) MIME-Version: 1.0 To: Tomcat Users List Subject: Re: Designing for Load on TomCat References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 For additional commands, e-mail: users-help@tomcat.apache.org