Re: [hybi] Multiple connections serialization and proxies

"Thomson, Martin" <Martin.Thomson@andrew.com> Thu, 22 April 2010 22:47 UTC

Return-Path: <Martin.Thomson@andrew.com>
X-Original-To: hybi@core3.amsl.com
Delivered-To: hybi@core3.amsl.com
Received: from localhost (localhost [127.0.0.1]) by core3.amsl.com (Postfix) with ESMTP id 61C673A694A for <hybi@core3.amsl.com>; Thu, 22 Apr 2010 15:47:59 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.657
X-Spam-Level:
X-Spam-Status: No, score=-0.657 tagged_above=-999 required=5 tests=[AWL=-0.658, BAYES_50=0.001]
Received: from mail.ietf.org ([64.170.98.32]) by localhost (core3.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id qkfrOlTte+Mt for <hybi@core3.amsl.com>; Thu, 22 Apr 2010 15:47:58 -0700 (PDT)
Received: from csmailgw1.commscope.com (csmailgw1.commscope.com [198.135.207.244]) by core3.amsl.com (Postfix) with ESMTP id 62E7F3A6908 for <hybi@ietf.org>; Thu, 22 Apr 2010 15:47:57 -0700 (PDT)
Received: from [10.86.20.102] ([10.86.20.102]:59408 "EHLO ACDCE7HC1.commscope.com") by csmailgw1.commscope.com with ESMTP id S18876202Ab0DVWrr (ORCPT <rfc822; hybi@ietf.org>); Thu, 22 Apr 2010 17:47:47 -0500
Received: from SISPE7HC2.commscope.com (10.97.4.13) by ACDCE7HC1.commscope.com (10.86.20.102) with Microsoft SMTP Server (TLS) id 8.1.436.0; Thu, 22 Apr 2010 17:47:46 -0500
Received: from SISPE7MB1.commscope.com ([fe80::9d82:a492:85e3:a293]) by SISPE7HC2.commscope.com ([fe80::58c3:2447:f977:57c3%10]) with mapi; Fri, 23 Apr 2010 06:47:44 +0800
From: "Thomson, Martin" <Martin.Thomson@andrew.com>
To: Christian Biesinger <cbiesinger@gmail.com>, Wellington Fernando de Macedo <wfernandom2004@gmail.com>, Greg Wilkins <gregw@webtide.com>
Date: Fri, 23 Apr 2010 06:49:12 +0800
Thread-Topic: [hybi] Multiple connections serialization and proxies
Thread-Index: AcriUv9hDwJzeBI0S5+igUdk99/fKgAGSwjg
Message-ID: <8B0A9FCBB9832F43971E38010638454F03E7D06DF7@SISPE7MB1.commscope.com>
References: <4BCF4932.8040303@gmail.com> <4BD09A2C.6060506@gmail.com> <x2n557ae281004221224i2a9a46c0k6f6f684c94de255c@mail.gmail.com>
In-Reply-To: <x2n557ae281004221224i2a9a46c0k6f6f684c94de255c@mail.gmail.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64
MIME-Version: 1.0
X-BCN: Meridius 1000 Version 3.4 on csmailgw1.commscope.com
X-BCN-Sender: Martin.Thomson@andrew.com
Cc: "hybi@ietf.org" <hybi@ietf.org>
Subject: Re: [hybi] Multiple connections serialization and proxies
X-BeenThere: hybi@ietf.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: Server-Initiated HTTP <hybi.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/listinfo/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, 22 Apr 2010 22:47:59 -0000

This raises a point that needs to be highlighted, particularly for the BWTP on WS proposal:

If connections are identified purely by the domain name of the host, and re-used based solely on that name, then no other state can be accumulated against that connection.

This includes the sub-protocol details, any state like common headers (BWTP uses channels to isolate this, so it might be OK), and all application-layer state tied to the connection.

The only state that can be established is that that could be considered invariant for the life of the connection and it's many (potential) uses.

For instance,

App A establishes WS connection to example.com with sub-protocol foo.

App B requests WS connection to example.com also, but with sub-protocol bar.  It cannot signal this sub-protocol use to example.com if it re-uses the connection established by App A.

Similarly, if App A establishes state on the connection (for example, using one of the BWTP channel headers), then this state could interfere with state that B attempts to establish:

App A logs in and sets the user name to 'alice'.  App B logs in and sets the user name to 'bob'.  Are requests that follow authorized based on alice's permissions, or bob's?

Keep in mind that applications will assume that this 'connection' is theirs to use.  In many cases, the connection will be dedicated, and will persist, so how will the proverbial 'inexpert' server developer know how to cope with an unexplained error like this?

This is made even worse if an intermediary attempts (legitimately) to multiplex streams...

--Martin


> -----Original Message-----
> From: hybi-bounces@ietf.org [mailto:hybi-bounces@ietf.org] On Behalf Of
> Christian Biesinger
> Sent: Friday, 23 April 2010 5:24 AM
> To: Wellington Fernando de Macedo
> Cc: hybi@ietf.org
> Subject: Re: [hybi] Multiple connections serialization and proxies
> 
> Note that if you want websockets to be similar to HTTP, it should
> always use host names instead of IP addresses for connection limits.
> At least Firefox uses hostnames for HTTP's limit, I'm not quite sure
> on the other browsers.
> 
> -christian
> 
> On Thu, Apr 22, 2010 at 8:49 PM, Wellington Fernando de Macedo
> <wfernandom2004@gmail.com> wrote:
> > Hi again,
> >
> > We (Ian, Christian Biesinger and me) have talked about this issue.
> We've
> > decided that, when under proxies, Mozilla's implementation will
> serialize
> > the connections using the host names.
> >
> > Ian, can you update the spec accordingly, please?
> >
> > Wellington.
> >
> > Em 21/4/2010 15:51, Wellington Fernando de Macedo escreveu:
> >
> > Hi,
> >
> > A question has been raised in the Mozilla implementation. The spec
> states:
> >
> >    1.   If the user agent already has a WebSocket connection to the
> >         remote host (IP address) identified by /host/, even if known
> by
> >         another name, wait until that connection has been established
> or
> >         for that connection to have failed.
> >
> > However, when the WS is under proxies, we can't leak the host names
> to the
> > DNS server. In this case, what should be done? I think the spec
> should
> > clarify this.
> >
> > Wellington.
> >
> >
> > _______________________________________________
> > hybi mailing list
> > hybi@ietf.org
> > https://www.ietf.org/mailman/listinfo/hybi
> >
> >
> _______________________________________________
> hybi mailing list
> hybi@ietf.org
> https://www.ietf.org/mailman/listinfo/hybi