TCP Tuning for HTTP
draft-stenberg-httpbis-tcp-00

The information below is for an old version of the document
Document Type Active Internet-Draft (individual)
Last updated 2015-11-06
Stream (None)
Intended RFC status (None)
Formats pdf htmlized (tools) htmlized bibtex
Stream Stream state (No stream defined)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state I-D Exists
Telechat date
Responsible AD (None)
Send notices to (None)
httpbis                                                      D. Stenberg
Internet-Draft                                                   Mozilla
Intended status: Best Current Practice                  November 6, 2015
Expires: May 9, 2016

                          TCP Tuning for HTTP
                     draft-stenberg-httpbis-tcp-00

Abstract

   This document records current best practice for using all versions of
   HTTP over TCP.

Status of This Memo

   This Internet-Draft is submitted in full conformance with the
   provisions of BCP 78 and BCP 79.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF).  Note that other groups may also distribute
   working documents as Internet-Drafts.  The list of current Internet-
   Drafts is at http://datatracker.ietf.org/drafts/current/.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress."

   This Internet-Draft will expire on May 9, 2016.

Copyright Notice

   Copyright (c) 2015 IETF Trust and the persons identified as the
   document authors.  All rights reserved.

   This document is subject to BCP 78 and the IETF Trust's Legal
   Provisions Relating to IETF Documents
   (http://trustee.ietf.org/license-info) in effect on the date of
   publication of this document.  Please review these documents
   carefully, as they describe your rights and restrictions with respect
   to this document.  Code Components extracted from this document must
   include Simplified BSD License text as described in Section 4.e of
   the Trust Legal Provisions and are provided without warranty as
   described in the Simplified BSD License.

Stenberg                   Expires May 9, 2016                  [Page 1]
Internet-Draft                TCP for HTTP                 November 2015

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   2
     1.1.  Notational Conventions  . . . . . . . . . . . . . . . . .   3
   2.  Socket planning . . . . . . . . . . . . . . . . . . . . . . .   3
     2.1.  Number of open files  . . . . . . . . . . . . . . . . . .   3
     2.2.  Number of concurrent network messages . . . . . . . . . .   3
     2.3.  Number of incoming TCP SYNs allowed to backlog  . . . . .   4
     2.4.  Use the whole port range for local ports  . . . . . . . .   4
     2.5.  Lower the TCP FIN timeout . . . . . . . . . . . . . . . .   4
     2.6.  Re-use sockets in TIME_WAIT state . . . . . . . . . . . .   4
     2.7.  Give the the TCP stack enough memory  . . . . . . . . . .   4
     2.8.  Set maximum allowed TCP window sizes  . . . . . . . . . .   4
     2.9.  Timers and time-outs  . . . . . . . . . . . . . . . . . .   5
   3.  TCP handshake . . . . . . . . . . . . . . . . . . . . . . . .   5
     3.1.  TCP Fast Open . . . . . . . . . . . . . . . . . . . . . .   5
     3.2.  Initial Congestion Window . . . . . . . . . . . . . . . .   5
     3.3.  TCP SYN flood handling  . . . . . . . . . . . . . . . . .   5
   4.  TCP transfers . . . . . . . . . . . . . . . . . . . . . . . .   5
     4.1.  Packet Pacing . . . . . . . . . . . . . . . . . . . . . .   6
     4.2.  Explicit Congestion Control . . . . . . . . . . . . . . .   6
     4.3.  Nagle's Algorithm . . . . . . . . . . . . . . . . . . . .   6
     4.4.  Keep-alive  . . . . . . . . . . . . . . . . . . . . . . .   6
   5.  Re-using connections  . . . . . . . . . . . . . . . . . . . .   6
     5.1.  Slow Start after Idle . . . . . . . . . . . . . . . . . .   6
     5.2.  TCP-Bound Authentications . . . . . . . . . . . . . . . .   7
   6.  Closing connections . . . . . . . . . . . . . . . . . . . . .   7
     6.1.  Half-close  . . . . . . . . . . . . . . . . . . . . . . .   7
     6.2.  Abort . . . . . . . . . . . . . . . . . . . . . . . . . .   7
     6.3.  Close Idle Connections  . . . . . . . . . . . . . . . . .   7
     6.4.  Tail Loss Probes  . . . . . . . . . . . . . . . . . . . .   7
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   7
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .   8
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   8
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .   8
     9.2.  Informative References  . . . . . . . . . . . . . . . . .   8
     9.3.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .   9
   Appendix A.  Acknowledgments  . . . . . . . . . . . . . . . . . .   9
   Author's Address  . . . . . . . . . . . . . . . . . . . . . . . .   9

1.  Introduction

   HTTP version 1.1 [RFC7230] as well as HTTP version 2 [RFC7540] are
   defined to use TCP [RFC0793], and their performance can depend
   greatly upon how TCP is configured.  This document records best
   current practice for using HTTP over TCP, with a focus on improving
Show full document text