Re: Priority implementation complexity (was: Re: Extensible Priorities and Reprioritization)

Barry Pollard <> Tue, 16 June 2020 16:50 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id 0C8CE3A0400 for <>; Tue, 16 Jun 2020 09:50:50 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -2.448
X-Spam-Status: No, score=-2.448 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
Authentication-Results: (amavisd-new); dkim=fail (1024-bit key) reason="fail (body has been altered)"
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id Gz5FKPkBe4SP for <>; Tue, 16 Jun 2020 09:50:48 -0700 (PDT)
Received: from ( []) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by (Postfix) with ESMTPS id 80C603A00C1 for <>; Tue, 16 Jun 2020 09:50:48 -0700 (PDT)
Received: from lists by with local (Exim 4.92) (envelope-from <>) id 1jlEl5-0000QC-SQ for; Tue, 16 Jun 2020 16:48:24 +0000
Resent-Date: Tue, 16 Jun 2020 16:48:23 +0000
Resent-Message-Id: <>
Received: from www-data by with local (Exim 4.92) (envelope-from <>) id 1jlEkw-0000LI-BQ for; Tue, 16 Jun 2020 16:48:14 +0000
Received: from ([]) by with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from <>) id 1jl5Hq-0006v7-I7 for; Tue, 16 Jun 2020 06:41:34 +0000
Received: from ([2a00:1450:4864:20::229]) by with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from <>) id 1jl5Ho-0005tz-Rl for; Tue, 16 Jun 2020 06:41:34 +0000
Received: by with SMTP id z9so22113863ljh.13 for <>; Mon, 15 Jun 2020 23:41:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mBEIdbFEd6Vh9Q2fWImmJNxLsHqVBtGqi/15+NHDMxY=; b=b9bVgN8c74aM+pdAUWWbPZGk05cMCuFP0caJks2A0VqtDgWv3jBkm8nXwSkehS1JGC wOeImZ7xEUUSmzFvogUVzizpAbHxzHxx0Dh3XuSpyzPca2e50MvINafCVtdO7uRH1EQn lEyfKLwy1EESKJVBk0XAcZi9uJY7e5/S+Md8c=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=mBEIdbFEd6Vh9Q2fWImmJNxLsHqVBtGqi/15+NHDMxY=; b=KVva6gCGN0zWFYWqKVOc77kuynXiGhMf0qsyPt0YxGX6acsoCTMAjpgbiCSQ2ZqqRm EidH/xqateYUAiBhj5/wpj9USJCJbU8sOb234QnEeHJK2C3MdbWqj1GxbS3Tn4ica8hm Xe1SZ1ZFgKsIksihFkobtljtdeJaeW7v5ipKHzHZ7dp6qfsdW/Pc4cdjuOvTnO2JmMhN 0Ikaoc7jXOKyGxQO0FxxJWHfnfDSweTHRkmriPFxN55rhUJidmL697LHeABuqPbtH7oY 0mipUNVjDAvF8q2Q8sNeMxk298lvlRST5ab/0QJYHtlcWllAPCUPsNJqzezkVK6aPYH0 xi0Q==
X-Gm-Message-State: AOAM530mybwxwS2xXCMcCOJwIaCcBFsuasGnJoebat/RhO3/blXD7ZdU ZplzLQiwNuOcsLGyoBjeTmKWYtIJN6Y41JEzP3iTJ/ucz4v1wg==
X-Google-Smtp-Source: ABdhPJzktl1Wd/QvrJUVYn1+Mubw1Y3iWBsVEGRgZE9zaEiSDfrX52yqPSCN2zcPmMdbKb8Evgm6f0CZgl0QiFOFWvg=
X-Received: by 2002:a2e:22c2:: with SMTP id i185mr733073lji.200.1592289680582; Mon, 15 Jun 2020 23:41:20 -0700 (PDT)
MIME-Version: 1.0
References: <> <> <> <> <> <20200609144428.GC22180@lubuntu> <> <> <> <> <> <> <> <> <> <> <> <> <> <> <>
In-Reply-To: <>
From: Barry Pollard <>
Date: Tue, 16 Jun 2020 07:40:45 +0100
Message-ID: <>
To: Kazuho Oku <>
Cc: =?UTF-8?Q?Bence_B=C3=A9ky?= <>, HTTP Working Group <>, Lucas Pardue <>, Patrick Meenan <>, Stefan Eissing <>, Yoav Weiss <>
Content-Type: multipart/alternative; boundary="000000000000ca7f1d05a82dd434"
Received-SPF: pass client-ip=2a00:1450:4864:20::229;;
X-W3C-Hub-Spam-Status: No, score=-4.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_WL=-1
X-W3C-Scan-Sig: 1jl5Ho-0005tz-Rl c6f0f79a05f1312ea4a1466110274b19
X-caa-id: 5eb0363da7
Subject: Re: Priority implementation complexity (was: Re: Extensible Priorities and Reprioritization)
Archived-At: <>
X-Mailing-List: <> archive/latest/37773
Precedence: list
List-Id: <>
List-Help: <>
List-Post: <>
List-Unsubscribe: <>

On Tue 16 Jun 2020 at 01:06, Kazuho Oku <> wrote:

> In such a deployment, I would argue that the H3 reverse proxy should
> respect the priorities when choosing a request from the queue, regardless
> of the prioritization signal being initial or reprioritization. Otherwise,
> the H3 reverse proxy would end up providing responses to requests mostly in
> the order of the requests being issued.

That I agree with. But some prioritisation choices are discrete - for
backend requests the request is either queued or sent to back end or
completed by the backend. I wouldn’t try to interrupt that after it’s been
sent to the back end. So you use the best prioritisation signals available
at the time when choosing which request to the backend.

If 8 items come in at medium priority and they all require back end calls,
and we can only have 8 backend resources in flight at same time, then send
them. If a 9th high priority request then comes in while those 8 are being
processed then tough - there are no free slots to the backend for that
request despite it being high priority - those backend slots were filled
with the best prioritisation signals available at the time.

Of course if 10 items need backend resources, with differing priorities,
then use that priorities to decide which 8 of those to send first. But I’m
Just saying this is less likely to happen until all the back end slots are
filled because 10 things do not come in at once - they come in one by one
and I’d argue they should be sent to the back end ASAP and then left to
complete, rather than holding back requests or interrupting requests
already sent to back end. So initially, until all backend slots are filled,
prioritisation is not used here because effectively there is no queue

Either way, after the back end process is complete for one or more requests
and returned to the web server, we’ve another queue of bytes to return to
the browser and so another opportunity to use prioritisation to select
which stream’s bytes to send back.

Basically what I’m saying is only use prioritisation when there’s a queue
and a choice to be made.

However, as there is more likely to be queuing on the final return step to
the client, we’ll end up using prioritisation more there (which is no bad