1 2 Previous Next 17 Replies Latest reply on Jan 31, 2014 7:23 AM by rhusar Go to original post
      • 15. Re: Re: Clustering - Passivation configured without an eviction policy being selected?
        kevgo


        Radoslav,

         

        Much appreciated.  Neither a cookie plugin to spoof cookies or using port offset is what I am after. There must be a simple mod_cluster load balancing scenario which would balance requests between nodes/servers?  Failover isn't a necessity as much as LB.


        "The HTTPD servers include software modules which control the way that HTTP requests are routed to JBoss EAP 6 worker nodes. Each of these modules varies in how it works and how it is configured. The modules are configured to balance work loads across multiple JBoss EAP 6 server nodes, to move work loads to alternate servers in case of a failure event, or both."

         

        I have to be missing something very obvious..

         

        Kevin.

         

         

         

         

         

         

         

        • 16. Re: Re: Clustering - Passivation configured without an eviction policy being selected?
          avedal

          The server keeps track of who you are by setting a session-tracking cookie in your browser on your first request.  On each subsequent request, your browser is supposed to send the session-tracking cookie back to the server so the server knows you are the same person.  But browsers will not send cookies back to just any server they access.  They typically only send them back to the server with the same name.  So here is what's happening to you:

           

          You make an initial request to http://webp01.gnb.ca which sends a response back to your browser containing a Set-Cookie header named JSESSIONID and a value of Session#1.  Your browser associates that cookie with a server named webp01.gnb.ca.


          Second, you make a request to webp02.gnb.ca.  There are no cookies in your browser associated with host webp02.gnb.ca so your browser makes the request without sending any cookies.  webp02, not being given a session cookie, assumes you are a new visitor and starts up a brand new session (Session#2) and it sends the response back to your browser with a Set-Cookie header named JSESSIONID and a value of Session#2.

           

          So your browser has two cookies in it named JSESSIONID, but for two different servers. You are effectively two different people to these servers.

           

          What you need is to either fiddle with the mechanics of the cookies that the server is sending back as Radoslav suggested or you need to make these two http servers appear to be the same server to end users (i.e your browser).   There's a couple of ways to do that.  For example, you might sent up round-robin DNS for "web.gnb.ca" and have it resolve to both webp01 and webp02.  Another way would be to put a load-balancer in front of your http instances.  Anyway, several options there to achieve that.

           

          Do a test on just webp01, forget about webp02.  Disable sticky-sessions in mod_cluster (this is important!) on both of your jboss nodes and then start them up.  Verify that you see both jboss nodes listed on webp01's mod_cluster_manager page.  Once you see them both there.  Start hitting the ClusterWeb test app on webp01 repeatedly while monitoring your jboss server logs on both servers.  Do you see the requests bouncing back and forth between your two jboss nodes?  Is your session data carrying over between the two?

          • 17. Re: Clustering - Passivation configured without an eviction policy being selected?
            rhusar
            There must be a simple mod_cluster load balancing scenario which would balance requests between nodes/servers?  Failover isn't a necessity as much as LB.

            If you are using HTTP sessions (which hold some state) using sticky-sessions is more or a requirement.

             

            Though, if you want to try it out, you can always disable sticky sessions in mod_cluster loadbalancer, see the docs mod_cluster Documentation.

            1 2 Previous Next