Re: delta encoding and state management

"Adrien W. de Croy" <adrien@qbik.com> Thu, 17 January 2013 21:53 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 68A2321F8937 for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 17 Jan 2013 13:53:47 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -8.848
X-Spam-Level:
X-Spam-Status: No, score=-8.848 tagged_above=-999 required=5 tests=[AWL=1.750, BAYES_00=-2.599, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WS1DCP-c-XCf for <ietfarch-httpbisa-archive-bis2Juki@ietfa.amsl.com>; Thu, 17 Jan 2013 13:53:46 -0800 (PST)
Received: from frink.w3.org (frink.w3.org [128.30.52.56]) by ietfa.amsl.com (Postfix) with ESMTP id 8AA4321F892F for <httpbisa-archive-bis2Juki@lists.ietf.org>; Thu, 17 Jan 2013 13:53:46 -0800 (PST)
Received: from lists by frink.w3.org with local (Exim 4.72) (envelope-from <ietf-http-wg-request@listhub.w3.org>) id 1TvxOi-00040E-J6 for ietf-http-wg-dist@listhub.w3.org; Thu, 17 Jan 2013 21:53:20 +0000
Resent-Date: Thu, 17 Jan 2013 21:53:20 +0000
Resent-Message-Id: <E1TvxOi-00040E-J6@frink.w3.org>
Received: from lisa.w3.org ([128.30.52.41]) by frink.w3.org with esmtp (Exim 4.72) (envelope-from <adrien@qbik.com>) id 1TvxOe-0003yw-Jr for ietf-http-wg@listhub.w3.org; Thu, 17 Jan 2013 21:53:16 +0000
Received: from smtp.qbik.com ([210.55.214.35]) by lisa.w3.org with esmtp (Exim 4.72) (envelope-from <adrien@qbik.com>) id 1TvxOc-0006FB-LO for ietf-http-wg@w3.org; Thu, 17 Jan 2013 21:53:16 +0000
Received: From [192.168.0.10] (unverified [192.168.0.10]) by SMTP Server [192.168.0.1] (WinGate SMTP Receiver v7.5.0 (Build 3481)) with SMTP id <0019471600@smtp.qbik.com>; Fri, 18 Jan 2013 10:54:22 +1300
From: "Adrien W. de Croy" <adrien@qbik.com>
To: James M Snell <jasnell@gmail.com>, Roberto Peon <grmocg@gmail.com>
Cc: "ietf-http-wg@w3.org" <ietf-http-wg@w3.org>
Date: Thu, 17 Jan 2013 21:52:27 +0000
Content-Type: multipart/alternative; boundary="------=_MBAA0B40D0-46F3-4770-BB4D-6AC0EA0F3C6B"
In-Reply-To: <CABP7RbcDRpfwfTOGS_aNjG4LtWkabvrGYcfwKqajT3hGKzBO6Q@mail.gmail.com>
Message-Id: <em0208300b-c5e7-440d-8491-bb799b0a896e@bombed>
Mime-Version: 1.0
Reply-To: "Adrien W. de Croy" <adrien@qbik.com>
User-Agent: eM_Client/5.0.17263.0
Received-SPF: pass client-ip=210.55.214.35; envelope-from=adrien@qbik.com; helo=smtp.qbik.com
X-W3C-Hub-Spam-Status: No, score=-3.5
X-W3C-Hub-Spam-Report: AWL=-3.449, HTML_MESSAGE=0.001, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001
X-W3C-Scan-Sig: lisa.w3.org 1TvxOc-0006FB-LO 66a14a923a30618f093b2b9bb21436ad
X-Original-To: ietf-http-wg@w3.org
Subject: Re: delta encoding and state management
Archived-At: <http://www.w3.org/mid/em0208300b-c5e7-440d-8491-bb799b0a896e@bombed>
Resent-From: ietf-http-wg@w3.org
X-Mailing-List: <ietf-http-wg@w3.org> archive/latest/15979
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>


------ Original Message ------
From: "James M Snell" <jasnell@gmail.com>


>>>Let's assume that the connection between B and C dies before that 
>>>second request is sent to B, causing the compression context shared 
>>>between B and C to be reset and lost. Suddenly the delta encoding in 
>>>the second message becomes invalid, even though nothing has 
>>>interrupted the connection between A and B.
>>>
>>>B and C need to have some way of reestablishing the compression 
>>>context after their connection is reestablished or the second message 
>>>just becomes nonsense.
>>>
>>>At first review, there appear to be a few options:
>>>
>>>1. B has to also maintain it's own copy of the complete header value 
>>>table, which could consume quite a bit of storage space on the proxy 
>>>(relative to current requirements). Once the connection is 
>>>re-established, B would then translate the delta-encoding in the 
>>>second message to initialize the reconstructed context on C. We 
>>>currently do not have any metrics on just how large this table could 
>>>potentially become within the course of a single session.
>>>
>>
>>Well, current requirements are either no compression (HTTP/1), or use 
>>a encoder-defined amount of memory at the decoder (gzip in SPDY).
>>The idea here with delta is to give the decoder more keys to the 
>>castle-- the decoder (not the encoder!) dictates how much state it is 
>>willing to maintain and the encoder must stick within that. It 
>>wouldn't be too hard to bolt this onto any compression scheme, 
>>probably.
>>
>>As an encoder, you always have the option of using no state for 
>>encoding, so all the other side can dictate is the maximum state you 
>>can use.
>>
>>-=R
>>
>>>2. B needs to notify A that the compression context needs to be 
>>>reset. If A gets that message before is constructs the second 
>>>message, all is fine, A would just treat it like the initial 
>>>response. If A already in the process of sending that message to B, B 
>>>is going to have to reject it or put it on hold until the context is 
>>>reconstructed... in which case B is going to need some way of knowing 
>>>whether the message needs to be rejected. Also, there is a risk of 
>>>too many reset messages being sent, causing a lot of churn.
>>>
>>>3. B assigns a compression buffer window size of 0, effectively 
>>>disabling the stored compression context (every message effectively 
>>>becomes an initial message). The risk here is that a proxy might 
>>>defensively always send a 0.
>>>
>>>My questions to the group are:
>>>
>>>A. Am I missing anything obvious here?

why not just get B to tell A that C went down.

Push the problem back to the client is the obvious boot-strap option.  
It already has all the data.

Adrien


>>>B. Are there other possible options?
>>>C. Which option seems to be the least painful?
>>>
>>>- James
>>>
>>
>