Re: [hybi] DNS SRV for WebSocket

Dave Cridland <dave@cridland.net> Mon, 28 March 2011 20:52 UTC

Return-Path: <dave@cridland.net>
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 AED7728C107 for <hybi@core3.amsl.com>; Mon, 28 Mar 2011 13:52:21 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.384
X-Spam-Level:
X-Spam-Status: No, score=-2.384 tagged_above=-999 required=5 tests=[AWL=-0.085, BAYES_00=-2.599, MIME_8BIT_HEADER=0.3]
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 dj3-W+4l9hFO for <hybi@core3.amsl.com>; Mon, 28 Mar 2011 13:52:20 -0700 (PDT)
Received: from peirce.dave.cridland.net (peirce.dave.cridland.net [IPv6:2001:470:1f09:882:2e0:81ff:fe29:d16a]) by core3.amsl.com (Postfix) with ESMTP id 855E83A6A69 for <hybi@ietf.org>; Mon, 28 Mar 2011 13:52:16 -0700 (PDT)
Received: from localhost (peirce.dave.cridland.net [127.0.0.1]) by peirce.dave.cridland.net (Postfix) with ESMTP id 70CF91168087; Mon, 28 Mar 2011 21:53:43 +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 9rfCU33wYAN0; Mon, 28 Mar 2011 21:53:41 +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 A2D3F1168067; Mon, 28 Mar 2011 21:53:41 +0100 (BST)
References: <BANLkTi=G6bc=FquLM8agKWojmDkD9FohxA@mail.gmail.com> <8B0A9FCBB9832F43971E38010638454F04027B925A@SISPE7MB1.commscope.com> <BANLkTi=jPJ+guXuz=tr29kbVj5CxjSfXMA@mail.gmail.com> <AANLkTi=px=ainKobe-oUjmkgB2AE9n==VyvWcgr6cv0z@mail.gmail.com>
In-Reply-To: <AANLkTi=px=ainKobe-oUjmkgB2AE9n==VyvWcgr6cv0z@mail.gmail.com>
MIME-Version: 1.0
Message-Id: <4126.1301345621.644965@puncture>
Date: Mon, 28 Mar 2011 21:53:41 +0100
From: Dave Cridland <dave@cridland.net>
To: Greg Wilkins <gregw@intalio.com>, "Thomson, Martin" <Martin.Thomson@commscope.com>, Server-Initiated HTTP <hybi@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] DNS SRV for WebSocket
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: Mon, 28 Mar 2011 20:52:22 -0000

On Mon Mar 28 21:39:46 2011, Greg Wilkins wrote:
> On 28 March 2011 19:34, Iñaki Baz Castillo <ibc@aliax.net> wrote:
> > Also, I've explained that SRV is not just for "provide name-based
> > discovery for a service". SRV provides *Real* load-balancing and
> > failover. This doesn't exist in HTTP (in which just a hack is  
> used: a
> > DNS A record with different IP's).
> 
> So the problem using SRV for ws is that ws starts with a HTTP  
> connection,
> which may be existing and may be used for other HTTP requests if the
> handshake fails.
> 
> 
Right. Adam's going to hate me, but this would be a perfect use-case  
for a redirect.

But in any case, we can say that this is a MUST NOT. I appreciate  
this is somewhat bending the rules of HTTP compatibility, but I think  
it's worthwhile for the benefits that SRV records give.

> So there is not much we can do to tell clients that they should use
> SRV when creating the HTTP connection.
> 
> So why doesn't HTTP use it?

HTTP doesn't use it primarily because it was a concept not familiar  
to the designers of HTTP when it was created, and by the time the  
idea was put forward it was too late to change, since people had  
deployed web services on their domain roots (ie, cridland.net as well  
as www.cridland.net), and therefore there was no utility in a  
fallback to A.

(SRV records themselves were first specified in RFC 2052, back in  
1996, but the mechanism is a generalization of MX records, of course.  
Of some note is that the arguments being raised against SRV records  
here are also all applicable to MX records, which have been deployed  
successfully since the early 90's, and probably before).

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