Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
Apache Tomcat General discussion of the Apache Tomcat servlet container. For discussions specific to the Professional Apache Tomcat book, please see the book discussion forum for that book.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Apache Tomcat section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old December 7th, 2005, 11:25 AM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sticky Sessions

Hi,

I am using Apache 2.0.46 with tomcat 4.1.18. I recently configured
the high availability (load balancing), but did not give the sticky
sessions.

Can any one let me know how to do that and also what is the disadvantage if i do not configure sticky sessions?

Any help is thankful.
Regards
Subir S

  #2 (permalink)  
Old December 7th, 2005, 12:40 PM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi there,
if you are working with mod_jk the default loadbalancer (type lb) has sticky session enabled by default providing you have setup your jmRoute properly in each catalina engine (server.xml on each server) [or at least that how I understand it]

(extract from the workers.properties)
#------ DEFAULT LOAD BALANCER WORKER DEFINITION ----------------------
#---------------------------------------------------------------------
#

#
# The loadbalancer (type lb) workers perform wighted round-robin
# load balancing with sticky sessions.
# Note:
# ----> If a worker dies, the load balancer will check its state
# once in a while. Until then all work is redirected to peer
# workers.
#worker.loadbalancer.type=lb
#worker.loadbalancer.balanced_workers=yourworker


If you do not apply the sticky session then you have to make sure that the sessions info are shared between your Tomcat instances otherwise you will lose the sessions details at each switch.

Hope this helps
Fanch
  #3 (permalink)  
Old December 8th, 2005, 12:23 AM
Registered User
 
Join Date: Dec 2005
Location: , , .
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

Thanks for the reply.

I havent configured my jvmroute in server.xml. I did not understand its advantage.

Is the scenario like this. I have a portal to which i "login".
If that tomcat instance crashes due to some reason then i will have to relogin my portal in the new tomcat instance[ it is also a balanced worker].

can you explain the scenario in detail. As my tomcat is 4.1.18 i do not have any clustering. So how does it help to have sticky sessions.

Regards
Subir S



Similar Threads
Thread Thread Starter Forum Replies Last Post
sessions p2ptolu Classic ASP Components 3 March 17th, 2005 06:31 AM
Sessions 2540EA BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 0 February 20th, 2005 05:42 AM
Sticky Sessions while using jk2 on apache-jboss ajithsiyer BOOK: Professional Apache Tomcat 0 September 2nd, 2004 06:15 AM
Mixing classic ASP sessions with ASP.NET sessions scorpion_king General .NET 2 August 4th, 2004 08:20 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.