Sie sind auf Seite 1von 6

Client Keep-Alive

2015-01-16 04:53:47 UTC


2015 Citrix Systems, Inc. All rights reserved. Terms of Use | Trademarks | Privacy Statement

Contents

Client Keep-Alive .............................................................................................

Configuring Client Keep-Alive ..................................................................

Client Keep-Alive
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 is also useful under either of the following conditions:

When the server does not support client keep-alive.

When the server supports client keep-alive but an application on the server does not
support client keep-alive.

Note: Client keep-alive is applicable for HTTP and SSL traffic.


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.
Note: If a server sends back two "Connection: Close" headers, only one is edited. This
results in significant delays on the client rendering of the object because a client does
not assume that the object has been delivered completely until the connection is actually
closed.

Configuring Client Keep-Alive


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.
Note: If you enable client keep-alive globally, it is enabled for all services, regardless of
whether you enable it at the service level.
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.
Note: When Persistent ETag is enabled, the ETag header includes information about the
server that served the content. This ensures that cache validation conditional requests or
browser requests, for that content, always reaches the same server.

To configure client keep-alive by using the command


line interface
At the command prompt, do the following:
1. Enable client keep-alive on the NetScaler.

At global level
enable ns mode cka

At service level
set service <name> -CKA YES

Note: Client keep-alive can be enabled only for HTTP and SSL services.
2. Configure the required HTTP parameters on the HTTP profile that is bound to the
service(s).
set ns httpProfile <name> -maxReusePool <value> -conMultiplex ENABLED
-persistentETag ENABLED
Note: Configure these parameters on the nshttp_default_profile HTTP profile, to
make them available globally.

Configuring Client Keep-Alive

To configure client keep-alive by using the


configuration utility
1. Enable client keep-alive on the NetScaler.

At global level
Navigate to System > Settings, click Configure Modes and select Client side Keep
Alive.

At service level

Navigate to Traffic Management > Load Balancing > Services, and select the
required service. In the Settings grouping, enable Client Keep-Alive.
2. Configure the required HTTP parameters on the HTTP profile that is bound to the
service(s).
Navigate to System > Profiles, and on HTTP Profiles tab, select the required profile and
update the required HTTP parameters.

Parameter Descriptions (of commands listed in the


CLI procedure)
enable ns mode
No parameters provided in this topic or the command has no parameters. View
description(s) in command reference Top

set service
name
Name of the service for which to modify parameters.
CKA
Enable client keep-alive for the service.
Possible values: YES, NO
View description(s) in command reference Top

set ns httpProfile
name
Name of the HTTP profile to be modified.
maxReusePool

Configuring Client Keep-Alive


Maximum limit on the number of connections, from the NetScaler to a particular server
that are kept in the reuse pool. This setting is helpful for optimal memory utilization and
for reducing the idle connections to the server just after the peak time.
Maximum value: 360000
conMultiplex
Reuse server connections for requests from more than one client connections.
Possible values: ENABLED, DISABLED
Default value: ENABLED
persistentETag
Generate the persistent NetScaler specific ETag for the HTTP response with ETag header.
Possible values: ENABLED, DISABLED
Default value: DISABLED
View description(s) in command reference Top

Das könnte Ihnen auch gefallen