Re: [hybi] Last Call: <draft-ietf-hybi-thewebsocketprotocol-10.txt> (The WebSocket protocol) to Proposed Standard

Dave Cridland <dave@cridland.net> Sun, 24 July 2011 09:35 UTC

Return-Path: <dave@cridland.net>
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 2C88F21F8A1A; Sun, 24 Jul 2011 02:35:54 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.392
X-Spam-Level:
X-Spam-Status: No, score=-2.392 tagged_above=-999 required=5 tests=[AWL=-0.093, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 FTgogsdeEhLT; Sun, 24 Jul 2011 02:35:53 -0700 (PDT)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by ietfa.amsl.com (Postfix) with ESMTP id 50F2421F88B6; Sun, 24 Jul 2011 02:35:53 -0700 (PDT)
Received: from localhost (peirce.dave.cridland.net [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 50EDC1168087; Sun, 24 Jul 2011 10:35:48 +0100 (BST)
X-Virus-Scanned: Debian amavisd-new at peirce.dave.cridland.net
Received: from peirce.dave.cridland.net ([127.0.0.1]) by localhost (peirce.dave.cridland.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id dDU7BpVS5PZQ; Sun, 24 Jul 2011 10:35:45 +0100 (BST)
Received: from puncture (puncture.dave.cridland.net [IPv6:2001:470:1f09:882:221:85ff:fe3f:1696]) by peirce.dave.cridland.net (Postfix) with ESMTPA id AA4DC1168067; Sun, 24 Jul 2011 10:35:45 +0100 (BST)
References: <CALiegfk_GLAhAf=yEe6hYw2bwtxEwg9aJN+f0Bm9he5QgsRavA@mail.gmail.com> <CAP992=Ft6NwG+rbcuWUP0npwVNHY_znHmXmznBQO_krMo3RT6g@mail.gmail.com> <CALiegfmTWMP3GhS1-k2aoHHXkUkB+eWqV=2+BufuWVR1s2Z-EA@mail.gmail.com> <20110721163910.GA16854@1wt.eu> <CAP992=FrX5VxP2o0JLNoJs8nXXba7wbZ6RN9wBUYC0ZSN_wbAg@mail.gmail.com> <9031.1311270000.588511@puncture> <CALiegf=pYzybvc7WB2QfPg6FKrhLxgzHuP-DpuuMfZYJV6Z7FQ@mail.gmail.com> <CAP992=FJymFPKcPVWrF-LkcEtNUz=Kt9L_ex+kLtjiGjL1T46w@mail.gmail.com> <4E28A51F.4020704@callenish.com> <CALiegf=4K2oWfmZjGMD7J_jyaDtS3i+Mu7R0Wh75Rr+MrQCjtw@mail.gmail.com> <20110722054345.GE18126@1wt.eu>
In-Reply-To: <20110722054345.GE18126@1wt.eu>
MIME-Version: 1.0
Message-Id: <9031.1311500145.687172@puncture>
Date: Sun, 24 Jul 2011 10:35:45 +0100
From: Dave Cridland <dave@cridland.net>
To: Willy Tarreau <w@1wt.eu>, Server-Initiated HTTP <hybi@ietf.org>, IETF-Discussion <ietf@ietf.org>, Iñaki Baz Castillo <ibc@aliax.net>
Content-Type: text/plain; delsp="yes"; charset="iso-8859-1"; format="flowed"
Content-Transfer-Encoding: 8bit
Subject: Re: [hybi] Last Call: <draft-ietf-hybi-thewebsocketprotocol-10.txt> (The WebSocket protocol) to Proposed Standard
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: Sun, 24 Jul 2011 09:35:54 -0000

On Fri Jul 22 06:43:45 2011, Willy Tarreau wrote:
> Iñaki, what we're saying is that the resolving applies first to HTTP
> well before it is WS. For instance, a client could connect to an  
> HTTP
> server, fetch a few objects, then decide to upgrade the connection  
> to
> switch to WebSocket. DNS resolving for WS would not even be involved
> here.
> 
> 
I get where you're coming from.

You're saying that you have a nebulous connection thing, that you  
pump HTTP requests down, and you may want to use that for WebSocket  
upgrade requests as well, by taking the ws URI and performing a  
simple transformation on it into an HTTP URI to make the upgrade  
request on.

So, given ws://example.com/foo/bar, you'll make the upgrade request  
on http://example.com/foo/bar

What Iñaki and I are arguing for is that for WS, there is simply one  
additional step prior to finding a suitable connection, which is  
performing an SRV lookup/selection.

And this new step can actually be performed before any of the HTTP  
connection steps. So, roughly, in order to "do" WebSocket for  
ws://example.com/foo/bar you would first do SRV lookup, which would  
give you an equivalent HTTP URI to perform the upgrade request. So  
for example, if you got:

_ws._tcp.example.com SRV 1 0 ws.example.com

You'd make the upgrade request on the HTTP URI of:

http://ws.example.com/foo/bar

Of course, if this failed to connect, you can find another HTTP URI  
to try - something you cannot do without SRV.

Dave.
-- 
Dave Cridland - mailto:dave@cridland.net - xmpp:dwd@dave.cridland.net
  - acap://acap.dave.cridland.net/byowner/user/dwd/bookmarks/
  - http://dave.cridland.net/
Infotrope Polymer - ACAP, IMAP, ESMTP, and Lemonade