Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 88180 invoked from network); 17 Dec 2009 20:08:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 17 Dec 2009 20:08:39 -0000 Received: (qmail 73702 invoked by uid 500); 17 Dec 2009 20:08:38 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 73614 invoked by uid 500); 17 Dec 2009 20:08:38 -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 73603 invoked by uid 99); 17 Dec 2009 20:08:38 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 20:08:38 +0000 X-ASF-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00 X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [64.46.156.80] (HELO outland.mohawksoft.com) (64.46.156.80) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 17 Dec 2009 20:08:35 +0000 Received: from outland.mohawksoft.com (localhost.localdomain [127.0.0.1]) by outland.mohawksoft.com (8.13.1/8.13.1) with ESMTP id nBHKOa8w001819 for ; Thu, 17 Dec 2009 15:24:36 -0500 Received: (from mohawk@localhost) by outland.mohawksoft.com (8.13.1/8.13.3/Submit) id nBHKOaVX001813; Thu, 17 Dec 2009 15:24:36 -0500 X-Authentication-Warning: outland.mohawksoft.com: mohawk set sender to markw@mohawksoft.com using -f Received: from 75.147.54.13 (SquirrelMail authenticated user markw) by mail.mohawksoft.com with HTTP; Thu, 17 Dec 2009 15:24:35 -0500 Message-ID: <3ca3a8bc45c7e2868f3cedba1ed897cf.squirrel@mail.mohawksoft.com> In-Reply-To: <353769790912171143u26895067x1c2db2eea66bc95b@mail.gmail.com> References: <353769790912111837u6a1e76fana32028ff6f301550@mail.gmail.com> <4B239567.9000403@mohawksoft.com> <353769790912171143u26895067x1c2db2eea66bc95b@mail.gmail.com> Date: Thu, 17 Dec 2009 15:24:35 -0500 Subject: Re: Storing Tomcat Sessions to MySQL (and Memcached) Round-Robin without sticky sessions From: markw@mohawksoft.com To: "Tomcat Developers List" User-Agent: SquirrelMail/1.4.19 MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal > Hi Mark, Thanks for the reply. > > In your opinion should we be using local memory to store any session > data? The discussion right now is to store everything to cache+db and > nothing in local memory. The problem with any cache system is cache coherency. Tomcat takes the easy way out by requiring that sessions be "sticky" to a single box, and using local access management. Sticky session have well known scalability issues. The "right" answer, for an arbitrary definition of "right," is a little more complicated. A UDP based server to reduce the TCP/IP overhead. The protocol should be something like this: (pseudo code) class Session { UUID session; } Object lockSession(uuid session) Object lockSession(Object session) void unlockSession(Object session) void abandonSession(uuid session) Object peekSession(uuid session) Object peekSession(Object session) > On Sat, Dec 12, 2009 at 5:06 AM, Mark Woodward > wrote: >> About 12 years ago, I wrote a system called msession for PHP that was >> basically a high-speed cache for sessions. I have been using it for PHP >> sites ever since. The one thing I've never liked about tomcat is sticky >> sessions. It doesn't scale well enough. With gig ethernet, a shared >> network >> based caching system is probably the best way to go. >> >> Also, it would be good if the format of the session data could be used >> by >> other platforms, i.e. PHP and Tomcat could share sessions. >> >> Is anyone actively working on the session management of tomcat? >> >> >> anthonyvierra@gmail.com wrote: >>> >>> Hello, Thanks in advance for your help. >>> >>> I would like to know if anyone is currently modifying, has modified, >>> or plans to modify Tomcat 6.0.20 to store/read sessions directly in >>> Memcached + MySQL to enable session persistence with round-robin and >>> without sticky sessions? >>> >>> If so would you be so kind as to point me in the right direction? >>> >>> Our top level design requirement is 'no sticky sessions' + 'round >>> robin' + 'MySQL or Amazon SimpleDB' >>> >>> After getting this solution working I would like to donate the code to >>> the Tomcat project. It will be useful for those wishing to deploy >>> Tomcat + Amazon EC2 + Amazon Elastic Load Balancer. >>> >>> Thank you, >>> Anthony >>> 925-456-4343 >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >>> For additional commands, e-mail: dev-help@tomcat.apache.org >>> >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: dev-help@tomcat.apache.org >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org