Compression dictionary issues for broader discussion

Patrick Meenan <patmeenan@gmail.com> Thu, 18 April 2024 13:24 UTC

Return-Path: <ietf-http-wg-request+bounce-httpbisa-archive-bis2juki=ietf.org@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 E6985C14F61B for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 18 Apr 2024 06:24:51 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -7.851
X-Spam-Level:
X-Spam-Status: No, score=-7.851 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.248, HTML_MESSAGE=0.001, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_HI=-5, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (2048-bit key) header.d=w3.org header.b="llyHNSsw"; dkim=pass (2048-bit key) header.d=w3.org header.b="JG2GtXdv"; dkim=pass (2048-bit key) header.d=gmail.com header.b="IB5Y0bQ6"
Received: from mail.ietf.org ([50.223.129.194]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id GUutaRviAX1x for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 18 Apr 2024 06:24:51 -0700 (PDT)
Received: from mab.w3.org (mab.w3.org [IPv6:2600:1f18:7d7a:2700:d091:4b25:8566:8113]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 279D6C14F68F for <httpbisa-archive-bis2Juki@ietf.org>; Thu, 18 Apr 2024 06:24:51 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Subject:Content-Type:To:Message-ID:Date:From:MIME-Version:Cc:Reply-To :In-Reply-To:References; bh=jqVApPEOoh9saB8Y0z7F7GULjNcKxcAb8+SCqx9svvM=; b=l lyHNSswDzbXu5cFpBETMhzSTnDOYR3Suoa+Hg18KJh/msI9ncEutHblVtl8HBjvTZkPDdMaB7yRct Qu6cD7xyATC3JVTPGd3C5I3W0/wcku3MYEuAvhF0T/1Uj82aMegh6MVDT7fyugBQmq/7hf6N4+EzK QfTexVern61U9tAk2oxCF/w53Q5/bdSPTlnPri80JBNGeOi1gemLBccRkJ10S03PT8UpsjlollfmN jmhBFy/sN+gBCHWiHXO8RcynxLq4GFgldyQXyRndT0/7ku/LUxDyxJv/hO9VUKJtsAb+OedZ8k4U5 r9ODHe136ZgkqoLKCGklOUar4odoD6mWQ==;
Received: from lists by mab.w3.org with local (Exim 4.96) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1rxRk0-004n8r-1K for ietf-http-wg-dist@listhub.w3.org; Thu, 18 Apr 2024 13:23:52 +0000
Resent-Date: Thu, 18 Apr 2024 13:23:52 +0000
Resent-Message-Id: <E1rxRk0-004n8r-1K@mab.w3.org>
Received: from ip-10-0-0-224.ec2.internal ([10.0.0.224] helo=puck.w3.org) by mab.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from <patmeenan@gmail.com>) id 1rxRjx-004n7v-1w for ietf-http-wg@listhub.w3.internal; Thu, 18 Apr 2024 13:23:49 +0000
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=w3.org; s=s1; h=Content-Type:To:Subject:Message-ID:Date:From:MIME-Version:Cc:Reply-To :In-Reply-To:References; bh=jqVApPEOoh9saB8Y0z7F7GULjNcKxcAb8+SCqx9svvM=; t=1713446629; x=1714310629; b=JG2GtXdvTFA59nHDkKi63BqPzTI+ryfGrTegrYm+N6UmaXp ycJHuvB+a6Rn9Nif3L9DfWwmLVg6byPQZ5HvMwfotyelHuwHNCDFtIjDpULBXBQUG0MNiGsk2gEuy uN27fQdesf01Dp9zYQks7yOSQwSNOMDcBEsDgVrpEvj/6S85QgKrIFkjz/zaHASm2FwJF0calFDzA eTt1Txk1+KDSONuJRrhnwOcO2XBO9KLMOz2MkkZ5TgKwpaHIaRUiSRncop+ovisEqiTOeQ095orb4 CLgjyotyjt5PE6SwRmS95FxIAGjQofqnzBOWjjO/Z9cI8x/TnPeSgJ1RHbungB4A==;
Received-SPF: pass (puck.w3.org: domain of gmail.com designates 2a00:1450:4864:20::52d as permitted sender) client-ip=2a00:1450:4864:20::52d; envelope-from=patmeenan@gmail.com; helo=mail-ed1-x52d.google.com;
Received: from mail-ed1-x52d.google.com ([2a00:1450:4864:20::52d]) by puck.w3.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from <patmeenan@gmail.com>) id 1rxRjw-005TPi-2r for ietf-http-wg@w3.org; Thu, 18 Apr 2024 13:23:49 +0000
Received: by mail-ed1-x52d.google.com with SMTP id 4fb4d7f45d1cf-571bddddbc2so489543a12.1 for <ietf-http-wg@w3.org>; Thu, 18 Apr 2024 06:23:48 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1713446624; x=1714051424; darn=w3.org; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=jqVApPEOoh9saB8Y0z7F7GULjNcKxcAb8+SCqx9svvM=; b=IB5Y0bQ6IK8uYHwjK4xNmUAFEz2ZD6a+AnNvbq2MX2ZV5Ws8YV4KjUeeGEj3TXrGBm liTZSXikj7JiNXGwM1XEWiS3n4WcwvUAmigQeYGZchsQ3Gw5UDlhH90kphrXOcTLG6K3 HWUIdaBkDDjvE+8T9tVzUoCgowA+sFjVMI5HagkfA26hq79/q8NV7fwTSSRLNTshdLCe tYkenVOhFrBx9eOtTQK0CHxASwaD1xu+Mw08X8szcRoZxcxrc5kqgv8Rh80jF94IvE21 RMdBrKYqTkIX30La1fI2ydyb/K3mdHb8MWXU7W5awn8UatjsbSX74JYLem7811AlMMUp 5jrA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713446624; x=1714051424; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=jqVApPEOoh9saB8Y0z7F7GULjNcKxcAb8+SCqx9svvM=; b=uO6n4sfge49cNei6NPhS+vIUMYufXkJK9eY+YHFJvX9C1FzTSmSxv0o2+bTr7adgqQ BpVQke874zGYQHb1Ltf2rqnX0ZNDnsz4/PUfPo0Ut4fAFYjmAtDuerG+v0f9MMhvfElL OaWML012wD6xPYw2DTH8FB8WtPVg8gmv+p1X5BYFFfRaScQdDrivrqH+B/NcFzi+EPuq XNq/LhsAvnzL7koaRoXX+vggt0dO/akuQ8khfT3OBFGw5LeQ+qCVIj7Mxot8XOLpDwBX 8G52XVRX/LoU6gpMJ1Tqjcx/Zbx+sUma0xu8nHU5lJ9MzXMG+Wne09HJ+/P7MxDln4LI HrfQ==
X-Gm-Message-State: AOJu0Yx2SYekyd7OLRP2uFTQv78++MJHzFDXQE8th5i35pMIvAyaPTX4 f7nY6qmBmHNoL7KELZq+dmQ1WkhVSITQaohcmr0TY6hIf5GwQS1AI6nAVRGzRKhRNYWMr7kPpcn P4bEyZLrltWppYurOqtMAtYHNuFoVXueD1DA=
X-Google-Smtp-Source: AGHT+IEcgl6H7uI7+PuqOn8N5SDD4YatTtT4b6vAMMml7w5be6xa6uyBP1Mpfe+ZrGlz5iM2UCidaex/dR2YdC5N6vE=
X-Received: by 2002:a50:cc8d:0:b0:56e:dc5:e99 with SMTP id q13-20020a50cc8d000000b0056e0dc50e99mr1676341edi.24.1713446624328; Thu, 18 Apr 2024 06:23:44 -0700 (PDT)
MIME-Version: 1.0
From: Patrick Meenan <patmeenan@gmail.com>
Date: Thu, 18 Apr 2024 09:23:32 -0400
Message-ID: <CAJV+MGwxomC4ez5cfw=1ojZK_h84+TrfU62e-gED6owT5vytkg@mail.gmail.com>
To: HTTP Working Group <ietf-http-wg@w3.org>
Content-Type: multipart/alternative; boundary="0000000000006287f906165ee1b4"
X-W3C-Hub-DKIM-Status: validation passed: (address=patmeenan@gmail.com domain=gmail.com), signature is good
X-W3C-Hub-Spam-Status: No, score=-5.1
X-W3C-Hub-Spam-Report: BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, DMARC_PASS=-0.001, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_ZEN_BLOCKED_OPENDNS=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, W3C_AA=-1, W3C_DB=-1, W3C_WL=-1
X-W3C-Scan-Sig: puck.w3.org 1rxRjw-005TPi-2r 4633fb44356ea75ff1f2827585a00218
X-Original-To: ietf-http-wg@w3.org
Subject: Compression dictionary issues for broader discussion
Archived-At: <https://www.w3.org/mid/CAJV+MGwxomC4ez5cfw=1ojZK_h84+TrfU62e-gED6owT5vytkg@mail.gmail.com>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/51925
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/email/>
List-Post: <mailto:ietf-http-wg@w3.org>
List-Unsubscribe: <mailto:ietf-http-wg-request@w3.org?subject=unsubscribe>

We're making good progress on the compression dictionary encoding (thank
you to everyone for your help). There are 5 issues in-flight right now that
I wanted to bring to the attention of the wider group:


1. Include the dictionary hash in the response stream:
https://github.com/httpwg/http-extensions/issues/2770

Currently the hash used to compress a resource is communicated through the
Content-Dictionary response header which is potentially fragile. There is
discussion about creating a stream encoding that has a header before the
raw brotli/Zstandard stream with the dictionary hash (and potentially a
magic signature).


2. Pick one compression algorithm:
https://github.com/httpwg/http-extensions/issues/2756

There is some concern that shipping both brotli and Zstandard will fragment
the ecosystem and require all clients to implement both algorithms (or
servers to support both if some clients do not).


3. Zstandard compression window:
https://github.com/httpwg/http-extensions/issues/2754

Zstandard can only use the dictionary until the input passes the size of
the compression window (brotli has it available independent of the
compression window). There is discussion about what an appropriate window
size to use would be to allow clients to control their memory use while
still allowing for large delta-compression cases. Current discussion is
around setting it to the larger of 8 MB and 1.25x the dictionary size.


4. Link relation: https://github.com/httpwg/http-extensions/issues/2772

We need to add the definition for the link relation for compression
dictionaries (i.e. the HTML case where a separate dictionary should be
fetched for future requests). The current Chrome origin trial uses
"dictionary" but that is a bit too generic to use up for this use case.
"compression-dictionary" is appropriate but might be a bit long to include
in a header.


5. Hash format in HTTP Headers:
https://github.com/httpwg/http-extensions/issues/2781

There is some discussion of how the dictionary hashes should be represented
in HTTP headers. The main tension is between developer-friendliness of the
original hex encoding and the shorter (and more correct) sf-binary
representation.