Specifying Connection Properties at the Pool Level

Overview

Prior to Avi Vantage 18.2.1, all connection-pooling properties were defined at the SE property level. Changes to these runtime properties required a Service Engine restart and applied to all virtual services using connection pooling and placed on those SEs. Starting with Avi Vantage 18.2.1, four of these properties are now specified at a more granular level, i.e., at the pool level. Setting/changing them no longer requires a restart of the SE. The four properties are:

  • upstream_connpool_conn_max_reuse — Maximum times a connection to a server in the pool can be reused. Default value is 0 (which implies the connection may be used an unlimited number of times).
  • upstream_connpool_server_max_cache — Maximum cached connections per server in the pool. Default value is 0 (which implies unlimited cached connections).
  • upstream_connpool_conn_idle_tmo — Connection idle timeout, measured in seconds. Default value is 60.
  • upstream_connpool_conn_life_tmo — Connection life timeout, measured in seconds. Default value is 600.

These four parameters are currently accessible via the REST API and Avi CLI. Avi UI support is planned for a future release.

Configuration via Avi CLI

Configuring Maximum Reuse Property


: > configure pool pool-test
: pool> conn_pool_properties
: pool:conn_pool_properties> upstream_connpool_conn_max_reuse 5
: pool:conn_pool_properties> save
: pool> save

Configuring Maximum Cache Property


: > configure pool pool-test
: pool> conn_pool_properties
: pool:conn_pool_properties> upstream_connpool_server_max_cache 10
: pool:conn_pool_properties> save
: pool> save

Configuring Connection Idle Time Property


: > configure pool pool-test
: pool> conn_pool_properties
: pool:conn_pool_properties> upstream_connpool_conn_idle_tmo 20
: pool:conn_pool_properties> save
: pool> save

Configuring Connection Life Timeout Property


: > configure pool pool-test
: pool> conn_pool_properties
: pool:conn_pool_properties> upstream_connpool_conn_life_tmo 100
: pool:conn_pool_properties> save

Configuration via Avi UI

Starting with 18.2.2, the Avi UI exposes the properties discussed above.

  1. Navigate to Applications > Pools. If no pools exist, create one. Otherwise, click the pencil icon in the row of the pool you wish to edit.
  2. Once into the pool editor, click on the Advanced tab of the pool-creation wizard, pictured below.

Avi Vantage pool creation wizard

You can specify the following details:

  • Pool Full Settings

    • Request Queuing — Enable or Disable request queue when the pool is full by selecting appropriate radio buttons.

    • Queue Length — Specify the minimum number of requests to be queued when pool is full.

  • Pool Failure Settings

    • Fail Action — Select an action when a pool failure happens from the drop-down list. The list displays the following values:
      • Close Connection
      • HTTP Local Response
      • HTTP Redirect

      By default, the connection will be closed, if a pool experiences a failure.

  • Connection Pool Settings

    • Connection Idle Timeout — Specify the connection idle timeout. This time starts on the last time the connection is used, the connection will be closed after this time.

    • Connection Life Timeout — Specify the connection life timeout. This time starts when the connection is created, the connection will be closed after this time.

    • Connection Max Used Times — Specify the maximum number of times the connection is used.

    • Max Cache Connections Per Server — Specify the maximum cache connections per server.

  • Other Settings

    • Disable Port Translation — Check this box to disable port translation.

    • Connection Ramp — Specify the duration for which new connections will be gradually ramped up to a server recently brought online.

    • Default Server Timeout — Specify the server timeout value. Server timeout value specifies the time within which a server connection needs to be established and a request response exchange completes between Avi Vantage and the server.

    • Description — Specify the pool description.

    • Max Connections per Server — Specify the maximum number of concurrent connections allowed to each server within the pool.

    • HTTP Server Reselect — Check HTTP Server Reselect box when server responds with specific response codes.