Tags

  • AWS (7)
  • Apigee (3)
  • ArchLinux (5)
  • Array (6)
  • Backtracking (6)
  • BinarySearch (6)
  • C++ (19)
  • CI&CD (3)
  • Calculus (2)
  • DesignPattern (43)
  • DisasterRecovery (1)
  • Docker (8)
  • DynamicProgramming (20)
  • FileSystem (11)
  • Frontend (2)
  • FunctionalProgramming (1)
  • GCP (1)
  • Gentoo (6)
  • Git (16)
  • Golang (1)
  • Graph (10)
  • GraphQL (1)
  • Hardware (1)
  • Hash (1)
  • Kafka (1)
  • LinkedList (13)
  • Linux (27)
  • Lodash (2)
  • MacOS (3)
  • Makefile (1)
  • Map (5)
  • MathHistory (1)
  • MySQL (21)
  • Neovim (11)
  • Network (67)
  • Nginx (6)
  • Node.js (33)
  • OpenGL (6)
  • PriorityQueue (1)
  • ProgrammingLanguage (9)
  • Python (10)
  • RealAnalysis (20)
  • Recursion (3)
  • Redis (1)
  • RegularExpression (1)
  • Ruby (19)
  • SQLite (1)
  • Sentry (3)
  • Set (4)
  • Shell (4)
  • SoftwareEngineering (12)
  • Sorting (2)
  • Stack (4)
  • String (2)
  • SystemDesign (13)
  • Terraform (2)
  • Tree (24)
  • Trie (2)
  • TwoPointers (16)
  • TypeScript (3)
  • Ubuntu (4)
  • Home

    Retry-After

    Published May 26, 2023 [  Network  ]

    The Retry-After response HTTP header indicates how long the user agent should wait before making a follow-up request. There are three main cases this header is used:

    • When sent with a 503 (Service Unavailable) response, this indicates how long the service is expected to be unavailable.

    • When sent with a 429 (Too Many Requests) response, this indicates how long to wait before making a new request.

    • When sent with a redirect response, such as 301 (Moved Permanently), this indicates the minimum time that the user agent is asked to wait before issuing the redirected request.

    Syntax

    Retry-After: <http-date>
    Retry-After: <delay-seconds>
    

    Directives

    <http-date>: A date after which to retry. See the Date header for more details on the HTTP date format.

    <delay-seconds>: A non-negative decimal integer indicating the seconds to delay after the response is received.

    Examples

    Dealing with scheduled downtime

    Support for the Retry-After header on both clients and servers is still inconsistent. However, some crawlers and spiders, like the Googlebot, honor the Retry-After header. It is useful to send it along with a 503 (Service Unavailable) response, so that search engines will keep indexing your site when the downtime is over.

    Retry-After: Wed, 21 Oct 2015 07:28:00 GMT
    Retry-After: 120
    

    Reference