The client keep-alive feature enables multiple client requests to be sent on a single client connection. This feature helps in a transaction management environment where typically the server closes the client connection after serving the response. The client then opens a new connection for each request and spends more time on the transaction.
Client keep-alive resolves this issue by keeping the connection between the client and the appliance (client-side connection) open even after the server closes the connection with the appliance. This allows sending multiple client requests using a single connection and saves the round trips associated with opening and closing a connection. Client keep-alive is most beneficial in SSL sessions.
Client-keep alive can be configured globally to be able to handle all traffic. It can also be configured to be active only on specific services.
In client keep-alive environment, the configured services intercept the client traffic and the client request is directed to the origin server. The server sends the response and closes the connection between the server and the appliance. If a "Connection: Close" header is present in the server response, the appliance corrupts this header in the client-side response, and the client-side connection is kept open. As a result, the client does not have to open a new connection for the next request; instead, the connection to the server is reopened.
Client keep-alive, by default, is disabled on the NetScaler, both globally and at service level. Therefore, you must enable the feature at the required scope.
Additionally, if required, you can configure some HTTP parameters to specify the maximum number of HTTP connections retained in the connection reuse pool, enable connection multiplexing, and enable persistence Etag.
At the command prompt, do the following:
enable ns mode cka
set service <name> -CKA YES
set ns httpProfile <name> -maxReusePool <value> -conMultiplex ENABLED -persistentETag ENABLED
Navigate to Configure Modes and select Client side Keep Alive., click
Navigate to Settings grouping, enable Client Keep-Alive., and select the required service. In the
Navigate to HTTP Profiles tab, select the required profile and update the required HTTP parameters., and on