4 Replies Latest reply on Feb 24, 2011 6:23 AM by steven_barn

    Session relation mapping with apache mod_xx ?

    steven_barn

      Hi

       

      I want to build up a Load Balance with apache mod_cluster at the moment Iam using mod_jk which balances tomcat's.

      This is the situation:

      I got an user_application(build in browser) which sends an own SessionID(SessionID_A) to the "Apache Balancer".


      The mod_jk sends via roundRobin a request to a Tomcat server which also generats an ID (I think its called JSessionID - I dont want to use any cookies). At some point I lose my SessionID_A in the URL, the Apache(mod_jk) now only remembers the JSessionID and is not able to talk back to the right user_application.

       

      Is there a way to build up an routing inside of apache_mod_xx? may be with ProxyPass but I dont know how this would look like? some codeexample would be perfect or any links to guides.

       

      user_application------[SessionID_A] ---------> Apache-balancer--------[SessionID_A]-----> Tomcat1

                                                                                                                                                            |

      ?dont know this session?<--user_application<-[JSessionID]-- Apache-balancer<----[JSessionID]-----|

       

                                                                                                                                             ----> Tomcat2

       

                                                                                                                                             ----> Tomcat3

       

       

      Thanks in advance

        • 1. Session relation mapping with apache mod_xx ?
          jfclere

          It seems your JSessionID are not sticky.

          "user_application(build in browser) which sends an own SessionID(SessionID_A) to the "Apache Balancer", that would work if you generate the JSessionID correctly something like JSessionID="uuid_sessionid.route_to_a_tomcat"

          For example to go to Tomcat1 with JVMRoute="node1" the JSessionID could be "1234567890.node1"

          • 2. Session relation mapping with apache mod_xx ?
            steven_barn

            Maybe I was not clear enough. My SessionID_A is an own created ID that has nothing to do with Apache or Tomcat it is used in some other context.
            The inside Loadbalancing between Tomact and Apache is working. My problem is that I lose my own SessionID_A from the URL after communicating to Tomcat

            • 3. Session relation mapping with apache mod_xx ?
              jfclere

              It seems you are doing session injection...

              Try emptySessionPath=true in the <Connector/>

              • 4. Session relation mapping with apache mod_xx ?
                steven_barn

                Hi and thanky for your response again.

                 

                emptySessionPath didn't help. But I have an other idea I want to route(balance) all Apache-mod_jk with my SessionID_A which is generated by my outside Application. Do you know if mod_cluster or mod_jk is capable of this? I just dont want to care about the JSessionID anymore.

                 

                Greetings