mchack wrote:
Question.

I would like to front my web application with multiple apache instances
(each one HA). Each instance would support sticky sessions and incoming
traffic would be load shared between the sites using DNS.  Upon DNS expiry
which could be in the middle of a session, a client could be redirected back
to a random apache instance.
1. Is it possible to share session information between 2 apache mod_jk
instances ?

mod_jk does not really have any session information. It only uses stateless routing information to implement stickyness. You could call that session information in some broader sense.

So you give each backend instance a unique name via the jvmRoute attribute in Tomcats server.xml. Tomcat will then stick this individual name to all session ids it produces. Whenever a request goes through mod_jk, the module detects the jvmRoute and looks for the correct worker (in the simplest configuration this means a worker with the same name).

To build up a global topology

- you would usually use the distance attribute, to let mod_jk know, which backends are close (use only those, as long as they are available, and the request doesn't have a session id from another node in it. If it does, send it to the other=correct node) - in case you wil also use session replication on Tomcat nodes, use the domain attribute of the workers, to inform mod_jk, which workers form a replication group (=Tomcat cluster), so that after a node failure requests can be rerouted to a node, having the same sessions.

2. Or is there any way to insure that a particular client dns request ends
up at the same apache instance short of some sort of complex GSLB solution?

Not the same Apache instance (this decision is not done by mod_jk), but if the request jumped to a new location because of another DNS lookup in the middle of a session, and if traffic between the locations is allowed, mod_jk can correctly forward the request to the Tomcat carrying the session in the other location (see jvmRoute above).

Usually, this traffic between the locations (correcting DNS jumps) will be something around 5 and 10%.

Thanks

HTH

Rainer

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

Reply via email to