Forum Discussion

sand87ch's avatar
sand87ch
Icon for Cirrus rankCirrus
Nov 03, 2022

send command in HTTP_REQUEST_DATA is it async

I have been searching the docs for this but couldnt find a satisfactory answer.We are mirroring the traffic from a bigip virtual server to a server of our own.in order to do some performanc etuning i looked at the send command which sends the data to the mirroring server 

 

set send_bytes [send  -timeout $connectionTimeoutMS -status send_status $conn_id $mydata]

 

This is causing some performance hit and i would like to find out if the send is async or synchronous.If its synchronous is there a way to make it asynchronous.I added the -async commad but that was clearly an error.I sthere a way out for an async call in the send command

5 Replies

  • Hello sand87ch,

    In order to get a better performance sending this mirroring traffic you could try to use HSL (High Speed Logging) to send those requests.

    An example:

    set mypayload "mypayload"
    set hsl [HSL::open -proto TCP -pool $mypool]
    HSL::send $hsl "POST /path/resource HTTP/1.0\nConnection: keep-alive\nHost: myserver\nContent-Type:text/plain;\nContent-Length:[string length $mypayload]\n\n$mypayload"

     

    • sand87ch's avatar
      sand87ch
      Icon for Cirrus rankCirrus

      I am trying to mirror the request and response that passes via the Big Ip load balancer to the pool members to another virtual server in the BIGIP.The mirroring is configured via irules.I am using a sideband connection for the same.

      Setup:-

      1.Includes a F5 virtual server hosted on cloud

      2.Another VIP(virtual server) entry created on the management portal,where this server doesnt actually exist.This VIP in turn is attached to a pool consisting of a server .

      Data coming to bigip is intercepted using the inbuilt events for eg 

       

      when HTTP_RESPONSE_DATA {
          set responseData [call respwithbody $requestId $debug $auth]
          set send_bytes [send -timeout $connectionTimeout -status send_status $conn_id $rsponseData]
          close $conn_id
          call printLog $debug " Sent bytes: $send_bytes"
      }

       

      where the conn_id is the connecteion to the above mentioned virual server(sideband connection to this server)

      As per my reading on HSL

      https://support.f5.com/csp/article/K50040950

      it seems HSL would require changes vis a vis creating a publisher pool and it semes it doesnt log to the vip in my case.Correct me if i am wrong

      With this scenarion is HSL is valid for me?

       

       

  • Is it possible to mirror request and response passing via the big ip using HSL to another VIP created in the bigIp management portal?

    • Hello sand87ch,

      Why access a VS and not a pool directly?

      F5 doesn't officially support load-balancing using a pool that points to a VS which resides in the same machine. I had some issues before with the TAC where they argued that this architecture is not supported.
      Anyway, you can bypass this restriction using the virtual command (https://clouddocs.f5.com/api/irules/virtual.html)

      HSL is a simple configuration that gives you the chance to configure a pool of servers to send those requests to them. If you can replace VS for Pool in your architecture, this solution will be more efficient.

      Anyway, have you considered cloning pools?
      https://support.f5.com/csp/article/K13392

       

      • sand87ch's avatar
        sand87ch
        Icon for Cirrus rankCirrus

        Hi Dario_Garrido ,

        The VS I am specifying is used to provide a seggregation of sorts.

        I aim to mirror the traffic from the client BIGIP VIP to a system on a cloud i have hosted.For this a virtual server has been added to the architecture which is created on the management portal and is referred to by the bigip server via an irule on the client VIP.

        Removing the VS isnt an option and hence does this mean that i wont be able to use HSL at all with the current set up?