HTTP Reuse and Non-Trackable Connections

HTTP Reuse and Non-Trackable Connections

book

Article ID: CTX120674

calendar_today

Updated On:

Description

This article describes how a NetScaler appliance handles HTTP connection reuse, what conditions can cause the appliance to abort HTTP connection tracking and reuse, and which counters in the newnslog file relate to the subject.

Background

On a NetScaler appliance, when you use HTTP or SSL service types, the application layer traffic is assumed to be HTTP and the appliance attempts to reuse TCP connections that are established between the Mapped IP (MIP) address or Subnet IP (SNIP) address and the server IP address associated with the configured service.

With such a TCP connection, for example, after the server sends an HTTP response and the connection is internally disassociated from the corresponding TCP connection between the client IP address and the virtual IP address, it is placed in the Reuse Pool where it can then be associated with a new client TCP connection.

Aborting Connection Reuse

There are conditions where the appliance aborts HTTP connection tracking and reuse. When this happens, the appliance immediately stops performing all Layer 7 processing for network traffic between the linked client and server connections, and begins treating the virtual server and service as if they were of type TCP. This affects the functioning of the appliance with respect to features such as Content Switching, Rewrite, Compression, Content Filtering, Responder, Integrated Caching, Client IP Insertion, and any other features that depend on being able to read aspects of the Layer 7 HTTP request or response.

The appliance at the global level keeps track of the number of connections that go into a state of no reuse by using the newnslog files found in the /var/nslog directory. However, there is no way of associating a given connection with a given request or response that triggered the state of no reuse. The global counters in the newnslog file are accessible through the nsconmsg command available on the appliance in the shell prompt:
root@ns# nsconmsg -K /var/nslog/newnslog -g http_err_noreuse –g http_tot_noreuse_connect -d stats

Displaying current counter value information
NetScaler V20 Performance Data
NetScaler NS9.3: Build 55.6.nc, Date: Feb 20 2012, 05:41:35

reltime:mili second between two records Fri Jun 29 19:56:33 2012
Index reltime counter-value symbol-name&device-no
0 0 0 http_err_noreuse_IncompleteHeader
1 0 0 http_err_noreuse_multipart
2 0 0 http_err_noreuse_link_server
3 0 0 http_err_noreuse_large_data
4 0 0 http_err_noreuse_IncompleteChunk
5 0 0 http_err_noreuse_InvalidHeader
6 0 0 http_err_noreuse_ResponseBeforeData
7 0 0 http_err_noreuse_non_trackable_res
8 0 0 http_err_noreuse_http_0_9
9 0 0 http_err_noreuse_morethanCtLen
10 0 0 http_tot_noreuse_connect
Done

The following is a description of the preceding counters:

http_err_noreuse_IncompleteHeader

This counter increments under two conditions:

  • If the appliance receives a FIN request from the client before the appliance has finished receiving all of the HTTP headers in a given request
  • If the HTTP header information spans greater than 16 packets or if the http_err_IncompleteNoMemory counter also increments

    http_err_noreuse_multipart

    This counter increment when the appliance identifies the string Multipart in the Content-Type HTTP header. The appliance does not support connection tracking and reuse for Multipart content types.

    http_err_noreuse_link_server

    This counter increment when the appliance receives a request for some reason goes untrackable, and the appliance internally links a server TCP connection to the client connection. Therefore, the appliance is also marking the server connection untrackable in addition to the client connection.

    http_err_noreuse_large_data

    This counter increment when the appliance receives an HTTP chunk within a chunked request or response that is greater than 2 GB.

    http_err_noreuse_IncompleteChunk

    This counter increment when there is an issue with chunking in an HTTP response. The following list includes the possible issues:

    • Chunk length is not in hexadecimal format.
    • Chunk size is greater than 2 GB.
    • Chunk header format is invalid.
    • There is a memory allocation failure for chunk buffers.

    http_err_noreuse_InvalidHeader

    This counter increment for any of the several possible reasons:

    • HTTP major version number is not in the range 0 through 9.
    • Invalid HTTP response status code begins with a character not in the range 0 through 9
    • A packet full of CR-LF/whitespace characters is received before the HTTP Request Line
    • No URL after HTTP request method
    • No HTTP/ after URL in HTTP Request Line
    • Space in the URL/request
    • When the number of hold NSBs exceeds the configured limit
    • Server sends more than the value of the content-length of data
    • Invalid value of Content-Length header (non-numeric characters)

    http_err_noreuse_ResponseBeforeData

    This counter increment when appliance receives a 200 OK response from the server before the appliance has finished sending the POST data.

    Note: As of April 2009, the latest builds for NetScaler software release 8.1 and 9.0 no longer consider this a condition to abort connection tracking and reuse. This counter might still be incremented.

    http_err_noreuse_non_trackable_res

    This counter is currently not in use.

    http_err_noreuse_http_0_9

    This counter increment if the appliance receives an HTTP request that is badly formatted enough that the appliance interprets it as a valid HTTP/0.9 request.

    http_err_noreuse_morethanCtLen

    This counter increment when the POST body is larger than the value provided in the request Content-Length header.

    http_tot_noreuse_connect

    This counter increment if and when an HTTP CONNECT is made.

    Issue/Introduction

    This article describes how a NetScaler appliance handles HTTP connection reuse, what conditions can cause the appliance to abort HTTP connection tracking and reuse, and which counters in the newnslog file relate to the subject.