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

Willy Tarreau <w@1wt.eu> Mon, 25 July 2011 04: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 3375F11E8084; Sun, 24 Jul 2011 21:29:30 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -4.58
X-Spam-Level:
X-Spam-Status: No, score=-4.58 tagged_above=-999 required=5 tests=[AWL=-2.537, BAYES_00=-2.599, HELO_IS_SMALL6=0.556]
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 m3wUlNuT+J-7; Sun, 24 Jul 2011 21:29:29 -0700 (PDT)
Received: from 1wt.eu (1wt.eu [62.212.114.60]) by ietfa.amsl.com (Postfix) with ESMTP id 5C8CA11E807C; Sun, 24 Jul 2011 21:29:28 -0700 (PDT)
Received: (from willy@localhost) by mail.home.local (8.14.4/8.14.4/Submit) id p6P4TL1o028376; Mon, 25 Jul 2011 06:29:21 +0200
Date: Mon, 25 Jul 2011 06:29:21 +0200
From: Willy Tarreau <w@1wt.eu>
To: Mark Andrews <marka@isc.org>
Message-ID: <20110725042921.GJ22405@1wt.eu>
References: <4E28A51F.4020704@callenish.com> <CALiegf=4K2oWfmZjGMD7J_jyaDtS3i+Mu7R0Wh75Rr+MrQCjtw@mail.gmail.com> <20110722054345.GE18126@1wt.eu> <9031.1311500145.687172@puncture> <20110724105223.GL22405@1wt.eu> <CALiegfkTVg2=k4d8rxmpqXmaRUihRmhtgfF4QRUTAKic7gBk5w@mail.gmail.com> <20110724121147.GR22405@1wt.eu> <CALiegf=GDDKdXOXgz3oognh6=qRDKFUSrRfLOtOoUucAxr4p3w@mail.gmail.com> <20110724183343.GY22405@1wt.eu> <20110725004658.A3AE71221C03@drugs.dv.isc.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20110725004658.A3AE71221C03@drugs.dv.isc.org>
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: Mon, 25 Jul 2011 04:29:30 -0000

On Mon, Jul 25, 2011 at 10:46:58AM +1000, Mark Andrews wrote:
> Adding a SRV lookup should add 0ms if it isn't there as you should be
> making A, AAAA and SRV lookups in parallel.

This does not work for a simple reason : you have to perform the lookups
on the SRV response just as you would do with a CNAME :

$ host -t srv _xmpp-server._tcp.gmail.com
_xmpp-server._tcp.gmail.com has SRV record 20 0 5269 xmpp-server1.l.google.com.
_xmpp-server._tcp.gmail.com has SRV record 5 0 5269 xmpp-server.l.google.com.
_xmpp-server._tcp.gmail.com has SRV record 20 0 5269 xmpp-server2.l.google.com.
_xmpp-server._tcp.gmail.com has SRV record 20 0 5269 xmpp-server3.l.google.com.
_xmpp-server._tcp.gmail.com has SRV record 20 0 5269 xmpp-server4.l.google.com.

And only now I can resolve xmpp-server.l.google.com and get its real address.
That's why I was saying that SRV and CNAME really are equivalent in terms of
latency, because both of them require an additional round trip.

And that is assuming that all the hosts are referenced on the main page, which
in practice is not true because a number of them are also in additional CSS
and JS.

Now if I want to be really picky, I'd add that at 100 bytes on average per
request, sending 30 additional requests means a total of 3kB of data on the
uplink, which require :
  - 1.5 second of uplink traffic on a 3G HDSPA link with 16kbps uplink
  - 375 ms of uplink traffic on a 3G HDSPA link with 64kbps uplink
  - 187 ms of uplink traffic on an ADSL 512/128

I'm not trying to dismiss the usefulness of the mechanism, I just don't
like to hear that doing something additional comes at absolutely zero cost.

Regards,
Willy