3 Replies Latest reply on Apr 5, 2006 2:36 PM by brian.stansberry

    Sticky sessions

    pure

      Hi!

      We have statless nodes with caching (non distributed) in a cluster. Is it possible with mod_jk to have a session returned to the same node based on a session id. Login will go to a random our roundrobin calulated node and then the session id is returned to the client. Calls that contains that session id will be returned to the node where the login was.

      The client is actually a system that is in turn a server for user clients so this system does not hold a http session.

      Is this possible? .. Should the session id be in the http header.

        • 1. Re: Sticky sessions
          brian.stansberry

          With mod_jk, sessions are sticky by default; you have to disable them in workers.properties to not have them be sticky.

          If a client isn't going to hold onto the session id, this of course can't work. A session is a conversation; if one participant in the conversation forgets its in a conversation, the conversation can't be coherent.

          Is your "client" some sort of proxy server? If so, and it passes the session cookie through to the real client, who then returns it, this could work. I've written such a system before.

          • 2. Re: Sticky sessions
            pure

            Thank you.. that was the answer i was looking for.

            • 3. Re: Sticky sessions
              brian.stansberry

              Great! When I wrote it I had a feeling it wasn't going to be what you needed, but I took a shot at it :)