Re: [hybi] Call for interest: multiplexing dedicated for WebSocket
Tobias Oberstein <tobias.oberstein@tavendo.de> Thu, 30 May 2013 11:28 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 B874521F9421 for <hybi@ietfa.amsl.com>; Thu, 30 May 2013 04:28:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.298
X-Spam-Level:
X-Spam-Status: No, score=-2.298 tagged_above=-999 required=5 tests=[AWL=-0.299, BAYES_00=-2.599, J_CHICKENPOX_52=0.6]
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 WyyFNSkgzDbr for <hybi@ietfa.amsl.com>; Thu, 30 May 2013 04:28:42 -0700 (PDT)
Received: from EXHUB020-3.exch020.serverdata.net (exhub020-3.exch020.serverdata.net [206.225.164.30]) by ietfa.amsl.com (Postfix) with ESMTP id 42DCB21F9410 for <hybi@ietf.org>; Thu, 30 May 2013 04:28:39 -0700 (PDT)
Received: from [109.193.209.160] (109.193.209.160) by smtpx20.serverdata.net (206.225.164.35) with Microsoft SMTP Server (TLS) id 8.3.264.0; Thu, 30 May 2013 04:28:36 -0700
Message-ID: <51A737E6.2090707@tavendo.de>
Date: Thu, 30 May 2013 13:28:38 +0200
From: Tobias Oberstein <tobias.oberstein@tavendo.de>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6
MIME-Version: 1.0
To: Takeshi Yoshino <tyoshino@google.com>
References: <CAH9hSJZxr+aG7GZa4f-dUOTGj4bnJ+3XxivUX4jei5CMyqN4LQ@mail.gmail.com> <CAH9hSJZUG1f+3Uk=t2=A5i4O9=wPvAisspM=pgmGEH9emTL9-Q@mail.gmail.com> <CAH9hSJZai_UuxW4O6mZcEJT2DJoURtLo16XNci1qkYVWv4HVdg@mail.gmail.com> <007501ce56f0$67f74080$37e5c180$@noemax.com> <519CD6A1.7080708@ericsson.com> <519CE075.4000106@tavendo.de> <CAM5k6X9WmO80hiQZ6_GqK66PAd3of=2ZRi9=VrWj52apA1+=5g@mail.gmail.com> <519D02E7.6040009@tavendo.de> <CAM5k6X8Z-JxrgTy3NAc-wC7zK_AfsWAhqzNKaEY_yZzmz=pZcQ@mail.gmail.com> <519D2E2D.4080809@tavendo.de> <CAH9hSJZw7sLhQH6i2O9-rRKc88Bmh0EaJEcpxSB5kUKprP6YyQ@mail.gmail.com> <634914A010D0B943A035D226786325D4422C3DA775@EXVMBX020-12.exch020.serverdata.net> <CAH9hSJYms5rPSvDDNeMYoZ19UmRLJUd7YM7d98ONUkB4YZnM=Q@mail.gmail.com>
In-Reply-To: <CAH9hSJYms5rPSvDDNeMYoZ19UmRLJUd7YM7d98ONUkB4YZnM=Q@mail.gmail.com>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Call for interest: multiplexing dedicated for WebSocket
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 11:29:21 -0000
> Given above, how would the following 2 approaches compare? > > a) > - Client 1 <=> Server 1 connected with 2 TCP connections. > - TCP autotuning on both client and server OR manually set buffer > sizes: small for TCP-1, and large for TCP-2 > - First TCP _only_ carries "chatty" traffic, and second TCP carries > "mass data" traffic. > > b) > - Client 1 <=> Server 1 connected with 1 TCP connection > - TCP autotuning OR large buffers set system wide > - multiplexing done over the single TCP that carries both "chatty" > and "mass data" traffic and > - the multiplexing is further optimizing buffer size (app level) and > does priorization of traffic (chatty = high-prio, mass = low-prio): > > "Compare": I am mostly interested in the end-user experience: > > i) Is the chatty traffic still low-latency, even in the presence of > concurrent mass-data traffic? > > > a) it depends on process scheduler and network queue design of the > server and client, I think. I don't know much about per-socket buffer > autotuning, but it probably just improves memory usage and throughput > but doesn't have much effect on latency of chatty traffic? Improving memory, but not necessarily latency: yep, plausible. > > b) the endpoints need to cut mass data into smaller chunks to reserve > slots for inserting chatty traffic. e.g. if acceptable delay for chatty > traffic is x ms, set the maximum send unit of mass traffic to (current > through put) * x. > > To allow one to control the peer's message scheduling, both per-socket > buffer size and ws-mux flow control are insufficient, I think. Needs to > exchange ToS info. I now can see that flow control and priorization are somewhat orthogonal issues. Priorization and ToS is not goal of WS-MUX at all? > > ii) Is the throughput of mass-data traffic concurrently to the > chatty traffic still (nearly) as high as when only doing mass data > transfer? > > > I think minimum delay requirement for the chatty traffic determines > fragmentation on mass-data traffic regardless it's done in OS's network > stack or ws-mux code. Makes sense. The lower the latency requirement, the more fragmentation, and the less efficiency on mass data. > > >>How about having a shared Web worker in the background that > handles all messaging for the app over a single WS? > >One restriction of Web Worker is that we cannot share a worker > between webapps with different origins while WebSocket can connect > to a host different from its origin. > > Ah, right. Same origin policy. Thus, with WS-MUX, there is _more_ > potentially TCP sharing than whats possible with shared WebWorkers. > > However, for a given single app (from a single origin) running in > multiple browser tabs, the shared WebWorker seems not so bad. Works > today. No need for WS-MUX or HTTP 2.0 MUX + WS over HTTP 2.0. > > > Yes. Thanks for reminding us about shared worker approach. We haven't > evaluated it well. > > >For load balancer vendors, it's better that multiplexing is > standardized than each service provider develops its own. > > I don't have experience running G scale infrastructure. However, I'd > like to understand why LBs need to have a look into WS at all .. why > not Layer-4 LB? Doing balancing based on hash of source IP? > > > Traffic for various services would be multiplexed into one TCP. We wanna > demultiplex it and forward to designated backends. This means that > there're again lots of TCP connections between LB-backends, but we can > make any optimization there as we want. I see. So the load-balancer needs to be a layer-7 one, and not only be WS-MUX enabled, but also app/service aware? Something like this: E.g. user has 2 tabs open which (logically) connect to wss://google.com/gmail wss://google.com/gplus Both would be transported over 1 physical WS (via WS-MUX). The LB would demux traffic for logical channel wss://google.com/gmail to backend nodes of cluster "GMAIL", while it would demux traffic for wss://google.com/gplus to backend nodes of cluster "GPLUS"? > > >Basically multiplexing should be done as close to network as > possible. If it's done in application layer, for example when > compression is used, such a load balancer need to decode the > compression to see the >multiplexing information. That doesn't make > them happy. > > This seems to assume that > > - either the LB is done above layer 4 and/or > - the logical WS connections contained in the physical WS would need > to be balanced to _different_ backend nodes. > > > Yes. Sorry that we haven't told the story in our mind in detail. I think it might be helpful to add text to the MUX draft that describe the use cases WS-MUX addresses and how it improves thing over alternatives. Motivation is always good and helps by providing context and examples. /Tobias
- [hybi] Call for interest: multiplexing dedicated … Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Simone Bordet
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Bruce Atherton
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Arman Djusupov
- Re: [hybi] Call for interest: multiplexing dedica… Salvatore Loreto
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Salvatore Loreto
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Joakim Erdfelt
- Re: [hybi] Call for interest: multiplexing dedica… John A. Tamplin
- Re: [hybi] Call for interest: multiplexing dedica… Simone Bordet
- Re: [hybi] Call for interest: multiplexing dedica… Zhong Yu
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… John A. Tamplin
- Re: [hybi] Call for interest: multiplexing dedica… Zhong Yu
- Re: [hybi] Call for interest: multiplexing dedica… Bruce Atherton
- Re: [hybi] Call for interest: multiplexing dedica… Simone Bordet
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Zhong Yu
- Re: [hybi] Call for interest: multiplexing dedica… Arman Djusupov
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Simone Bordet
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Adam Rice
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Roberto Peon
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Roberto Peon
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Roberto Peon
- Re: [hybi] Call for interest: multiplexing dedica… Roberto Peon
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Roberto Peon
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Simone Bordet
- Re: [hybi] Call for interest: multiplexing dedica… Takeshi Yoshino
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… Adam Rice
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein
- Re: [hybi] Call for interest: multiplexing dedica… John A. Tamplin
- Re: [hybi] Call for interest: multiplexing dedica… Tobias Oberstein