5 Replies Latest reply on Sep 28, 2005 11:55 AM by pure

    Clustering Webservices

    pure

      We have planned to use a deploy our webservices as a cluster.
      I have looked in to the options of having a Http loadbalancer like
      apache or hardware.

      We have stateless session beans exposed as webservices
      and we have the session built in to the business logic wich
      means that we pass parameters wit the session id in all
      our methods.

      Is it possible to have sticky clustering with custom session
      handling using SLSB's as webservices or do we need to
      go with another aproach.

        • 1. Re: Clustering Webservices
          jason.greene

          It depends on where you are storing the state. If the state is shared you don't need stickiness. Otherwise, yes you could use a smart lb and sticky sessions. Most likely using header insertion.

          -Jason

          • 2. Re: Clustering Webservices
            pure



            Is it possible to affect the HTTP header from a statless session
            bean that is exposed as a webservice?

            Where is it possible to do "header insertion"?

            Thanks!

            • 3. Re: Clustering Webservices
              anil.saldhana

              The goal to keep J2EE web services stateless is to bring simplicity and aid interoperability. Given this, I think you are doing the right approach of passing some form of session identifier to your business method in SLSB.

              It is now upto your business code to deal with stickiness. Maybe a common database in a cluster which stores data that is dependent on state id that was passed to the biz method.

              As far as the WS infrastructure is concerned, it has dispatched the request that contains custom session id to the bean. Now as a biz developer, deal with it. :-)

              The possibilities are endless. Keep stateless in mind and you will be happy.

              • 4. Re: Clustering Webservices
                thomas.diesler

                Jason is right, a load balancer that supports sicky sessions will do. Tomcat handles the cookies.

                Ideally you would pass the buisiness session id in a SOAP header and have a handler deal with it.

                • 5. Re: Clustering Webservices
                  pure

                  Thank you for the replys.