Re: New Version Notification for draft-nottingham-httpbis-retry-01.txt

Tom Bergan <tombergan@chromium.org> Sat, 04 February 2017 19:28 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@listhub.w3.org>
X-Original-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Delivered-To: ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 51F1C129C49 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 4 Feb 2017 11:28:39 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.521
X-Spam-Level:
X-Spam-Status: No, score=-6.521 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, RP_MATCHES_RCVD=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=chromium.org
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v2RPjjgMYe2b for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sat, 4 Feb 2017 11:28:37 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0A291129C48 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sat, 4 Feb 2017 11:28:36 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.80) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1ca5xb-0005Vf-L5 for ietf-http-wg-dist@listhub.w3.org; Sat, 04 Feb 2017 19:25:23 +0000
Resent-Date: Sat, 04 Feb 2017 19:25:23 +0000
Resent-Message-Id: <E1ca5xb-0005Vf-L5@frink.w3.org>
Received: from titan.w3.org ([128.30.52.76]) by frink.w3.org with esmtps (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.80) (envelope-from <tombergan@chromium.org>) id 1ca5xW-0005Ub-PZ for ietf-http-wg@listhub.w3.org; Sat, 04 Feb 2017 19:25:18 +0000
Received: from mail-wm0-f44.google.com ([74.125.82.44]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from <tombergan@chromium.org>) id 1ca5xQ-0001Dj-L8 for ietf-http-wg@w3.org; Sat, 04 Feb 2017 19:25:13 +0000
Received: by mail-wm0-f44.google.com with SMTP id b65so77574543wmf.0 for <ietf-http-wg@w3.org>; Sat, 04 Feb 2017 11:24:52 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=IUklpDY1AyDUagCM6E6WC3j9wSJmQ/XT03NZigiKqAA=; b=ixzYjwJl9FgJmYDRrUt9agxuKnReldGealDP8knTaH8S9QO1FqIdB0+JzUkuxrErGk tMzdhHwkGVVT92nBl10tqOFylgf6JnWNJXo/CXQ3IMgmk0TlQ3zM5XH0tHBWbkz9b+lp Y/OkeA5NXAPLQHZ1uMxyzX/FC27COZYD1jwc0=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=IUklpDY1AyDUagCM6E6WC3j9wSJmQ/XT03NZigiKqAA=; b=uTMGd3/31AZEWKe7HBoB1Fh2DU73ThQbgw9GGr/OC+bfDd/CjRgiyKxE+4dsyRBm81 xM6UOd4P2DpC38qd/Luf52ycvP+Xx9wN1yRlJ/+YMhXjmjxDdQ4rrxTBSQzoJvdmWtfa tFZPsX+qsZh320S8PIjAUI27373jpAeAMln+UVnn6mEwXdT04wb0phwm4ES9Bq+dMkbf MnlWg20Dw+TOEQp1fLtty9gCHSR/NcfDX8fLMg1eD/TImXfRy8M3/pp2YQCNbI3k31hu YkolrFVvkeWCFp9QLB1s6L71/qtugzGWjgXyBSQulGNDL2jlgmuRNDFiApsjWA8ymNVu cUgg==
X-Gm-Message-State: AMke39m/hvCzYuWEr0oezFF9fW6vtJoyHQL6OOBX77Y8o7zziBzSRHmG47yJqAWu0GilRaYQ
X-Received: by 10.28.24.5 with SMTP id 5mr2631405wmy.1.1486236285809; Sat, 04 Feb 2017 11:24:45 -0800 (PST)
Received: from mail-wm0-f46.google.com (mail-wm0-f46.google.com. [74.125.82.46]) by smtp.gmail.com with ESMTPSA id b8sm51365341wrb.17.2017.02.04.11.24.44 for <ietf-http-wg@w3.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 04 Feb 2017 11:24:44 -0800 (PST)
Received: by mail-wm0-f46.google.com with SMTP id c85so77461310wmi.1 for <ietf-http-wg@w3.org>; Sat, 04 Feb 2017 11:24:44 -0800 (PST)
X-Received: by 10.28.228.87 with SMTP id b84mr2649569wmh.0.1486236284345; Sat, 04 Feb 2017 11:24:44 -0800 (PST)
MIME-Version: 1.0
Received: by 10.28.135.201 with HTTP; Sat, 4 Feb 2017 11:24:43 -0800 (PST)
In-Reply-To: <E26FEBDB-D09F-4A2D-A249-3E033A6C3070@gbiv.com>
References: <148593754312.24497.16311379877517350605.idtracker@ietfa.amsl.com> <3F68DC4A-3AC8-4309-8119-15A82C5E1EFC@mnot.net> <CA+3+x5E26beOT0CQYvt1LmQXmZBG3i9+H0g9-hqGgE_OCofNeg@mail.gmail.com> <E26FEBDB-D09F-4A2D-A249-3E033A6C3070@gbiv.com>
From: Tom Bergan <tombergan@chromium.org>
Date: Sat, 4 Feb 2017 11:24:43 -0800
X-Gmail-Original-Message-ID: <CA+3+x5E0DbJsGK8fc0=K0rcwh-4qDhYHxkMDFwaP0c0L38sJnQ@mail.gmail.com>
Message-ID: <CA+3+x5E0DbJsGK8fc0=K0rcwh-4qDhYHxkMDFwaP0c0L38sJnQ@mail.gmail.com>
To: "Roy T. Fielding" <fielding@gbiv.com>
Cc: Mark Nottingham <mnot@mnot.net>, HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary=001a114b1700c84f940547b959da
Received-SPF: pass client-ip=74.125.82.44; envelope-from=tombergan@chromium.org; helo=mail-wm0-f44.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1ca5xQ-0001Dj-L8 7c429b13fd787b47e80ae1a095ec74e7
X-Original-To: ietf-http-wg@w3.org
Subject: Re: New Version Notification for draft-nottingham-httpbis-retry-01.txt
Archived-At: <http://www.w3.org/mid/CA+3+x5E0DbJsGK8fc0=K0rcwh-4qDhYHxkMDFwaP0c0L38sJnQ@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/33442
X-Loop: ietf-http-wg@w3.org
Resent-Sender: ietf-http-wg-request@w3.org
Precedence: list
List-Id: <ietf-http-wg.w3.org>
List-Help: <http://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

On Fri, Feb 3, 2017 at 10:03 PM, Roy T. Fielding <fielding@gbiv.com> wrote:

> > On Feb 1, 2017, at 12:41 PM, Tom Bergan <tombergan@chromium.org> wrote:
> >
> > > Applications sometimes want requests to be retried by
> > > infrastructure, but can't easily express them in a non-idempotent
> > > request (such as GET).
> >
> > nit: did you mean "in an idempotent request (such as GET)"?
> >
> > > A client SHOULD NOT automatically retry a failed automatic retry.
> >
> > Why does RFC 7230 say this? I am aware of HTTP clients that completely
> ignore this suggestion, and I can't offhand think of a reason why this is a
> good rule-of-thumb to follow.
>
> This is only referring to retries due to a dropped connection. The reason
> is because a
> second connection drop is (in almost all cases) due to the request itself,
> as opposed to
> something transient on the network path.  [BTW, this doesn't refer to
> requests yet to be
> sent in a request queue or pipeline -- just the retried request in flight
> for which no response
> is received prior to FIN/RST (or equivalent).]
>

There seem to be many underlying assumptions. I'm glad that Mark is making
things more explicit. For example, "a second connection drop is (in almost
all cases) due to the request itself" likely does not hold in flaky
cellular networks, such as getting on/off a subway. This is why Chrome will
automatically retry a failed page load when it detects a change in network
connectivity. Also think of the "parking lot problem" where you transition
between WiFi in the office and cellular in the parking lot.

I'm not sure your claim is strictly true even assuming good network
connectivity. A data point: I help run a very large proxy service. When we
experimented with automatic retries, we saw a ~40% success rate on the
first retry, ~20% on the second retry, and ~5% on the third retry. We only
retried GETs and HEADs where the connection was dropped before we received
a single byte of response. That ~20% success rate is arguably high enough
to make a second retry worthwhile (depending on your POV).

That said, I'm not trying to convince you that HTTP clients should send
multiple retries. Rather, I'm surprised that the HTTP spec takes a position
on this question in the first place. Retry logic seems like a fundamentally
application-specific property, beyond really basic things like "requests
with idempotent methods must be safe to retry."

There might be a good reason to go ahead and retry with an exponential
> back-off,
> but I don't know what that would be in general.


It is common to use exponential backoff with RPC-over-HTTP (one example
<https://github.com/grpc/grpc/blob/master/doc/connection-backoff.md>).
Speaking of RPC-over-HTTP, in Section 2.1 of Mark's document, perhaps we
could generalize "User Retries" to "Application Retries"? As written,
Section 2.1 is kind of specific to browsers and it's not clear how
non-browser applications fit in. RPC could be one such application. Also
think of programs like daemons that make HTTP requests (often
RPC-over-HTTP) without any direct prompting from a user.