You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gunnar Schmid <Gu...@gmx.de> on 2008/04/15 21:12:13 UTC

sticky sessions without cookies?

Hi,

I'm looking for a way to have sticky sessions without cookies.
But let me explain our scenario first, maybe there's another approach I
currently can't think of.

We are running a JSF based application on two Tomcat 5.5 servers, both
behind a load balancer with sticky sessions enabled ("crossroads", using
cookies for stickyness). The application requires sessions, so statelessness
is not an option. While the application itself would probably work without
cookies (using URL rewriting) the load balancer can't achieve the session
stickyness without cookies.

Everything works well, but unfortunately there are some users out there who
turn off cookies in their browsers (which results in balancing to the
different backends, and therefore starting a new session - which appears as
a not working application, more or less).

So what other options are there, assuming that upgrading Tomcat to 6.0
and/or using other open source software is possible?
I had a look into Tomcat's clustering and session replication, but the
how-to document states that cookies are required for this, so no advantage
in this regard.
I also checked Terracotta JVM clustering, but the docs recommend to use a
load balancer with sticky sessions, so again no advantage to current setup.

Do you have any other ideas or suggestions? 

Thanks a lot,
Gunnar

-- 
View this message in context: http://www.nabble.com/sticky-sessions-without-cookies--tp16705364p16705364.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: sticky sessions without cookies?

Posted by Gunnar Schmid <Gu...@gmx.de>.

sharrissf wrote:
> 
> I see, well just as an FYI, the terracotta thing will work for you then.
> Sticky load balancing just keeps the load on terracotta lighter but your
> session will be everywhere you need it when you need it. So for the people
> who don't do cookies they can hit any appserver
> 

OK, I see, thanks. I'll try to set this up in an test environment and see
how it works for me.
-- 
View this message in context: http://www.nabble.com/sticky-sessions-without-cookies--tp16705364p16748765.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: sticky sessions without cookies?

Posted by sharrissf <st...@terracottatech.com>.
I see, well just as an FYI, the terracotta thing will work for you then.
Sticky load balancing just keeps the load on terracotta lighter but your
session will be everywhere you need it when you need it. So for the people
who don't do cookies they can hit any appserver


Gunnar Schmid wrote:
> 
> 
> sharrissf wrote:
>> 
>> Quick question... Are you asking to run with no sticky load balancer or
>> do you just want to make
>> sure that when the stickiness is wrong the session is safe?
>> 
> 
> I want to make sure that users who have turned off cookies in their
> browser can use our application. I have no preference how this is
> achieved, either by avoiding the use of cookies (in app and load balancer)
> or by clustering/replication so that it doesn't matter which app server
> you're hitting.
> 

-- 
View this message in context: http://www.nabble.com/sticky-sessions-without-cookies--tp16705364p16723762.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: sticky sessions without cookies?

Posted by Gunnar Schmid <Gu...@gmx.de>.

sharrissf wrote:
> 
> Quick question... Are you asking to run with no sticky load balancer or do
> you just want to make
> sure that when the stickiness is wrong the session is safe?
> 

I want to make sure that users who have turned off cookies in their browser
can use our application. I have no preference how this is achieved, either
by avoiding the use of cookies (in app and load balancer) or by
clustering/replication so that it doesn't matter which app server you're
hitting.
-- 
View this message in context: http://www.nabble.com/sticky-sessions-without-cookies--tp16705364p16717689.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: sticky sessions without cookies?

Posted by sharrissf <st...@terracottatech.com>.
Quick question... Are you asking to run with no sticky load balancer or do
you just want to make
sure that when the stickiness is wrong the session is safe?


Gunnar Schmid wrote:
> 
> Hi,
> 
> I'm looking for a way to have sticky sessions without cookies.
> But let me explain our scenario first, maybe there's another approach I
> currently can't think of.
> 
> We are running a JSF based application on two Tomcat 5.5 servers, both
> behind a load balancer with sticky sessions enabled ("crossroads", using
> cookies for stickyness). The application requires sessions, so
> statelessness is not an option. While the application itself would
> probably work without cookies (using URL rewriting) the load balancer
> can't achieve the session stickyness without cookies.
> 
> Everything works well, but unfortunately there are some users out there
> who turn off cookies in their browsers (which results in balancing to the
> different backends, and therefore starting a new session - which appears
> as a not working application, more or less).
> 
> So what other options are there, assuming that upgrading Tomcat to 6.0
> and/or using other open source software is possible?
> I had a look into Tomcat's clustering and session replication, but the
> how-to document states that cookies are required for this, so no advantage
> in this regard.
> I also checked Terracotta JVM clustering, but the docs recommend to use a
> load balancer with sticky sessions, so again no advantage to current
> setup.
> 
> Do you have any other ideas or suggestions? 
> 
> Thanks a lot,
> Gunnar
> 
> 

-- 
View this message in context: http://www.nabble.com/sticky-sessions-without-cookies--tp16705364p16713299.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org