Re: MAX_CONCURRENT_STREAMS=0 and PUSH_PROMISE

Ilari Liusvaara <ilari.liusvaara@elisanet.fi> Tue, 23 July 2013 19:05 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 15F3321F9A51 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Jul 2013 12:05:42 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.599
X-Spam-Level:
X-Spam-Status: No, score=-10.599 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, 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 504mkGkc-Csn for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Tue, 23 Jul 2013 12:05:35 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 8542721F85D1 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Tue, 23 Jul 2013 12:05:28 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1V1htH-0000mQ-Op for ietf-http-wg-dist@listhub.w3.org; Tue, 23 Jul 2013 19:04:55 +0000
Resent-Date: Tue, 23 Jul 2013 19:04:55 +0000
Resent-Message-Id: <E1V1htH-0000mQ-Op@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <ilari.liusvaara@elisanet.fi>) id 1V1ht6-0000lh-VR for ietf-http-wg@listhub.w3.org; Tue, 23 Jul 2013 19:04:45 +0000
Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by maggie.w3.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.72) (envelope-from <ilari.liusvaara@elisanet.fi>) id 1V1ht5-0005Le-Dp for ietf-http-wg@w3.org; Tue, 23 Jul 2013 19:04:44 +0000
Received: from saunalahti-vams (vs3-12.mail.saunalahti.fi [62.142.5.96]) by emh04.mail.saunalahti.fi (Postfix) with SMTP id 07BAF1A25C3; Tue, 23 Jul 2013 22:04:21 +0300 (EEST)
Received: from emh04.mail.saunalahti.fi ([62.142.5.110]) by vs3-12.mail.saunalahti.fi ([62.142.5.96]) with SMTP (gateway) id A060D7EDBB2; Tue, 23 Jul 2013 22:04:20 +0300
Received: from LK-Perkele-VII (a88-112-44-140.elisa-laajakaista.fi [88.112.44.140]) by emh04.mail.saunalahti.fi (Postfix) with ESMTP id 53AFC1A25C3; Tue, 23 Jul 2013 22:04:19 +0300 (EEST)
Date: Tue, 23 Jul 2013 22:04:19 +0300
From: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
To: Roberto Peon <grmocg@gmail.com>
Cc: Gábor Molnár <gabor.molnar@sch.bme.hu>, HTTP Working Group <ietf-http-wg@w3.org>
Message-ID: <20130723190419.GA25817@LK-Perkele-VII>
References: <CA+KJw_5PcUxBiUnQ00=G2C4Q6MnaB=hpNDk+9eTeZMs3Lz-CpA@mail.gmail.com> <CAP+FsNf7YBDfO_=fW7nPHXdUi0F+0+4S2AUm_T2gHtqYhER8MA@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Disposition: inline
In-Reply-To: <CAP+FsNf7YBDfO_=fW7nPHXdUi0F+0+4S2AUm_T2gHtqYhER8MA@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Sender: Ilari Liusvaara <ilari.liusvaara@elisanet.fi>
X-Antivirus: VAMS
Received-SPF: pass client-ip=62.142.5.110; envelope-from=ilari.liusvaara@elisanet.fi; helo=emh04.mail.saunalahti.fi
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-3.450, RCVD_IN_DNSWL_NONE=-0.0001, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1V1ht5-0005Le-Dp 92e3e3a637b8fb333397611df58f2c11
X-Original-To: ietf-http-wg@w3.org
Subject: Re: MAX_CONCURRENT_STREAMS=0 and PUSH_PROMISE
Archived-At: <http://www.w3.org/mid/20130723190419.GA25817@LK-Perkele-VII>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/18886
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 Tue, Jul 23, 2013 at 10:01:31AM -0700, Roberto Peon wrote:
> 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.

How it does cause a race? Stall the associated stream and open some promised
streams if you have slots for it (if not, complete some old open pushed
streams first). No races there.

Or are you talking about client shrinking number of allowed promised frames
mid-connection? Yeah, that sort of thing is fundamentally racy.

> 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...

Any sensible client (and especially proxy) is going to
RST_STREAM(REFUSED_STREAM) any promised stream over some limit.

Otherwise, have fun with 1,000,000,000 promised streams... And promised
streams are not free for client/proxy.

> 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.

I regard that operation as just plain nonsense.

Want to test if client is going to send back RST_STREAM(REFUSED_STREAM) or
GOAWAY(INTERNAL_ERROR)? :-)

-Ilari