Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4BF3BCF0C for ; Tue, 8 May 2012 18:48:03 +0000 (UTC) Received: (qmail 83789 invoked by uid 500); 8 May 2012 18:48:02 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 83688 invoked by uid 500); 8 May 2012 18:48:02 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 83656 invoked by uid 99); 8 May 2012 18:48:02 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 18:48:02 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of costin@gmail.com designates 209.85.214.173 as permitted sender) Received: from [209.85.214.173] (HELO mail-ob0-f173.google.com) (209.85.214.173) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 May 2012 18:47:54 +0000 Received: by obbwd20 with SMTP id wd20so13772792obb.18 for ; Tue, 08 May 2012 11:47:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=VBGX2M+NkdoXXHeJO6lMjO1r1ZMhnji6toYYqMXi45I=; b=esRrI0EHwDvp8EtoF/VZxkikO0t2nxuWenlrYVtwAw197B5vSYyh5LkvtuRdoVkHpU hNZ9ytemgpE5I9/Y26SITKmPQdFkjLgFXKrgy5S59PoCctSG2c6zYPejQ9ScjZjuez4K EkUmN9Eywg2+IwlxzAPTk1l52+k12bMvL9i+D5UwxyVbR9pa86AdXa8aJYtrSIKcsiU4 ZbmM8DqYrJ6FgZd5h3iPfqL7hSIImV3I3q/GK0tHEJs8rRjGf7KABknRUyQGg5GdPsr4 Pezxusr2+xgJ5JjeF7H5ViumNYRthmf5gR5htL1ser44SUS+39yyvlXvnE3sWKN9Btpd lfvw== MIME-Version: 1.0 Received: by 10.182.152.4 with SMTP id uu4mr1394708obb.26.1336502853103; Tue, 08 May 2012 11:47:33 -0700 (PDT) Received: by 10.182.8.71 with HTTP; Tue, 8 May 2012 11:47:33 -0700 (PDT) In-Reply-To: <4FA95F93.6080903@apache.org> References: <4FA7F738.9060401@apache.org> <4FA85061.1010301@apache.org> <4FA8B799.9060505@apache.org> <4FA8C033.1070801@apache.org> <4FA8F564.5010108@apache.org> <4FA95F93.6080903@apache.org> Date: Tue, 8 May 2012 11:47:33 -0700 Message-ID: Subject: Re: Purpose of unlockAccept From: Costin Manolache To: Tomcat Developers List Content-Type: multipart/alternative; boundary=f46d0444ece5ccf04704bf8ad130 --f46d0444ece5ccf04704bf8ad130 Content-Type: text/plain; charset=UTF-8 On Tue, May 8, 2012 at 11:01 AM, Mladen Turk wrote: > On 05/08/2012 07:09 PM, Costin Manolache wrote: > >> IMHO neither 'graceful shutdown' nor 'deploy' are best served by not >> accepting connections: >> - for 'graceful' - a number of connections will get to backlog and >> timeout, >> > > Not sure if ServerSocket.close() would cause cascade close of all > accepted sockets that are still running. If not, even pause could > just close the socket and then init if needed. > In that case clients will not fill the backlog. You may still want to accept requests for existing sessions. Both 'graceful shutdown' and app deploy are important cases - it's just that current 'pause()' is not that good for either of them, if you really want to cleanup... Maybe an option to return 503 or custom status/headers - so people can adjust to various LBs. Costin > > > which is bad for the user. A better solution would be to support an option >> to accept and return immediately ( maybe with a way to do this only for >> requests not matching any existing session ). I never worked with a LB >> that >> detects status based only on not accepting connections and timeout. >> >> > Hmm, right, a valid option if LB won't get confused. > > > >> Besides that - is there any other use for pause() ? Maybe that's what >> should be removed/replaced :-). The behavior ( delay/timeout all TCP >> connections until backlog is full, then reject ) doesn't seem ideal. >> >> > Agreed. A 'pause' or invalidating backed node should be done in LB. > We are doing that in mod_jk, mod_proxy, mod_cluster, etc. > If LB wrongly instructs the clients to connect to a node that is going to > get shutdown we can't do much about it. Client will experience one > or other type of connection failures. > > > > > Regards > -- > ^TM > > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.**org > For additional commands, e-mail: dev-help@tomcat.apache.org > > --f46d0444ece5ccf04704bf8ad130--