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 8C7CAE9E3 for ; Tue, 5 Feb 2013 23:11:00 +0000 (UTC) Received: (qmail 19731 invoked by uid 500); 5 Feb 2013 23:10:57 -0000 Delivered-To: apmail-tomcat-users-archive@tomcat.apache.org Received: (qmail 19631 invoked by uid 500); 5 Feb 2013 23:10: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 19539 invoked by uid 99); 5 Feb 2013 23:10:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 23:10:56 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [76.96.62.32] (HELO qmta03.westchester.pa.mail.comcast.net) (76.96.62.32) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 05 Feb 2013 23:10:41 +0000 Received: from omta20.westchester.pa.mail.comcast.net ([76.96.62.71]) by qmta03.westchester.pa.mail.comcast.net with comcast id wcuL1k0061YDfWL53nAK4p; Tue, 05 Feb 2013 23:10:19 +0000 Received: from Christophers-MacBook-Pro.local ([69.143.109.145]) by omta20.westchester.pa.mail.comcast.net with comcast id wnAH1k00u38FjT13gnAJSZ; Tue, 05 Feb 2013 23:10:19 +0000 Message-ID: <51119157.8050207@christopherschultz.net> Date: Tue, 05 Feb 2013 18:10:15 -0500 From: Christopher Schultz User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130107 Thunderbird/17.0.2 MIME-Version: 1.0 To: Tomcat Users List Subject: Re: [Seriously OT] Help in diagnosing server unresponsiveness References: <510C157C.2000100@christopherschultz.net> In-Reply-To: X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20121106; t=1360105820; bh=D1UzDcEkmnHTKY2D3vog+lY8HVBUXaHvC7ZiKKzr4AA=; h=Received:Received:Message-ID:Date:From:MIME-Version:To:Subject: Content-Type; b=eLKUPknB1eazV/WD+mPe94sCsIy2www2WgaU7HEhQhcsRGqMbYF2NS5BcFmayIR/A U2mnAZuFYjrChN6WcoNqQW2Dl0h8Rt8MXJCuPevK6As4JoWL/Wf3DiGQFezIk0hKSv g2YqKDbgS8Uwlao+AXb93VbBkw0V6vDzZdeeFMGWkxecrkLCYyOC9w07NtVj/PjY0G NpjMZiA3Fwjqg1P2oOUuiQ18eDFdb11+GVc4BzG3JyzAGv8TYT4xdsxy+3ZbFUzax5 EG4285SZLaYrLApO1E3+iEb6aBP96mfcRB2Td+vX+Wgexfcd2RHsqcIZleK84mXYS+ nlrZS4e7ck8GQ== X-Virus-Checked: Checked by ClamAV on apache.org -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Chris, On 2/2/13 11:47 AM, chris derham wrote: >> In the Java world, most people would only call it a consider it >> a "cluster" if the app servers actually know about each other -- >> for instance, if you are using session replication. IMO session >> replication is a dog, and there are better ways to achieve >> similar goals that yield much higher performance. > > I am curious to hear your thoughts - care to elaborate? We've totally hijacked Zoran's thread. After this, let's move to a new OT thread (or threads). Tomcat's session replication basically blasts everything around to all other Tomcat instances (or you can choose one and use BackupManager). Every time you modify your session, you get a burst of traffic between all your cluster members. I dunno if Tomcat bothers updating the last-touched-time on the session if that's the only thing that changed during the request, but if so it means that there is a burst of replication traffic after /every single request/. Most web applications I've seen use HttpSession for a variety of things, and not all of them need to be replicated. If you want to hand-roll some wrapper objects to allow you to stash things into the session that are not serializable (or shouldn't be serialized, like a "transient" wrapper) you can avoid some of this stuff, but you really shouldn't have to do this kind of thing. Instead, rely on some other data-sharing mechanism such as a database, memcached, etc. You can create a token that you pass to the client just like a JSESSIONID cookie and if they fail-over to a different node, you can still fetch your stuff when you need it. The problem with using HttpSession + session replication is that lazy programmers will stash just about anything into the session without thinking about it, and it will get replicated all over the place. If you use an external data storage mechanism, it's much more obvious that something "special" is happening, and (hopefully) your devs will take more care with dipping into that data store all the time. - -chris -----BEGIN PGP SIGNATURE----- Version: GnuPG/MacGPG2 v2.0.17 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEAREIAAYFAlERkVcACgkQ9CaO5/Lv0PD0YACgg0mbr02sf0YHp1u+TeXT0oo/ eEsAoJyirF+Vz5YsGa3t7WbTXuq8uAuc =c0H2 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org For additional commands, e-mail: users-help@tomcat.apache.org