Re: MAX_CONCURRENT_STREAMS=0 and PUSH_PROMISE

Roberto Peon <grmocg@gmail.com> Tue, 23 July 2013 17:02 UTC

Return-Path: <ietf-http-wg-request@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 6703111E82EA for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Jul 2013 10:02:36 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.298
X-Spam-Level:
X-Spam-Status: No, score=-10.298 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, HTML_MESSAGE=0.001, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([12.22.58.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id a8ttQpy2D9qr for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Jul 2013 10:02:30 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id DA64111E82CE for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 23 Jul 2013 10:02:29 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1V1fyR-0003ze-9I for ietf-http-wg-dist@listhub.w3.org; Tue, 23 Jul 2013 17:02:07 +0000
Resent-Date: Tue, 23 Jul 2013 17:02:07 +0000
Resent-Message-Id: <E1V1fyR-0003ze-9I@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1V1fyI-0003wB-Vm for ietf-http-wg@listhub.w3.org; Tue, 23 Jul 2013 17:01:59 +0000
Received: from mail-oa0-f53.google.com ([209.85.219.53]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <grmocg@gmail.com>) id 1V1fyI-00011j-2O for ietf-http-wg@w3.org; Tue, 23 Jul 2013 17:01:58 +0000
Received: by mail-oa0-f53.google.com with SMTP id k14so11700704oag.40 for <ietf-http-wg@w3.org>; Tue, 23 Jul 2013 10:01:32 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Y1TZUMgojn5nbZP5vscgFgwlDc2r5Y0jP9O7t1bL4Zw=; b=oEznbPU+NB4bI1ybqNalCV47F32erXfDdz/xqZGDqHg5cnfPemtuprSwRNPlApM/RR lFvc1ZSrcMC1stOEv1myMN0r6DnTRc3mkJzX47g2EIBblK5uo5lPboxNTUbDYO/BwKte 5+vu5YWc1jsbsXx08a+OjFSj9kVdSeljRTmabieZ4sOsKHXsOEaEvjTEkGJd05qC5lpP Q9BQNkZJRe6MZCMDbVN6sGuT6KVO+MDHuJhbDlXIbnMa5wN6ZQqN0oA9rwyG8ejaAXxn /ZnjCn1XPhHBXJXSLfZYEp5zMXHJRxA99UrPG91vRpfJwnBKfpHAUnC2DIn4V/Fd1prR Irnw==
MIME-Version: 1.0
X-Received: by 10.182.71.38 with SMTP id r6mr25589599obu.64.1374598892082; Tue, 23 Jul 2013 10:01:32 -0700 (PDT)
Received: by 10.76.91.229 with HTTP; Tue, 23 Jul 2013 10:01:31 -0700 (PDT)
Received: by 10.76.91.229 with HTTP; Tue, 23 Jul 2013 10:01:31 -0700 (PDT)
In-Reply-To: <CA+KJw_5PcUxBiUnQ00=G2C4Q6MnaB=hpNDk+9eTeZMs3Lz-CpA@mail.gmail.com>
References: <CA+KJw_5PcUxBiUnQ00=G2C4Q6MnaB=hpNDk+9eTeZMs3Lz-CpA@mail.gmail.com>
Date: Tue, 23 Jul 2013 10:01:31 -0700
Message-ID: <CAP+FsNf7YBDfO_=fW7nPHXdUi0F+0+4S2AUm_T2gHtqYhER8MA@mail.gmail.com>
From: Roberto Peon <grmocg@gmail.com>
To: Gábor Molnár <gabor.molnar@sch.bme.hu>
Cc: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="e89a8fb1f56cabdcb004e230be49"
Received-SPF: pass client-ip=209.85.219.53; envelope-from=grmocg@gmail.com; helo=mail-oa0-f53.google.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-2.688, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1V1fyI-00011j-2O 731104372e8bb6ed47d64d70ad726692
X-Original-To: ietf-http-wg@w3.org
Subject: Re: MAX_CONCURRENT_STREAMS=0 and PUSH_PROMISE
Archived-At: <http://www.w3.org/mid/CAP+FsNf7YBDfO_=fW7nPHXdUi0F+0+4S2AUm_T2gHtqYhER8MA@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18879
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>

The whole point of push-promise is to not count them, and so to avoid the
condition where the number of resources it wishes to push exceed the max
concurrent stream limit, causingna race.

E.g. if max concurrent stream limit is 10, but I have 21 resources to push.
If push-promise counted, I'd be unable to advertise push promise for all of
these resources, potentially causing a race on the 11 resources the server
was not allowed to send luah-promise for. This would be true even if I was
sending the resources one at a time...

You ask a separate question about whether or not push-promise can be sent
when max-concurrency is 0. Personally, I don't see any real harm in it. The
client can discard the data after putting them through the compressor.
Push-promise is only distinguishable from the headers  frame by the opcode,
so we should be talking about very minimal amounts of code.

-=R
 On Jul 23, 2013 7:30 AM, "Gábor Molnár" <gabor.molnar@sch.bme.hu> wrote:

> It is possible to set SETTINGS_MAX_CONCURRENT_STREAMS to 0. AFAIK, the
> design rationale behind this is that a client can forbid server push if it
> does not implement it yet or just does not want to receive push streams.
>
> Since streams in "reserved (local)" state do no count as active stream,
> the server can still promise push streams even if
> SETTINGS_MAX_CONCURRENT_STREAMS is 0. (But it can not actually send the
> content on the promised stream.)
>
> This goes against the design rationale, since clients will still have to
> be able to deal with PUSH_PROMISEs if they want to comply to the standard.
>
> What is the rationale behind not counting reserved streams as active? They
> usually become active very soon so it would make sense to count them as
> active as well. This would also prohibit servers promising streams when
> SETTINGS_MAX_CONCURRENT_STREAMS is 0.
>
>   Gábor
>