Re: [httpapi] client-specified timeout?

Lucas Pardue <lucaspardue.24.7@gmail.com> Fri, 05 February 2021 23:40 UTC

Return-Path: <lucaspardue.24.7@gmail.com>
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 080083A0DDA for <httpapi@ietfa.amsl.com>; Fri, 5 Feb 2021 15:40:18 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.847
X-Spam-Level:
X-Spam-Status: No, score=-1.847 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, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_HELO_NONE=0.001, 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=gmail.com
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 0bAeiDFPODw8 for <httpapi@ietfa.amsl.com>; Fri, 5 Feb 2021 15:40:16 -0800 (PST)
Received: from mail-ej1-x635.google.com (mail-ej1-x635.google.com [IPv6:2a00:1450:4864:20::635]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1CF3C3A0DD8 for <httpapi@ietf.org>; Fri, 5 Feb 2021 15:40:16 -0800 (PST)
Received: by mail-ej1-x635.google.com with SMTP id lg21so14852754ejb.3 for <httpapi@ietf.org>; Fri, 05 Feb 2021 15:40:16 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=davl+0Y7kMIT55Y+ZDrryaDPAV8KdHgZuSLLFfTWgHA=; b=MrlKTRmYobmlDqDoEIQN4B+xlqWSqiRoP2pgAFvNYiFkzFir1yCGkbpt+Sge3baQWT SDlX9TinhkEI9p9FRycwV4InN0oJ9GJ5HVEpaxseHSxX4oqWrHhbW981AloqVn8YMf3i VKOSJ+T1lZ0zIbRAeKxymZaii7Aodhj3IdGVdoMaH0kv6Fc/mbEXjiYY8Izjt+4WZ9Jf aQQ6Eh81/N8Z4uzhBUqna2OQ347niK/w4Xr8SjAqLknGCd8Im3a17BDgw03b42BR3Spz 4iTCzfJfB0vxMGrBvbnchNbcqpqogk9W6O3Zi0+AeDz6WqkspWUDR/bDKB7wvMmXM0Gy mAAg==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=davl+0Y7kMIT55Y+ZDrryaDPAV8KdHgZuSLLFfTWgHA=; b=dTjIdiJ6A73DttxT83fqG2/awDAMFFkF9yv2XpreFzhulBhPpO5SuubMIiRFqUs9qc 0A0y/57bLUHt+7vAaDc8YBwLQ7Z764KxTkNpMOQvA5M6vjUGV+8Ws4Utgjlxee7IhFNK lAkUPbdDqxZq16DrW3hOj7se48BNtK15ILixL0HEo1sjVxEXFzXlcxjCfGrPFOSr4Q4K Sxm3VobADVnrmRTL6NB8TyOQO/yy60UMp6CUq+nHaN5uAgdKrMJcuipSGXolcrHy2phj rIaC5KFn/tDfnukJxGrrasxcsK8i5xYzJgXZqQQkm+7BBFho1oA915dExSYbKn+ODujl f/Ww==
X-Gm-Message-State: AOAM530uO2y2/l7LHJi0FTAUeFRYMdKDWxDXb/agxoFfRgBejw7GSll0 m7QWYR49AGq/UligVWRtAKln06TwloKHhj2JU/g=
X-Google-Smtp-Source: ABdhPJx4RWQcU7ReV76x43bSUR1bXTx6FyXwuRaRHRP1xQJ0+8dQQunnUT7ZOVnm2WOi+D3Ta4MyHj+pMFuL+gmFuOs=
X-Received: by 2002:a17:906:5d0b:: with SMTP id g11mr6253618ejt.542.1612568414726; Fri, 05 Feb 2021 15:40:14 -0800 (PST)
MIME-Version: 1.0
References: <7613F010-431C-47B3-802E-5258BAA5E156@akamai.com> <35f5defe-e908-d0b8-5947-bba0da6a34c8@bucksch.org> <C315C786-0160-4806-965D-E47D001D5247@akamai.com> <8981145b-bc34-4cfb-8e14-d0c5d8c0e83b@bucksch.org>
In-Reply-To: <8981145b-bc34-4cfb-8e14-d0c5d8c0e83b@bucksch.org>
From: Lucas Pardue <lucaspardue.24.7@gmail.com>
Date: Fri, 05 Feb 2021 23:40:04 +0000
Message-ID: <CALGR9oZdggBc+qkMQHM9030oPvD4_8KeBf-aWjS_pdPPhcuR_A@mail.gmail.com>
To: Ben Bucksch <news@bucksch.org>
Cc: "Salz, Rich" <rsalz@akamai.com>, httpapi@ietf.org
Content-Type: multipart/alternative; boundary="000000000000892eb905ba9f57d6"
Archived-At: <https://mailarchive.ietf.org/arch/msg/httpapi/r59bt0B4fSDM9jpSVkEAXkzk9gc>
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: Fri, 05 Feb 2021 23:40:18 -0000

So one way to squint at this problem is as a time dimension* in HTTP
prioritization and scheduling.

Just because a server might be able to retrieve a resource in the desired
time doesn't necessarily mean it can return it to the client in the same
window. In HTTP/2 or 3 imagine a small API response getting stuck behind a
larger resource (whether purposeful scheduling or HoL blocking).

So one way to approach this problem might be to define an extension
parameter to Extensible Prioirities [1] that augments urgency with a time
bound. For example priority: u=0, target-time=300 would describe a request
that is the most urgent until its target time elapsed.  What happens after
that can be further refined (5xx, reset stream, lower urgency). There's
probably a bunch a problem with this in practice but just sayin'.

Cheers
Lucas

* There's a totally different use case for time dimensions related to the
timely delivery of real-time AV, after which the object becomes useless.

[1] https://tools.ietf.org/html/draft-ietf-httpbis-priority-03

On Fri, 5 Feb 2021, 23:18 Ben Bucksch, <news@bucksch.org> wrote:

> Am 05.02.21 um 21:47 schrieb Salz, Rich:
>
>
>    - Or do you mean the server should make guess whether the query will
>    take more than 300ms (possibly with the help of the database, which checks
>    how the query would look like and perform), and return a failure code
>    immediately, *without* attempting to actually make the query?
>
> This.
>
> I think the “start and abort if time exceeded” is already handled, as you
> point out.
>
>
> Perfect. Glad for that clear answer. That makes sense.
>
> It would be good to put that into the spec.
> --
> httpapi mailing list
> httpapi@ietf.org
> https://www.ietf.org/mailman/listinfo/httpapi
>