Re: Design Issue: Merge RST_STREAM and GOAWAY into a single ERROR frame type

Jeff Pinner <jpinner@twitter.com> Fri, 03 May 2013 20:35 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 7543921F925A for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 3 May 2013 13:35:06 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -9.976
X-Spam-Level:
X-Spam-Status: No, score=-9.976 tagged_above=-999 required=5 tests=[BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, 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 0sss4n0hqVaZ for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Fri, 3 May 2013 13:35:01 -0700 (PDT)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 150AB21F8D28 for <httpbisa-archive-bis2Juki@lists.ietf.org>; Fri, 3 May 2013 13:35:01 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1UYMgi-00063m-3B for ietf-http-wg-dist@listhub.w3.org; Fri, 03 May 2013 20:34:40 +0000
Resent-Date: Fri, 03 May 2013 20:34:40 +0000
Resent-Message-Id: <E1UYMgi-00063m-3B@frink.w3.org>
Received: from maggie.w3.org ([128.30.52.39]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <jpinner@twitter.com>) id 1UYMgX-000632-9V for ietf-http-wg@listhub.w3.org; Fri, 03 May 2013 20:34:29 +0000
Received: from mail-ob0-f176.google.com ([209.85.214.176]) by maggie.w3.org with esmtps (TLS1.0:RSA_ARCFOUR_SHA1:16) (Exim 4.72) (envelope-from <jpinner@twitter.com>) id 1UYMgW-0001cI-KD for ietf-http-wg@w3.org; Fri, 03 May 2013 20:34:29 +0000
Received: by mail-ob0-f176.google.com with SMTP id er7so1725319obc.7 for <ietf-http-wg@w3.org>; Fri, 03 May 2013 13:34:02 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=twitter.com; s=google; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=eYPzaMqeHe9NK+0ErfTd8wZsN6b4vC+QSc2THTgsXUk=; b=JiXCBDWFWdrXKDtbiEwWe9ToqcuAqlg30fcWifLRyPGp2DZnPTyqZZ1yZbvZpepVKC eJHRJUYB9P/FybjMzFrFV/AwSm49IBMAPXQPoPC9ULyAJcXqgIMpBmHmzxlKS8bqxxSn pamwANtNYKB9bR8DRAaYEuF3l+Pcy9IfW3Ods=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:cc:content-type:x-gm-message-state; bh=eYPzaMqeHe9NK+0ErfTd8wZsN6b4vC+QSc2THTgsXUk=; b=H2fc+FlB3aOk/0tr9kMzQ4pD7tFYma/awn8OEYhsTyotckMTd3CllTf4jJ12KukwIr /8ok954vmLZjCNEs0E77QXwyh85yBhtvvUaegaJeHSrrAUnDYqKsBFBehKlWpZSjscer a6ch6uXthSloaAsAIJwBcc+fMMA6Ea9/SYTC0BW7G14VmYYqCyIq9t9FSKu6dncvVwrm dx4phMDZ3/Q3DIoJVal+0cCI1yjEpTBdJmQrT2pydvlXMCBS+it+YZIqaB1GaA6wNV+i k+dvc9gYFsp+3EqVZGPmEqP84ppNH6nbvS+9J1w2DtyViQ+z4X3DlHAqqswOns1+PmEr qJgA==
MIME-Version: 1.0
X-Received: by 10.60.96.105 with SMTP id dr9mr3391944oeb.59.1367613242574; Fri, 03 May 2013 13:34:02 -0700 (PDT)
Received: by 10.182.129.197 with HTTP; Fri, 3 May 2013 13:34:02 -0700 (PDT)
In-Reply-To: <CABP7RbeJm-AKxU3qGxt2tCGrb0xCQL8njNyEToA7Ln9gS8hnTQ@mail.gmail.com>
References: <CABP7RbeJm-AKxU3qGxt2tCGrb0xCQL8njNyEToA7Ln9gS8hnTQ@mail.gmail.com>
Date: Fri, 03 May 2013 13:34:02 -0700
Message-ID: <CA+pLO_gWErCMv+j3pcmy+cTkt-hh2v6a7neeyDtg7HRN3x=Sgw@mail.gmail.com>
From: Jeff Pinner <jpinner@twitter.com>
To: James M Snell <jasnell@gmail.com>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="089e012280f283976b04dbd645c4"
X-Gm-Message-State: ALoCoQn+eLwfHhG9ri7DKr45GUtWh6rjQRO6HvdVwOlbNcoqTmdkfn+YJh76yzDfgnNuIo9Jdy6/
Received-SPF: pass client-ip=209.85.214.176; envelope-from=jpinner@twitter.com; helo=mail-ob0-f176.google.com
X-W3C-Hub-Spam-Status: No, score=-3.9
X-W3C-Hub-Spam-Report: AWL=-3.100, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001
X-W3C-Scan-Sig: maggie.w3.org 1UYMgW-0001cI-KD d2660635515bfdc09e7d80b16aa17ec9
X-Original-To: ietf-http-wg@w3.org
Subject: Re: Design Issue: Merge RST_STREAM and GOAWAY into a single ERROR frame type
Archived-At: <http://www.w3.org/mid/CA+pLO_gWErCMv+j3pcmy+cTkt-hh2v6a7neeyDtg7HRN3x=Sgw@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/17811
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>

IIRC, when this was brought up at the last F2F the rational for NOT doing
this was that frame types were cheaper than flags (256 frame types, 8
flags).

That being said I think we should consider combining them :)


On Fri, May 3, 2013 at 1:04 PM, James M Snell <jasnell@gmail.com> wrote:

> As a simplification, I'd like to suggest that we merge the RST_STREAM
> and GOAWAY frames into a single ERROR frame with the following
> definition:
>
>  0                   1                   2                   3
>  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
> |                      Error Code (32)                          |
> +---------------------------------------------------------------+
> |X|                  Last-Stream-ID (31)                        |
> +-+-------------------------------------------------------------+
>
> (note that this flips the field order from the GOAWAY frame)
>
> A frame-specific GOAWAY flag bit (0x2) would be defined for the frame,
> and the Last-Stream-ID field would only be included in the frame data
> if this flag was set.
>
> This does a couple of things for us:
>
> 1. It simplifies the error handling and reduces the number of core frame
> types.
> 2. It allows us to terminate a stream and terminate the session in a
> single frame if necessary
> 3. It gives us a way of reporting non-terminal session errors
> (currently RST_STREAM is forbidden to use stream id #0 and GOAWAY is
> always terminal).
>
>