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

Willy Tarreau <> Tue, 26 July 2011 19:29 UTC

Return-Path: <>
Received: from localhost (localhost []) by (Postfix) with ESMTP id CB07411E8086; Tue, 26 Jul 2011 12:29:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at
X-Spam-Flag: NO
X-Spam-Score: -4.024
X-Spam-Status: No, score=-4.024 tagged_above=-999 required=5 tests=[AWL=-2.881, BAYES_00=-2.599, HELO_IS_SMALL6=0.556, J_CHICKENPOX_24=0.6, MIME_8BIT_HEADER=0.3]
Received: from ([]) by localhost ( []) (amavisd-new, port 10024) with ESMTP id m5FdTmZE2O6w; Tue, 26 Jul 2011 12:29:04 -0700 (PDT)
Received: from ( []) by (Postfix) with ESMTP id CF22A11E8073; Tue, 26 Jul 2011 12:29:02 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p6QJSoxB003845; Tue, 26 Jul 2011 21:28:50 +0200
Date: Tue, 26 Jul 2011 21:28:50 +0200
From: Willy Tarreau <>
To: =?iso-8859-1?Q?I=F1aki?= Baz Castillo <>
Message-ID: <>
References: <9031.1311286867.939466@puncture> <> <> <> <> <> <> <9031.1311538720.416128@puncture> <> <>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <>
User-Agent: Mutt/
Cc: Server-Initiated HTTP <>, IETF-Discussion <>
Subject: Re: [hybi] Last Call: <draft-ietf-hybi-thewebsocketprotocol-10.txt> (The WebSocket protocol) to Proposed Standard
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: Server-Initiated HTTP <>
List-Unsubscribe: <>, <>
List-Archive: <>
List-Post: <>
List-Help: <>
List-Subscribe: <>, <>
X-List-Received-Date: Tue, 26 Jul 2011 19:29:04 -0000

Hi Iñaki,

On Tue, Jul 26, 2011 at 11:58:41AM +0200, Iñaki Baz Castillo wrote:
> 2011/7/24 Willy Tarreau <>eu>:
> > To ensure nobody gets me wrong, I'm certain this can help solve issues
> > *if this is optional*. If it becomes a MUST, then the negative effects
> > will override the positive ones. In my opinion, the client should decide
> > whether to enable it or not.
> But I don't understand how a client is supposed to decide by himself
> how to resolve a URI destination.

This is well explained in RFC3986, #3.2.2. It enumerates a number of
exiting name registration methods and makes it clear that DNS usage is
not mandatory at all, only suggested. Also, it only exposes the fact that
names are resolved to addresses. It obviously does not make any asumption
on the DNS records to use for this either.

> If I give you my vcard containing my
> SIP/XMPP/MAILTO URIs, I must expect that you would use *standarized*
> mechanisms to locate the server for each service. In fact, in all
> these cases (SIP, XMPP; MAILTO) the URI domain can point to several
> IP:port (due to NAPTR / SRV / MX DNS records).

I'd say that the common practice with DNS has always been to use A records
for IPv4, AAAA for IPv6 (or CNAME for any), unless explicitly stated
otherwise for the protocol's usage. Now you could have resolver libraries
which would try SRV before trying A/AAAA and this would be transparent to
the upper application layers.

> BTW: I know that any web browser would first lookup at the /etc/hosts
> file when an URI is introduced.

I'm not a browser developer, but I think they might even simply rely on
the system's resolver. For instance, you might have an /etc/nsswitch.conf
or /etc/hosts.conf which indicates the priorities for the resolvers.

> This would "replace" a DNS A/AAAA
> query. Maybe NIS or whatever could also be used for this. It does not
> break SIP/XMPP/MAILTO URI's resolutions: Initially NAPTR / SRV / MX
> query would be performed and, if there is no such record (or there is
> so we get hostnames for which DNS A must be performed) then the client
> can check /etc/hosts for the "A" resolution (domain -> IP).

I don't know where you want to go with that example, but as I explained
it, if you want to have any chance of making SRV *usable* with WS (or
HTTP), you have to motivate both sides by showing them that :
  - it's better for them to use it than not to use it (both servers and
  - the additional cost of using it is negligible
  - there are no issues with not using it
  - leaving the choices to the intermediaries will not cause disruptions

I'm pretty sure that can be done, but clearly not the way it's been
presented till now.