File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes session sharing between to server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "session sharing between to server" Watch "session sharing between to server" New topic

session sharing between to server

Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

How to share session between servers. like google and gmail

Java Best Practices
Linux Best Practices
Amortization Calculator

srinivas srinivasmeenavalli
Ranch Hand

Joined: Jul 13, 2008
Posts: 65
You have to refer load balancing technique to share sessions between servers.
which application server you use ?
refer below URL for Tomcat.
Tomcat has limitations
This is a simple implemention of a rules-based load balancer. It was not designed as a replacement for other load-balancing mechanisms used for high traffic environments. Rather, it is a simple, pure Java, easily extensible, and fast way to direct traffic among multiple servers.

I would prefer Apache web sever for high traffic environments. I am not sure
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33106

I think Srinivas is referring to sharing a session across clones of the same server. (different boxes running gmail.)

Different domains sharing sessions is different. It is usually done by storing the data in a database or a cookie. You need to be on the same domain for a cookie to work. Which google definitely uses to share whether you are logged in to your google account. They also use a database for your more detailed profile information.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
I agree. Here's the link:
subject: session sharing between to server
It's not a secret anymore!