TCP::bandwidth

Description

Returns the bandwidth estimate for the peer, in bytes per second. If no estimate is currently available, or if route metrics are disabled or unavailable, then 0 is returned. The details of bandwidth estimate calculation are proprietary. The values returned are only estimates, and can vary even during the connection.
Note: Starting with BIG-IP v9.4.2, client bandwidth calculations are always unavailable, so this function will always return 0. Beginning in BIG-IP 12.0.0, the command returns a nonzero bandwidth estimate.

Syntax

TCP::bandwidth

TCP::bandwidth

  • Returns the bandwidth estimate for the peer.

Examples

when HTTP::REQUEST {
   if {[HTTP::uri] starts_with "/xxx.css"}{
      set bandwidth [TCP::bandwidth]
      if {$bandwidth < XXX} {
         HTTP::uri "/boring-xxx.css"
      }
   }
}