5 Replies Latest reply on Sep 14, 2016 12:05 PM by jfclere

    Routing requests based in a SOAP header

    leaqui

      Hi, I´m using WS-Atomic Transaction in a clustered environment and in this protocol there is a sequence of requests that must be routed to the same server.

      It don´t use  sticky-session, but all requests that must be routed to a single server are identified by a transaction-id specified at SOAP header level.

       

      Is it possible to configure something (or develop) at balancer level that, depending on this SOAP header transaction-id, route requests to a specific server of a cluster?

      Thanks in advance.

       

      Leandro

        • 1. Re: Routing requests based in a SOAP header
          jfclere

          You can't do that most of the proxy are using HTTP headers not SOAP headers, basically you need to read the POST data to choose the node.

          1 of 1 people found this helpful
          • 2. Re: Routing requests based in a SOAP header
            leaqui

            Hi Jean, thanks for the answer.

             

            So, it is impossible to read POST data at balancer?

            • 3. Re: Routing requests based in a SOAP header
              mbabacek

              Hi Leandro,

              it is not impossible, we could do that at a certain performance cost.

              You might file a feature request Jira: mod_cluster - JBoss Issue Tracker

              Eloquently described requests, with examples of communication and analysis of balancer and worker behaviour have better chance for being picked up and implemented.

              It is also important to argue why this is a good idea and why can't you use some JSESSIONID-ish http header field.

               

              Cheers

              -K-

              1 of 1 people found this helpful
              • 4. Re: Routing requests based in a SOAP header
                leaqui

                Hi Karm, thanks for the answer, I would try to file a feature request.

                 

                JSESSIONID was the first option, but WS-AT implementations don´t consider it, because it is not in the standard.

                 

                This is how it is resolved in Oracle WebLogic: Managing Web Services in a Cluster

                 

                There is a Front-end SOAP Router that routes requests to corresponding server based on transaction ID.

                 

                JBoss WS-AT implementation doesn´t provide this functionality.

                 

                Leandro

                • 5. Re: Routing requests based in a SOAP header
                  jfclere

                  X-weblogic-wsee-storetoserver-list HTTP Response Header

                   

                  Ok that means we can rewrite that using mod_rewrite to have it in a cookie and make the cookie available in the next request.

                  That would be very hacky...

                  storename1:host_server_spec | storename2:host_server_spec | storename3:host_server_spec

                   

                  That looks like having a route cookie containing a list of back-ends and again having mod_rewrite using it to find the back-end node, probably doable with mod_rewrite proxy directives. Of course no idea how to make the failover for the moment...