5 Replies Latest reply on Jan 31, 2020 12:27 PM by Scott Crawford

    Does anyone use an on-prem Apigee API to interface with the BLCLI web service?

    Scott Crawford
      Share This:

      We have Apigee Edge built in-house and have multiple message processors that forward requests coming into our Apigee API over to a load balancer that sits in front of our BLCLI web service, but we are having an issue with connection persistence which is causing requests to go to the incorrect BL app servers.  We were curious if anyone else had a similar implementation and if they ran into the same issue, and what they might have done to resolve it.  Thanks.

        • 2. Re: Does anyone use an on-prem Apigee API to interface with the BLCLI web service?
          Scott Crawford

          Yes, our load balancing team came up with a solution with the F5 Networks engineering team.  They had to decrypt the incoming request so they could determine if a sessionId exists and record the value of the sessionId.  This required a cert and then an iRule on the F5, and the virtual server had to be changed to a 'standard' VIP, which permits the iRule and cert to function.  Definitely not a straight-forward fix but it works.

          2 of 2 people found this helpful
          • 4. Re: Does anyone use an on-prem Apigee API to interface with the BLCLI web service?
            Bill Robinson

            we just worked this out w/ another customer, though they are not using the apogee thing.  there the issue was that if you use client ip, you have lots of requests coming from the same client (i think it was bao or a home-grown portal) getting sent to the same node, this can overwhelm the node, not to mention the load is not evenly distributed.

             

            what did your irules look like?

            we did:

            when HTTP_RESPONSE {

                set soap_sid [findstr [HTTP::payload] "<ns2:returnSessionId>" 30 "<"]

                if { $soap_sid != "" } {

                    persist add uie $soap_sid

                }

            }

             

            when HTTP_REQUEST {

                set soap_sid [findstr [HTTP::payload] "xsd:anyURI" 21 "<"]

                if { $soap_sid != "" } {

                    set myNode [persist lookup uie $soap_sid node]

                    if {($myNode != "")} {

                        node $myNode

                    }

                }

            }

             

            created a new persistence profile w/ parent type 'universal' and then on the vip used that persistence profile, along w/ the 're-encrypt'.

            1 of 1 people found this helpful
            • 5. Re: Does anyone use an on-prem Apigee API to interface with the BLCLI web service?
              Scott Crawford

              Here's what ours looked like.  We switched to the Fast Performance Layer 4 default persistence profile, which is where the iRule was located:

               

              when HTTP_RESPONSE {

                  if  { [HTTP::header "Content-Length"] != "" } {

              set content_length [HTTP::header "Content-Length"]

                  } else {

              set content_length 5121

                  }

                  log local0. "collecting $content_length"

              HTTP::collect $content_length

              }

              when HTTP_RESPONSE_DATA {

                  set uuid [string last uuid [HTTP::payload]]

                  if { $uuid != -1 } {

                  set payload_end [string replace [HTTP::payload] 0 $uuid]

                  set just_uuid [string replace $payload_end [string first < $payload_end] end]

                  log local0. "adding persistence record for $just_uuid"

                  persist add uie $just_uuid 300

                  }

              }

              when HTTP_REQUEST {

                  if  { [HTTP::header "Content-Length"] != "" } {

              set content_length [HTTP::header "Content-Length"]

                  } else {

              set content_length 817

                  }

                  log local0. "collecting $content_length"

              HTTP::collect $content_length

              }

              when HTTP_REQUEST_DATA {

                  set req_uuid [string first uuid [HTTP::payload]]

                  if { $req_uuid != -1 } {

                  set req_payload_end [string replace [HTTP::payload] 0 $req_uuid]

                  set just_req_uuid [string replace $req_payload_end [string first < $req_payload_end] end]

                  log local0. "persisting on $just_req_uuid"

                  persist uie $just_req_uuid 300

                  }

              }