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

Willy Tarreau <w@1wt.eu> Tue, 26 July 2011 19:29 UTC

Return-Path: <w@1wt.eu>
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 CB07411E8086; Tue, 26 Jul 2011 12:29:04 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.024
X-Spam-Level:
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 mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id m5FdTmZE2O6w; Tue, 26 Jul 2011 12:29:04 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by ietfa.amsl.com (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 <w@1wt.eu>
To: =?iso-8859-1?Q?I=F1aki?= Baz Castillo <ibc@aliax.net>
Message-ID: <20110726192850.GB3692@1wt.eu>
References: <9031.1311286867.939466@puncture> <4E28BA9D.6010501@callenish.com> <CAP992=GedTEfimykCWwdwm=BsZdwFRJO36EO0a_o7iejURJ+tQ@mail.gmail.com> <CALiegfnwNyYDy=SyrqHJXV0ZreADb7F8QySvgdHofW9Hm9miZQ@mail.gmail.com> <CABLsOLCgxDNDs54GUybBzmG8a6rNPzXzFcwf_OU25j5L+AobaQ@mail.gmail.com> <CALiegfnp+kNqnU-_x2ZBZnN8fzP=4+6WO=QPjw1rJzvZmSXEAg@mail.gmail.com> <20110724185949.GB22405@1wt.eu> <9031.1311538720.416128@puncture> <20110724204236.GG22405@1wt.eu> <CALiegfkgukeaiMR-Yc15qUJYCB-KPcoNoX4G6NrN4+DOiDS+tw@mail.gmail.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <CALiegfkgukeaiMR-Yc15qUJYCB-KPcoNoX4G6NrN4+DOiDS+tw@mail.gmail.com>
User-Agent: Mutt/1.4.2.3i
Cc: Server-Initiated HTTP <hybi@ietf.org>, IETF-Discussion <ietf@ietf.org>
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: 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 <w@1wt.eu>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
    browsers)
  - 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.

Willy