Persistent connections


GoServe 2.41 (and later versions) supports an experimental implementation of persistent connections (discussed in detail in the HTTP working group mailing list in July-August 1995, and also in IETF draft form). In brief, a client may request (by including the HTTP header 'Connection:' with value 'keep-alive' or 'maintain') that a server not close the connection after sending a response.

The server may choose to ignore this, or it may hold the connection open for a period of time (typically 15 to 30 seconds), to allow the client to send further HTTP requests over the same connection. In the latter case, the client is informed by the inclusion of a matching 'Connection:' header in the response. At any time, the transaction can be concluded by either the client or server closing the connection or no longer using the 'Connection:' header in the request or response header.

This persistent connection protocol is handled automatically by GoServe, under the control of the LIMITTIMEWAIT (connection maintain) setting. This setting limits the time that GoServe will wait for a new request after being asked to do so; it may be set to zero to force GoServe to accept only one request per connection; for the time being, this is the default setting.

Notes:

  1. 'Transactions' in GoServe is a count of connections, not HTTP requests. The latter count is available in the CONTROL STATISTICS response (if different from the transactions count) or by using QUERY REQUESTS or EXTRACT REQUESTS. The number of requests corresponds to the number of 'hits' in a World-Wide Web context.
  2. Clients connecting to a proxy instead of directly to a server must use the 'Proxy-Connection: keep-alive' header instead, if a persistent connection is being requested.
  3. Suggested values for LIMITTIMEWAIT might be 15-30 seconds (which would handle most cases of embedded images in HTML pages, for example) or 60-120 seconds (to handle most cases of multiple pages, with their embedded images, being requested by the same client).
  4. [Nov95] Current browsers use the value 'keep-alive' rather than 'maintain' in the connection header (the latter, from the HTTP working group, is therefore probably obsolete). For the time being, GoServe supports both values and will respond with the value as received.
  5. Once a connection is being maintained, GoServe will automatically SET NETBUFFER OFF, so that all parts of a data stream will be sent to the client immediately.

[ previous section | contents | next section ]

From 'goserve.doc', version 2.50.
Copyright © IBM Corporation, 1993, 1997. All rights reserved.