Re: What are the semantics of a client sent GOAWAY?

"Martin Thomson" <mt@lowentropy.net> Fri, 24 May 2019 10:27 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=lists.ie@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 CA47C1202B4 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 24 May 2019 03:27:28 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3
X-Spam-Level:
X-Spam-Status: No, score=-3 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=lowentropy.net header.b=AiB1JcuX; dkim=pass (2048-bit key) header.d=messagingengine.com header.b=FBQQ3+wm
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 eUkz394IpbFB for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 24 May 2019 03:27:26 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [IPv6:2603:400a:ffff:804:801e:34:0:38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 0B7C8120196 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 24 May 2019 03:27:25 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hU7Nf-0006DL-LB for ietf-http-wg-dist@listhub.w3.org; Fri, 24 May 2019 10:24:55 +0000
Resent-Date: Fri, 24 May 2019 10:24:55 +0000
Resent-Message-Id: <E1hU7Nf-0006DL-LB@frink.w3.org>
Received: from titan.w3.org ([2603:400a:ffff:804:801e:34:0:4c]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mt@lowentropy.net>) id 1hU7Nb-0006CU-Og for ietf-http-wg@listhub.w3.org; Fri, 24 May 2019 10:24:51 +0000
Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by titan.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <mt@lowentropy.net>) id 1hU7Na-0004Ya-5o for ietf-http-wg@w3.org; Fri, 24 May 2019 10:24:51 +0000
Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 35E6F21B4C for <ietf-http-wg@w3.org>; Fri, 24 May 2019 06:24:29 -0400 (EDT)
Received: from imap2 ([10.202.2.52]) by compute1.internal (MEProxy); Fri, 24 May 2019 06:24:29 -0400
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lowentropy.net; h=mime-version:message-id:in-reply-to:references:date:from:to :subject:content-type; s=fm2; bh=EIqv6V5Hqrv6Q0/5GhzVeQ0MIVoCTHl RzbaCvIxT190=; b=AiB1JcuXbN0hFw6ya52/zUO0VVCA+iDV1Dohv8iiy3CWhuC D8hMArf6XgygE6ibdJxSlMsbpCtuGNDB3Sg7Hhb28tU8KZzOn+vE1UBo4La3rLcK 1unHHlgZ4LoxL4IkWUc1kMMIG3oMHAYyV8/0PxvNaiXej4h67q3TddGy8/39Ucnk GN+jQAo8lo/cczs5R4IRYRC0IoPRab6I0/8qyQKmbzFhCXtiIX4F+UwG1sFnOstw 7uO96Hdes6HygFUlk31uZZCKYZ9L5HSytTaOUEoCKcag50QXamRaoHgC5IZtPoMn WsxIoQaIYjc58EBnqsRgWSXwgI9SVbFdQlVV+Jw==
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=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=EIqv6V 5Hqrv6Q0/5GhzVeQ0MIVoCTHlRzbaCvIxT190=; b=FBQQ3+wmxlCEobgtwwpea1 NZmOxlfiBlAWQtc/bke7Hy0kRXGuyS1yD+OaNPXPtixCwaWIEdaNMu50yJCuMD7U Gvl/HuY9IZwnH8UeAsI0hpCnA56lYY1v5OH2FEYbU8Q+5ss3biY3aDQUJ2cVTMUs fOExP5HrBuf0t/YCTsqfVM5PQEMaHIAX+cFftW+XObAE9fHQ/NyG/cHZEfke7YQc ZMSjZ5+XCEHikcUrpqD/OKv84gPWu4GCvUQuhAl3fkdkSTVfuyPLW+SMfof2j53F Z/nULKeZE9iyQxf4hDHsc19NTWKP2YzlO6syxXWNDU8QK6+liSHteLWKXPCPsGow ==
X-ME-Sender: <xms:XMbnXInb0pYL0Rde3jzlT69OOoSJNnw3BC3wjM7rfg6akuJr2669eg>
X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduuddrudduiedgvdelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefofgggkfgjfhffhffvufgtsehttd ertderredtnecuhfhrohhmpedfofgrrhhtihhnucfvhhhomhhsohhnfdcuoehmtheslhho figvnhhtrhhophihrdhnvghtqeenucffohhmrghinhepghhithhhuhgsrdgtohhmnecurf grrhgrmhepmhgrihhlfhhrohhmpehmtheslhhofigvnhhtrhhophihrdhnvghtnecuvehl uhhsthgvrhfuihiivgeptd
X-ME-Proxy: <xmx:XMbnXIK9LRTCXQ-QgbC5alxwgKsXPuddgsFpgX6cx7iTX5XZr23qAQ> <xmx:XMbnXORfHx34bxZreYUREbt8KCjGLXlE7y1qNeRFuyYmCVKxA8LMKw> <xmx:XMbnXPNd5H5T0civhXBvyEjloRMdJ8h7iQlUqbgB9_lM2TT32fTXCw> <xmx:XcbnXE_a-xP5UuDnM_oOCH86l4l0a1vjYfimJ91t3hR2UliXVqEoXA>
Received: by mailuser.nyi.internal (Postfix, from userid 501) id B454CE00A1; Fri, 24 May 2019 06:24:28 -0400 (EDT)
X-Mailer: MessagingEngine.com Webmail Interface
User-Agent: Cyrus-JMAP/3.1.6-550-g29afa21-fmstable-20190520v1
Mime-Version: 1.0
Message-Id: <6517c1f6-b1bb-4729-bd7b-49d1d15b4cdf@www.fastmail.com>
In-Reply-To: <175C6D33-072F-4308-84AE-EBCC69E634D7@fb.com>
References: <175C6D33-072F-4308-84AE-EBCC69E634D7@fb.com>
Date: Fri, 24 May 2019 11:24:30 +0100
From: Martin Thomson <mt@lowentropy.net>
To: ietf-http-wg@w3.org
Content-Type: text/plain
Received-SPF: pass client-ip=66.111.4.25; envelope-from=mt@lowentropy.net; helo=out1-smtp.messagingengine.com
X-W3C-Hub-Spam-Status: No, score=-3.6
X-W3C-Hub-Spam-Report: AWL=2.240, BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: titan.w3.org 1hU7Na-0004Ya-5o 1d7dc04d956fa2732bc5c706b4583613
X-Original-To: ietf-http-wg@w3.org
Subject: Re: What are the semantics of a client sent GOAWAY?
Archived-At: <https://www.w3.org/mid/6517c1f6-b1bb-4729-bd7b-49d1d15b4cdf@www.fastmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36684
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: <https://www.w3.org/Mail/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

This interpretation is correct as others have noted.  The client sending GOAWAY prevents the server from opening any new push streams and causes any above the described limit to be considered "cancelled".

Of course, cancellation of a push in the sense that the client has "processed" them is meaningless as they are all (safe) responses.

But this question doesn't really help us get any further with respect to resolving the question QUIC is facing.  We have to consider the range of different models you might attribute to the use of server push before you can answer the core question.

In the model that I think Alan (and Cory) are assuming, pushes are largely used for optimization.  A server sends them to prime the cache.  They might be related to the original request, but it is only a loose relationship.  This fits for the pushing of JS, images, and other subresources in the category of  "other customers who viewed this product bought the following items".

If that loose arrangement were the only model, then I would easily agree that having a clean way to stem the flow of pushes makes sense.  In this model, the client might want to ensure that it completes the requests that it has outstanding in the most expeditious way possible.  MAX_PUSH_ID in h3 might limit the number of pushes the server can send, but that doesn't prevent it from using up to that limit, "wasting" bandwidth on things that the client might not be interested in.

The other model that we're starting to see, particularly from people building APIs, is one where the request is not just a request for a response in the classic sense, but a means of triggering pushes.  This might be to establish an open channel for server-driven communications (as in RFC 8030), or it might be that pushes are an inherent part of the response.  In the latter form, which we discussed at the recent HTTP workshop around the Prefer: push proposal (draft-pot-prefer-push), this allows better composition of resources without adding extra latency for fetching them.  There, the client requests a main resource and the server is asked to push discrete resources rather than inlining information. 

In that model, a signal that prevents the server from opening new (unidirectional) push streams would effectively prevent those requests from being completed.

Taking a big step back here, the problem here is that the design in h2 is poor.  While the equivalence request and stream is often a convenience we rely on, we should be careful to recognize what the boundaries of a transaction are.  h2 failed to do that because we were largely fixated on the server-driven case, even though we had this idea that the mechanism could be symmetrical.

If you adopt the model of a loose coupling between requests and pushes, then it makes sense to be able to draw an arbitrary line after which you block pushes based on stream numbers.  However, that is not the only model we have.

Also, we don't need to further entrench the idea that streams are a good proxy for identifying the quanta of application state.  In the recent meeting Roberto likened streams to TCP connections in that they could be refused.  I think that's a dangerous assumption that could prevent us from using QUIC to its full potential.  Refusing connections is fine, but that is denying an association; refusing requests is also valid; but streams need to be seen more as tools that are used to fulfill higher-level goals.

My view is that we could add a signal to the protocol that allowed a client to block further pushes.  However, to call it GOAWAY would be misleading.  GOAWAY exists to facilitate graceful shutdown, but that signal couldn't be graceful in the same way that a GOAWAY frame from the server is.  I don't think that we can fix h2 now, but we can avoid repeating its mistakes.

Cheers,
Martin

On Thu, May 23, 2019, at 15:13, Alan Frindell wrote:
>  
> This discussion came up in the QUIC working group with respect to 
> https://github.com/quicwg/base-drafts/issues/2632.
> 
>  My understanding of 7540 is that a GOAWAY sent by the client will 
> prevent the server from opening any additional push streams, without 
> waiting to receive the push streams and then reset them. It may also 
> convey which pushes in flight were definitely not processed at the 
> client. Is this interpretation correct?
> 
> 
> Thanks
> 
> 
> -Alan
>