Managing Curl within HTTP Server Interactions

By default, the SBC cannot configure some Libcurl options. In conjunction with this compliance configuration, you can configure these Libcurl options using the http-profile element within the session-router. You can create multiple profiles and apply them to individual sti-server elements.

Parameters within the http-profile include:

  • name—Specifies the name you use to apply your profile to a sti-server. You configure the http-profile parameter to a sti-server using this name.
  • tcp-keepalive-idle-timer—Configures the CURLOPT_TCP_KEEPIDLE Libcurl options, which sets the time the SBC waits while a connection is idle before sending keepalive probes.
  • tcp-keepalive-conntimeout-timer—Configures the CURLOPT_CONNECTTIMEOUT Libcurl option, which sets the maximum time in seconds that the SBC waits for the connection phase to the server to complete.
  • tcp-conn-max-life-time—Configures the CURLOPT_MAXLIFETIME_CONN Libcurl option, which sets the maximum time in seconds after the creation of a connection that the SBC waits for the connection to become available for reuse for this request.
  • tcp-conn-terminate-method—Configures the SO_LINGER Libcurl option, which forces the TCP/IP stack to send the connection reset state to the server immediately.
  • CURLOPT_TCP_KEEPINTVL—Sets the wait time the SBC uses between sending keepalive probes.
  • CURLOPT_MAXAGE_CONN—Sets the maximum time in seconds the SBC waits for an existing connection to have been idle before it reuses the connection for a subsequent request.

    Note:

    Regarding the handling with http-clearDead-conn-timer

    As per the current libcurl code, TCP idle/max life time connection termination is dependent on a new request or existing config http-clearDead-conn-timer. The http-clearDead-conn-timer value specifies the regular time interval, the SBC uses to monitor/clear the TCP connections.

    After current (man-compliance) implementation, even though we configure some value for CURLOPT_MAXAGE_CONN to disconnect the idle connection, connection will not be disconnected after expiration of the max age timer. This is because, by default, libcurl will not disconnect the idle connections as soon as CURLOPT_MAXAGE_CONN expires. Instead it will wait for the new request or dummy request, initiated by the SBC after the expiration of the http-clearDead-conn-timer, to execute the CURLOPT_MAXAGE_CONN expiration logic.

    This same functionality also applies to the CURLOPT_MAXLIFETIME_CONN option.