Re: [httpapi] client-specified timeout?

Mark Nottingham <mnot@mnot.net> Sat, 06 February 2021 02:43 UTC

Return-Path: <mnot@mnot.net>
X-Original-To: httpapi@ietfa.amsl.com
Delivered-To: httpapi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 90B113A10E2 for <httpapi@ietfa.amsl.com>; Fri, 5 Feb 2021 18:43:03 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.12
X-Spam-Level:
X-Spam-Status: No, score=-2.12 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=mnot.net header.b=poCewKd6; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=ZMRjqoqj
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 IX5nNdxZmIJq for <httpapi@ietfa.amsl.com>; Fri, 5 Feb 2021 18:43:02 -0800 (PST)
Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id E46053A10E3 for <httpapi@ietf.org>; Fri, 5 Feb 2021 18:43:01 -0800 (PST)
Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0FE2C5C0161; Fri, 5 Feb 2021 21:43:01 -0500 (EST)
Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Fri, 05 Feb 2021 21:43:01 -0500
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mnot.net; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=1 rJWCJjj7aZzKT7XmV9FFBE3rbaF76uQEIKlhWCcLCU=; b=poCewKd6rOCNbI12y jWJTWpqKK6B0+4/PRxNrQh8P3H5r9wibVPhewcuQQVWc+IZFzwprB+qUamgA+TnA PJXamyTZnZ0YNR21c8JDDL/ZoCCwk3UC3t7A5BWFiOIygr/XiGxt7x8OzzZAfAtJ sJ3DNNCb9xM8TK5/IAEK/r3TVAhCltv2FxMUOkZNMJLasSXJ9QLvf/JcVlZjgVBj DO7WagKSZtcHG7gJHc2/55oDmtXj0eEjple+lsTjugUUWNEwR6/8tOTBAA1DkuK9 49An+nfWxCZ3D7BUxdJlvVRFClfJwuySMvkQXQInRbjuirV1n7w/Qo20VpImU+Wk HOfJw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=1rJWCJjj7aZzKT7XmV9FFBE3rbaF76uQEIKlhWCcL CU=; b=ZMRjqoqj7I99enLpz/iXe1gWgFOmFivO2fCxVn8dw+mQq46Fu7KUkLyoY 2BkPORIBac/WHZd4DjLNqvwk/L1M9GiuMxgclOOCAjODt9sRwIUTmhWmb2blwqF5 OLXeZoaNZSweSDUKqtQ0KIvzzQ5ap+6xNvvEC5d75jplElc2+FtuUr7XO0YC6CgO jBNrfOVHx2gPdMKXXyLuLBX1sh8gGgzBC7YxfFNhaW/T2ojiuxmazRAHu3VTCYGt KeApQs1BceMRWYZonjpJJ1gWIbK+7Sj0EYwUZqNczcnn+04Mnu+VTlSKZNxUBUN0 DTU3EI6bAmshDT1YSvxRVBkWPdMUA==
X-ME-Sender: <xms:NAIeYKyAHetaP0hc59DZBzDrHjdLYa5IVlAVFqO4ZXlrtNq-tW-yyA> <xme:NAIeYGRtsKt99zi69UDidrDgBQ3K-XqfEeTME9klFTyBFY3pfWxaeXPVjErV4em9v XbIjSPFtgyUito3MQ>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrgeejgdegjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurheptggguffhjgffgffkfhfvofesthhqmh dthhdtjeenucfhrhhomhepofgrrhhkucfpohhtthhinhhghhgrmhcuoehmnhhothesmhhn ohhtrdhnvghtqeenucggtffrrghtthgvrhhnpeekgfefieekleeflefhhedvveekveehle eifefhleetffevteeiheeltdetleeuffenucffohhmrghinhepudhhohhsthgvgigrmhhp lhgvrdhorhhgpdhivghtfhdrohhrghdpmhhnohhtrdhnvghtnecukfhppeduudelrdduje drudehkedrvdehudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhl fhhrohhmpehmnhhothesmhhnohhtrdhnvght
X-ME-Proxy: <xmx:NAIeYMXD9iNQp_vYpTBWCnP_KZY_8QOUrKjqsMvJtnl36Ut88ahVuQ> <xmx:NAIeYAjFc5gHvqWpFGG0uBSsZNRRkQG0RXVA24jjCPtTVbewx7t-fw> <xmx:NAIeYMDY87vz4-2Pofwsi_PIJF23sZhcrGAS0CCWQ-HZZY0ZZpAicA> <xmx:NQIeYPM9mf6dTHZGT52_KE-6jHnsJHXJl7HOBBMKoMJqYvwS01y7MA>
Received: from [192.168.7.30] (119-17-158-251.77119e.mel.static.aussiebb.net [119.17.158.251]) by mail.messagingengine.com (Postfix) with ESMTPA id 1BAC01080057; Fri, 5 Feb 2021 21:42:58 -0500 (EST)
Content-Type: text/plain; charset="utf-8"
Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.60.0.2.21\))
From: Mark Nottingham <mnot@mnot.net>
In-Reply-To: <7613F010-431C-47B3-802E-5258BAA5E156@akamai.com>
Date: Sat, 06 Feb 2021 13:42:56 +1100
Cc: "httpapi@ietf.org" <httpapi@ietf.org>
Content-Transfer-Encoding: quoted-printable
Message-Id: <AEE0222E-3DC1-4607-AEA1-710D5979297C@mnot.net>
References: <7613F010-431C-47B3-802E-5258BAA5E156@akamai.com>
To: "Salz, Rich" <rsalz=40akamai.com@dmarc.ietf.org>
X-Mailer: Apple Mail (2.3654.60.0.2.21)
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/B3ctzYlTmyF70TIJng0r1JVAe7E>
Subject: Re: [httpapi] client-specified timeout?
X-BeenThere: httpapi@ietf.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: Building Blocks for HTTP APIs <httpapi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/httpapi>, <mailto:httpapi-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/httpapi/>
List-Post: <mailto:httpapi@ietf.org>
List-Help: <mailto:httpapi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/httpapi>, <mailto:httpapi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Sat, 06 Feb 2021 02:43:04 -0000

Something like:

GET /foo HTTP/1.1
Host: example.org
Prefer: wait=2

?

<https://tools.ietf.org/html/rfc7240#section-4.3>

IIRC that was specified in seconds, not ms, because of concern that very small periods desired by the client would effectively be a race with the network; e.g., if your client wants a result in 200ms and you make a request to a server even mildly far away (due to connection setup times, etc.), the response is likely to take longer.

If we wanted something with finer granularity, we'd probably want to caution against such assumptions on the client side -- i.e., that 200ms is *server-side* processing, and the client shouldn't try to enforce the timeout. 

It might also be interesting to think about sending a 103 Early Hints response with a Preference-Applied header in some circumstances, so that the client knows the server is honouring the preference...

Cheers,


> On 6 Feb 2021, at 5:54 am, Salz, Rich <rsalz=40akamai.com@dmarc.ietf.org> wrote:
> 
> Is it reasonable for a client to want the ability to say things like “if this takes more than 300ms send a failure status code back” ?
> Anyone in the WG interested in thinking/working on this?
>  
> -- 
> httpapi mailing list
> httpapi@ietf.org
> https://www.ietf.org/mailman/listinfo/httpapi

--
Mark Nottingham   https://www.mnot.net/