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 4CF70D5B2 for ; Wed, 17 Oct 2012 10:37:00 +0000 (UTC) Received: (qmail 35730 invoked by uid 500); 17 Oct 2012 10:36:57 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 35637 invoked by uid 500); 17 Oct 2012 10:36:57 -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 35608 invoked by uid 99); 17 Oct 2012 10:36:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Oct 2012 10:36:56 +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; Wed, 17 Oct 2012 10:36:46 +0000 Received: from [192.168.245.129] (p549E8B0D.dip0.t-ipconnect.de [84.158.139.13]) (Authenticated sender: andre.warnier@ice-sa.com) by tor.combios.es (Postfix) with ESMTPA id BA4AE3C0126 for ; Wed, 17 Oct 2012 12:36:38 +0200 (CEST) Message-ID: <507E8A25.7090008@ice-sa.com> Date: Wed, 17 Oct 2012 12:36:21 +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: asking advice for tomcat 7 config References: <507E7349.2040907@pidster.com> <507E7F29.7070307@ice-sa.com> <507E8035.20400@apache.org> <507E8225.8060203@ice-sa.com> <507E882C.5060700@apache.org> In-Reply-To: <507E882C.5060700@apache.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org Mark Thomas wrote: > On 17/10/2012 11:02, Andr� Warnier wrote: >> Mark Thomas wrote: >>> On 17/10/2012 10:49, Andr� Warnier wrote: >>>> 1) So it means that if a client connects to the server, but does not >>>> send any request line for a while on that connection, the server will >>>> allocate a thread to serve the request; this thread will wait up to 20 s >>>> (on HTTP) or 60 s. (on HTTPS), before timing out and returning to the >>>> pool of available threads. >>>> Of course only a malicious client would do that.. >>> Nope. This is the NIO connector. The request line is read using >>> non-blocking IO. The (simulated) blocking IO only starts once the first >>> header is received and continues until the entire request is received. >>> It then goes back to non-blocking for the next request line. >>> >>> >>>> 2) it also means that a perfectly non-malicious client can connect to >>>> the server, and send a first request on the connection; the server will >>>> allocate a thread to handle this request; and then, if the same client >>>> has no more requests to send for a while, this thread will nevertheless >>>> remain waiting on this connection for 20 s. (HTTP) or 60 s. (HTTPS), >>>> just in case the client /would/ send another request on it. >>>> During this time, the thread is unavailable to process other client >>>> requests. >>> Again, nope. The thread is released between the requests. >>> >> Sorry, I stand corrected, I missed the NIO part. >> >> For the record, is the above correct for the standard BIO connector >> (and in part for the APR connector) ? > > BIO yes, the above is correct. > > NIO is actually non-blocker for the request headers as well. > > APR is is non-blocking between requests. > > See the summary chart at [1] for more. > > Mark > > [1] > http://tomcat.apache.org/tomcat-7.0-doc/config/http.html#Connector_Comparison > Thanks. Yes, I saw that table, but it is may be a bit "summarised" for the average Tomcat user (or sysadmin). Is there somewhere a more global/in-depth explanation of how this stuff all works ? (request processing, thread allocation/deallocation etc., other than snippets here and there related to the various connector attributes or the source code comments ?) --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org