Client keep-alive 编辑

The client keep-alive feature enables multiple clients requests to be sent on a single connection. This feature benefits transaction management. When the Client Keep-Alive mode is enabled on an appliance and the server response to the client request contains the Connection: close the HTTP header and performs the following tasks:

  • Renames the existing Connection header name by shuffling the characters in the header name.

  • Adds a new Connection: header with Keep-Alive as the value for the header.

The Client Keep-Alive mode enables the Citrix ADC appliance to process multiple requests and responses using the same socket connection. The feature keeps the connection between the client and the appliance (client-side connection) open even after the server closes the connection with the appliance. This allows multiple clients requests using a single connection and saves the round trips associated in opening and closing a connection. Client keep-alive is most beneficial in SSL sessions.

Client keep-alive is useful for the following scenarios:

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

Note: Client keep-alive is applicable for HTTP and SSL traffic. Client-keep alive can be configured globally to handle all traffic. Also, you can activate it on specific services.

In the 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 closed.

Configure client keep-alive

Client keep-alive, by default, is disabled on the Citrix ADC, both globally and at service level. Therefore, you must enable the feature at the required scope.

Note: If you enable the client keep-alive globally, it is enabled for all services, regardless of whether you enable it at the service level. Also, you must configure some HTTP parameters to specify the following:

  • 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.

Configure client keep-alive by using Citrix ADC command interface

At the command prompt, do the following:

  1. Enable client keep-alive on the Citrix ADC.

    • 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 HTTP parameters on the HTTP profile that is bound to one or more services.

    set ns httpProfile <name> -maxReusePool <value> -conMultiplex ENABLED -persistentETag ENABLED
    <!--NeedCopy-->
    

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:33 次

字数:4549

最后编辑:6 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文