Re: [hybi] Simplify WebSocket multiplexing

Tobias Oberstein <tobias.oberstein@tavendo.de> Thu, 30 May 2013 10:11 UTC

Return-Path: <tobias.oberstein@tavendo.de>
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 EA98F21F9473 for <hybi@ietfa.amsl.com>; Thu, 30 May 2013 03:11:41 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.452
X-Spam-Level:
X-Spam-Status: No, score=-1.452 tagged_above=-999 required=5 tests=[AWL=1.147, BAYES_00=-2.599]
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 H4ckGaElQxSu for <hybi@ietfa.amsl.com>; Thu, 30 May 2013 03:11:36 -0700 (PDT)
Received: from EXHUB020-1.exch020.serverdata.net (exhub020-1.exch020.serverdata.net [206.225.164.28]) by ietfa.amsl.com (Postfix) with ESMTP id AED7621F91B8 for <hybi@ietf.org>; Thu, 30 May 2013 03:11:36 -0700 (PDT)
Received: from EXVMBX020-12.exch020.serverdata.net ([169.254.3.90]) by EXHUB020-1.exch020.serverdata.net ([206.225.164.28]) with mapi; Thu, 30 May 2013 03:11:35 -0700
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
To: Takeshi Yoshino <tyoshino@google.com>, "hybi@ietf.org" <hybi@ietf.org>
Date: Thu, 30 May 2013 03:11:38 -0700
Thread-Topic: [hybi] Simplify WebSocket multiplexing
Thread-Index: Ac5dBbQ3WPmIwuLHQzqzW2cnu7PaEQACnkhQ
Message-ID: <634914A010D0B943A035D226786325D4422DA06B10@EXVMBX020-12.exch020.serverdata.net>
References: <CAH9hSJaUnFRve-JMUm1pzdxreHsd5R13gUa0s9_S2u1t6Y87rQ@mail.gmail.com>
In-Reply-To: <CAH9hSJaUnFRve-JMUm1pzdxreHsd5R13gUa0s9_S2u1t6Y87rQ@mail.gmail.com>
Accept-Language: de-DE, en-US
Content-Language: de-DE
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: de-DE, en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [hybi] Simplify WebSocket multiplexing
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, 30 May 2013 10:11:42 -0000

>I'd like to hear your opinion on this in this separate thread. Below listed some points we could drop/simplify including >both ones suggested in the thread and some I came up with now.
>
>1) Header delta encoding in AddChannelRequest
>2) Header delta encoding in AddChannelResponse
>3) Channel slot
>4) Only one mux control in one message
>5) Use the length encoding for encoding mux channel ID
>6) Drop flow control
>
>My opinion is to do 1, 2 and 4.

+1 for dropping: 1, 2, 4

rgd. 5: an implementation needs code for such encoding already for base WS. And it's trivial anyway. So IMHO no gain in dropping.

rgd. 3: no opinion right now .. I need to look further into the draft.

rgd. 6: without flow-control, the whole MUX effort is IMHO not worth the efforts anymore. John already said that, and I agree. 

==

However, my current thinking is this:

WS-MUX might be designed with the following features:

a) no flow-control and no priorization (QoS)
b) flow-control, but no priorization (QoS)
c) flow-control _and_ priorization (QoS)

=>

a) Not worth the effort.


b) I am still struggling with understanding the exact situations under which WS-MUX will improve things over whats possible today with stuff like shared Web workers, per-socket TCP autotuning and layer-4 load-balancers.

- An app served from a single origin can have all it's WS connections (from multiple tabs etc) shared over a single TCP using a shared Web worker approach.

- An app where all WS traffic for a given frontend can be processed at a single backend can efficiently scale-out using a layer-4 LB that distributes traffic based on consistent hash of source IP.

- An app that wants max. compatibility with network infrastructure will use WSS and hence intermediaries (other than MITM proxies) won't be able to look into the traffic anyway.

As Takeshi pointed out, there are 2 situations where above is insufficient:

i) a single app served from different origins ("widgets") => cannot use shared Web workers

ii) different apps from same vendor where the connections from the different apps need to go to different backend nodes ("services") => needs an app/service/WSMUX-aware layer-7 LB
 
Given i) and ii) "only" (are there more?), we (for our use cases) probably would have troubles justifying the efforts of doing WS-MUX ..


c)
Is this out of scope rgd WS-MUX?

Priorization/ToS: this is where we see use cases for us.

/Tobias