Re: [hybi] [Compression] Parameter to suppress client-side compression

Jamie Lokier <jamie@shareable.org> Thu, 29 November 2012 10:32 UTC

Return-Path: <jamie@shareable.org>
X-Original-To: hybi@ietfa.amsl.com
Delivered-To: hybi@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 0BDCD21F8A45 for <hybi@ietfa.amsl.com>; Thu, 29 Nov 2012 02:32:26 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -5.108
X-Spam-Level:
X-Spam-Status: No, score=-5.108 tagged_above=-999 required=5 tests=[AWL=-2.824, BAYES_00=-2.599, SARE_MILLIONSOF=0.315]
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 Y8Ot2xqXjU6w for <hybi@ietfa.amsl.com>; Thu, 29 Nov 2012 02:32:25 -0800 (PST)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by ietfa.amsl.com (Postfix) with ESMTP id 8355D21F89F3 for <hybi@ietf.org>; Thu, 29 Nov 2012 02:32:21 -0800 (PST)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1Te1Pn-0004p0-V4; Thu, 29 Nov 2012 10:32:19 +0000
Date: Thu, 29 Nov 2012 10:32:19 +0000
From: Jamie Lokier <jamie@shareable.org>
To: Takeshi Yoshino <tyoshino@google.com>
Message-ID: <20121129103219.GB17793@jl-vm1.vm.bytemark.co.uk>
References: <CAH9hSJborxphfc9o+RxusV7QkWxK_nGRFC1f-yM4a3Tre3f3nQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <CAH9hSJborxphfc9o+RxusV7QkWxK_nGRFC1f-yM4a3Tre3f3nQ@mail.gmail.com>
User-Agent: Mutt/1.5.21 (2010-09-15)
Cc: hybi@ietf.org
Subject: Re: [hybi] [Compression] Parameter to suppress client-side compression
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/hybi>, <mailto:hybi-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/hybi>
List-Post: <mailto:hybi@ietf.org>
List-Help: <mailto:hybi-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/hybi>, <mailto:hybi-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 29 Nov 2012 10:32:26 -0000

Takeshi Yoshino wrote:
>    Forwarding an off-list request I got on compression spec.
>    The proposal is adding a server->client parameter to suppress
>    compression on client->server data. It might be useful for applications
>    where client->server data is not worth being compressed.
>    Once we add some interface on WebSocket object to turn on/off
>    compression on outgoing data as planned, it'll be less necessary.
>    Thanks
>    Takeshi

Where the server is supporting 100ks or millions of low-throughput
mostly-idle connections per server, it seems useful to disable
client->server compression for short messages to avoid the memory
overhead of having to receive and decompress them at the server.

This applies especially to keepalives, which are sometimes the
dominant traffic by far.

At the same time, when there is something more interesting and longer
to transmit, then it may be useful to compress it.  (Server can
allocate memory as needed, or even offload to another server if there
is a burst of activity on too many connections at once.)

So I can see an obscure use case for giving the client JS the option
to control this per message, or to set a message size threshold, or to
leave it set to automatic.  But it seems like a niche situation and
there are other strategies such as using multiple WebSockets in
parallel and/or writing a compressor in Javascript.

-- Jamie