Re: [hybi] DNS SRV for WebSocket
Iñaki Baz Castillo <ibc@aliax.net> Tue, 29 March 2011 08:38 UTC
Return-Path: <ibc@aliax.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 927373A692D for <hybi@core3.amsl.com>; Tue, 29 Mar 2011 01:38:23 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.633
X-Spam-Level:
X-Spam-Status: No, score=-2.633 tagged_above=-999 required=5 tests=[AWL=0.044, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, MIME_8BIT_HEADER=0.3, RCVD_IN_DNSWL_LOW=-1]
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 Xl43HV4YhZcV for <hybi@core3.amsl.com>; Tue, 29 Mar 2011 01:38:22 -0700 (PDT)
Received: from mail-qy0-f172.google.com (mail-qy0-f172.google.com [209.85.216.172]) by core3.amsl.com (Postfix) with ESMTP id C32E73A68C7 for <hybi@ietf.org>; Tue, 29 Mar 2011 01:38:15 -0700 (PDT)
Received: by qyk29 with SMTP id 29so1695722qyk.10 for <hybi@ietf.org>; Tue, 29 Mar 2011 01:39:53 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.229.75.196 with SMTP id z4mr4211281qcj.277.1301387993449; Tue, 29 Mar 2011 01:39:53 -0700 (PDT)
Received: by 10.229.35.72 with HTTP; Tue, 29 Mar 2011 01:39:53 -0700 (PDT)
In-Reply-To: <E9597B32-A0A4-451F-A478-EE55CA72DFA5@gbiv.com>
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> <4126.1301345621.644965@puncture> <E9597B32-A0A4-451F-A478-EE55CA72DFA5@gbiv.com>
Date: Tue, 29 Mar 2011 10:39:53 +0200
Message-ID: <BANLkTikGs_p5MqvEbuiiPxKrOOyN_YSY3g@mail.gmail.com>
From: Iñaki Baz Castillo <ibc@aliax.net>
To: "Roy T. Fielding" <fielding@gbiv.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: Server-Initiated HTTP <hybi@ietf.org>
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: Tue, 29 Mar 2011 08:38:23 -0000
2011/3/29 Roy T. Fielding <fielding@gbiv.com>: > There are many ways to do load balancing -- DNS is just one. So cheeaper as DNS SRV? based on a standard as DNS SRV? >>> 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. > > Indeed. Does a 3XX redirect provide failover? No, it can provide just load-balancing. >> 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. > > No, it isn't. SRV has a benefit when there is one authority within > the domain and that authority has control over DNS. Sorry, but in most of the web deployments the author of the web site also owns the domain so he is free to configure SRV records if he wants. I can't see the problem. > Historically, > that has not been the case for HTTP. Web servers are not like email, > xmpp, or sip. They are very direct and anti-establishment. If HTTP requires a new TCP connection for each request (or the exotic and limited pipelined-mode of HTTP/1.1) then this is a limitation in HTTP protocol (the same doesn't occur in other protocol better designed as SIP-TCP or XMPP). Anyhow, the client must not perform a SRV query for each connection, but just one at the beginning (to resolve the domain). But WebSocket is a new protocol, is not? In fact, the client establishes an unique TCP connection with the WS socket, just one. > SRV was developed after HTTP and did not see any real deployment > until well after 2616 was done. In any case, it would not have been > used by HTTP because a goal of web interaction is to have all of the > instruction provided to the client up-front in order to minimize latency. Again, the SRV query would be performed just *once*. That cannot introcude noticeable latency. > DNS load balancing is only minimally effective because the client has > no choice but to make an initial DNS request (to be cached for the > remainder of its uptime). And what is the problem? why do you say "is only minimally effective"? The client performs the SRV query at the beginning and internally stores the result set. If a connection fails it then uses the next rcached result to try the connection. > Exactly, but email management is inherently centralized because of > the authentication. Likewise for XMPP and SIP. And none of those > are sensitive to per-interaction latency during the authentication phase. SIP is not sensitive to per-interaction latency? > Any service that relies on some form of centralized administration > is a good match with SRV if and only if the service lookup is faster > than the application requirements for user-perceived latency. The long > tail of HTTP sites is not of that type. Only a very few websites > would gain any advantage from SRV, and those sites are already using > CDNs and IP-based load balancing to do the same thing without any need > for SRV. As I've explained and detailed various times in this thread, the web adminitrator could decide to use *OR NOT* DNS SRV records for the ws:// uri. He could still set an IP (ws://1.2.3.4:80) so the client shouldn't perform a SRV query. Or he could set a domain with no SRV record (but just A). So, what is the problem? SRV would be a perfect choice for many people but you want to prohibit it just because it would be not so useful for other people (even if they can just ignore and not use it in their deployments). It would be fully optional from the admin and user perspective. The website owner could decide to use SRV or not. The only requeriment, of course, os that WS clients support it (and WS clients are built in the web browsers, so that shoud not be a problem). -- Iñaki Baz Castillo <ibc@aliax.net>
- [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Greg Wilkins
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Thomson, Martin
- Re: [hybi] DNS SRV for WebSocket Dave Cridland
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Thomson, Martin
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Thomson, Martin
- Re: [hybi] DNS SRV for WebSocket Dave Cridland
- Re: [hybi] DNS SRV for WebSocket Dave Cridland
- Re: [hybi] DNS SRV for WebSocket Bruce Atherton
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Bjoern Hoehrmann
- Re: [hybi] DNS SRV for WebSocket Dave Cridland
- Re: [hybi] DNS SRV for WebSocket Bruce Atherton
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Greg Wilkins
- Re: [hybi] DNS SRV for WebSocket Dave Cridland
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Roy T. Fielding
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket Patrick McManus
- Re: [hybi] DNS SRV for WebSocket Roy T. Fielding
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo
- Re: [hybi] DNS SRV for WebSocket S Moonesamy
- Re: [hybi] DNS SRV for WebSocket Iñaki Baz Castillo