Re: HTTP/2 Server Push and solid compression

Kari Hurtta <hurtta-ietf@elmme-mailer.org> Mon, 01 July 2019 06:44 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 BE4D9120018 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 30 Jun 2019 23:44:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.651
X-Spam-Level:
X-Spam-Status: No, score=-2.651 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
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 WN_J4P6B1W3f for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Sun, 30 Jun 2019 23:44:41 -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 85D6512000F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Sun, 30 Jun 2019 23:44:41 -0700 (PDT)
Received: from lists by frink.w3.org with local (Exim 4.89) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1hhq0w-0005aS-UH for ietf-http-wg-dist@listhub.w3.org; Mon, 01 Jul 2019 06:42:10 +0000
Resent-Date: Mon, 01 Jul 2019 06:42:10 +0000
Resent-Message-Id: <E1hhq0w-0005aS-UH@frink.w3.org>
Received: from mimas.w3.org ([2603:400a:ffff:804:801e:34:0:4f]) by frink.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <khurtta@welho.com>) id 1hhq0v-0005Zd-CP for ietf-http-wg@listhub.w3.org; Mon, 01 Jul 2019 06:42:09 +0000
Received: from welho-filter2.welho.com ([83.102.41.24]) by mimas.w3.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from <khurtta@welho.com>) id 1hhq0t-0004I4-C4 for ietf-http-wg@w3.org; Mon, 01 Jul 2019 06:42:09 +0000
Received: from localhost (localhost [127.0.0.1]) by welho-filter2.welho.com (Postfix) with ESMTP id 1AAE4C3F2E; Mon, 1 Jul 2019 09:41:44 +0300 (EEST)
X-Virus-Scanned: Debian amavisd-new at pp.htv.fi
Received: from welho-smtp3.welho.com ([IPv6:::ffff:83.102.41.86]) by localhost (welho-filter2.welho.com [::ffff:83.102.41.24]) (amavisd-new, port 10024) with ESMTP id 8F4OaX3zplRe; Mon, 1 Jul 2019 09:41:43 +0300 (EEST)
Received: from kasvihuone.keh.iki.fi (89-27-39-95.bb.dnainternet.fi [89.27.39.95]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by welho-smtp3.welho.com (Postfix) with ESMTPS id CBA1D2308; Mon, 1 Jul 2019 09:41:36 +0300 (EEST)
In-Reply-To: <20190523043127.2FCBEC3F35@welho-filter2.welho.com>
References: <65908183-BFD4-447D-9F03-E4EB9EB6E0EE@felipegasper.com> <20190523043127.2FCBEC3F35@welho-filter2.welho.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Date: Mon, 01 Jul 2019 09:41:36 +0300
From: Kari Hurtta <hurtta-ietf@elmme-mailer.org>
CC: Felipe Gasper <felipe@felipegasper.com>, Alan Egerton <eggyal@gmail.com>, Kari Hurtta <hurtta-ietf@elmme-mailer.org>
X-Mailer: ELM [version ME+ 2.5 PLalpha50a]
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="UTF-8"
Message-Id: <20190701064144.1AAE4C3F2E@welho-filter2.welho.com>
Received-SPF: none client-ip=83.102.41.24; envelope-from=khurtta@welho.com; helo=welho-filter2.welho.com
X-W3C-Hub-Spam-Status: No, score=-4.6
X-W3C-Hub-Spam-Report: AWL=1.032, BAYES_00=-1.9, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_NONE=0.001, W3C_AA=-1, W3C_IRA=-1, W3C_WL=-1
X-W3C-Scan-Sig: mimas.w3.org 1hhq0t-0004I4-C4 4b1b38f6d5e88e95dd7b9c9519ad94c9
X-Original-To: ietf-http-wg@w3.org
Subject: Re: HTTP/2 Server Push and solid compression
Archived-At: <https://www.w3.org/mid/20190701064144.1AAE4C3F2E@welho-filter2.welho.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/36737
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>

https://lists.w3.org/Archives/Public/ietf-http-wg/2019AprJun/0175.html

> > Possibly … does h2 multiplexing use a separate compression context for each stream, or does it 
> > funnel each message through the same context?
> 
> HPACK (Header Compression for HTTP/2) uses one context for all streams.
> 
> This is processed when HEADERS or CONTINUATION frame is received. HEADERS frame is also used when
> stream is opened.
> 
> Frames on HTTP/2 are processed sequentially because it is transported over TCP. So there is
> no problem with out of order access of header compression context.


Similar compressed frame is possible for http responses, when

• compression context is selected by application
• compression is done by http stack just before response frame
  is written to tcp socket (this means that compresion can
  not done in advance, but after http priority selection;
  this means delay to socket write) ; http stack may 
  sill select to not use compression even when application
  is selected compression context for response
• decompression is done when compressed frame is read from
  TCP sockect, similar than header compresison is decoded
  when HEADERS frame is read from sockect. Therefore there
  is no problem with out of order access for selected
  compression context.

• decompression must be done also for discarded streams (this
  is similar than HEADERS frame processing) because compression
  context must be updated.

• application is resposible to register compression context
  for http stack and tell if respponse uses compression context
  and give compression context. It is only safe to use 
  compression context for static responses (mostly
  http push responses) which does not depend request context.
• compressed reponse frame includes compression context id
• natutarally there need frames from allocation and deallocation
  of compression. http stack passes these to other end when
  application registeres and deresiters compression context
  for responses from http stack

• compression method must allow explicit compression context
  and mixing responses from different responses that way 
  that compressed frame produces always part of response data
  for just for one http response even when sama compression
  context is used for several responses (probably for http
  pushes from same stream).


I'n not sure that this is usefull, but it looks that
this is possible to specify.

That does not work for QUIC or HTTP/3.

/ Kari Hurtta