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

Document Type Active Internet-Draft (individual)
Last updated 2016-10-31
Stream (None)
Intended RFC status (None)
Formats plain text xml pdf html 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                       T. Wicinski
Expires: May 4, 2017                                          Salesforce
                                                        October 31, 2016

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

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 4, 2017.

Copyright Notice

   Copyright (c) 2016 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 & Wicinski        Expires May 4, 2017                  [Page 1]
Internet-Draft                TCP for HTTP                  October 2016

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  . . . . .   3
     2.4.  Use the whole port range for local ports  . . . . . . . .   4
     2.5.  Lower the TCP FIN timeout . . . . . . . . . . . . . . . .   4
     2.6.  Reuse sockets in TIME_WAIT state  . . . . . . . . . . . .   4
     2.7.  TCP socket buffer sizes and Window Scaling  . . . . . . .   4
     2.8.  Set maximum allowed TCP window sizes  . . . . . . . . . .   5
     2.9.  Timers and timeouts . . . . . . . . . . . . . . . . . . .   5
   3.  TCP handshake . . . . . . . . . . . . . . . . . . . . . . . .   5
     3.1.  TCP Fast Open . . . . . . . . . . . . . . . . . . . . . .   5
     3.2.  Initial Congestion Window . . . . . . . . . . . . . . . .   6
     3.3.  TCP SYN flood handling  . . . . . . . . . . . . . . . . .   6
   4.  TCP transfers . . . . . . . . . . . . . . . . . . . . . . . .   6
     4.1.  Packet Pacing . . . . . . . . . . . . . . . . . . . . . .   6
     4.2.  Explicit Congestion Control . . . . . . . . . . . . . . .   6
     4.3.  Nagle's Algorithm . . . . . . . . . . . . . . . . . . . .   6
     4.4.  Delayed ACKs  . . . . . . . . . . . . . . . . . . . . . .   7
     4.5.  Keep-alive  . . . . . . . . . . . . . . . . . . . . . . .   7
   5.  Re-using connections  . . . . . . . . . . . . . . . . . . . .   8
     5.1.  Slow Start after Idle . . . . . . . . . . . . . . . . . .   8
     5.2.  TCP-Bound Authentications . . . . . . . . . . . . . . . .   8
   6.  Closing connections . . . . . . . . . . . . . . . . . . . . .   8
     6.1.  Half-close  . . . . . . . . . . . . . . . . . . . . . . .   8
     6.2.  Abort . . . . . . . . . . . . . . . . . . . . . . . . . .   8
     6.3.  Close Idle Connections  . . . . . . . . . . . . . . . . .   8
     6.4.  Tail Loss Probes  . . . . . . . . . . . . . . . . . . . .   9
   7.  IANA Considerations . . . . . . . . . . . . . . . . . . . . .   9
   8.  Security Considerations . . . . . . . . . . . . . . . . . . .   9
   9.  References  . . . . . . . . . . . . . . . . . . . . . . . . .   9
     9.1.  Normative References  . . . . . . . . . . . . . . . . . .   9
     9.2.  Informative References  . . . . . . . . . . . . . . . . .   9
     9.3.  URIs  . . . . . . . . . . . . . . . . . . . . . . . . . .  10
   Appendix A.  Acknowledgments  . . . . . . . . . . . . . . . . . .  10
Show full document text