RateLimit Header Fields for HTTP
draft-polli-ratelimit-headers-03

Document Type Active Internet-Draft (individual)
Authors Roberto Polli  , Alejandro Ruiz 
Last updated 2020-05-26
Stream (None)
Intended RFC status (None)
Formats plain text html xml 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)
HTTP                                                            R. Polli
Internet-Draft                         Team Digitale, Italian Government
Intended status: Standards Track                             A. Martinez
Expires: 27 November 2020                                        Red Hat
                                                             26 May 2020

                    RateLimit Header Fields for HTTP
                    draft-polli-ratelimit-headers-03

Abstract

   This document defines the RateLimit-Limit, RateLimit-Remaining,
   RateLimit-Reset header fields for HTTP, thus allowing servers to
   publish current request quotas and clients to shape their request
   policy and avoid being throttled out.

Note to Readers

   _RFC EDITOR: please remove this section before publication_

   Discussion of this draft takes place on the HTTP working group
   mailing list (ietf-http-wg@w3.org), which is archived at
   https://lists.w3.org/Archives/Public/ietf-http-wg/
   (https://lists.w3.org/Archives/Public/ietf-http-wg/).

   The source code and issues list for this draft can be found at
   https://github.com/ioggstream/draft-polli-ratelimit-headers
   (https://github.com/ioggstream/draft-polli-ratelimit-headers).

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 https://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 27 November 2020.

Polli & Martinez        Expires 27 November 2020                [Page 1]
Internet-Draft      RateLimit Header Fields for HTTP            May 2020

Copyright Notice

   Copyright (c) 2020 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 (https://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.

Table of Contents

   1.  Introduction  . . . . . . . . . . . . . . . . . . . . . . . .   3
     1.1.  Rate-limiting and quotas  . . . . . . . . . . . . . . . .   3
     1.2.  Current landscape of rate-limiting headers  . . . . . . .   4
       1.2.1.  Interoperability issues . . . . . . . . . . . . . . .   4
     1.3.  This proposal . . . . . . . . . . . . . . . . . . . . . .   5
     1.4.  Goals . . . . . . . . . . . . . . . . . . . . . . . . . .   5
     1.5.  Notational Conventions  . . . . . . . . . . . . . . . . .   6
   2.  Expressing rate-limit policies  . . . . . . . . . . . . . . .   6
     2.1.  Time window . . . . . . . . . . . . . . . . . . . . . . .   6
     2.2.  Request quota . . . . . . . . . . . . . . . . . . . . . .   6
     2.3.  Quota policy  . . . . . . . . . . . . . . . . . . . . . .   7
   3.  Header Specifications . . . . . . . . . . . . . . . . . . . .   8
     3.1.  RateLimit-Limit . . . . . . . . . . . . . . . . . . . . .   8
     3.2.  RateLimit-Remaining . . . . . . . . . . . . . . . . . . .   9
     3.3.  RateLimit-Reset . . . . . . . . . . . . . . . . . . . . .   9
   4.  Providing RateLimit headers . . . . . . . . . . . . . . . . .  10
   5.  Receiving RateLimit headers . . . . . . . . . . . . . . . . .  10
   6.  Examples  . . . . . . . . . . . . . . . . . . . . . . . . . .  11
     6.1.  Unparameterized responses . . . . . . . . . . . . . . . .  11
       6.1.1.  Throttling informations in responses  . . . . . . . .  11
       6.1.2.  Use in conjunction with custom headers  . . . . . . .  12
       6.1.3.  Use for limiting concurrency  . . . . . . . . . . . .  12
       6.1.4.  Use in throttled responses  . . . . . . . . . . . . .  13
     6.2.  Parameterized responses . . . . . . . . . . . . . . . . .  14
       6.2.1.  Throttling window specified via parameter . . . . . .  14
       6.2.2.  Dynamic limits with parameterized windows . . . . . .  14
       6.2.3.  Dynamic limits for pushing back and slowing down  . .  15
     6.3.  Dynamic limits for pushing back with Retry-After and slow
           down  . . . . . . . . . . . . . . . . . . . . . . . . . .  16
       6.3.1.  Missing Remaining informations  . . . . . . . . . . .  16
Show full document text