Re: [hybi] Experiment comparing Upgrade and CONNECT handshakes

John Tamplin <jat@google.com> Wed, 01 December 2010 19:10 UTC

Return-Path: <jat@google.com>
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 DD1D33A6B46 for <hybi@core3.amsl.com>; Wed, 1 Dec 2010 11:10:17 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -104.716
X-Spam-Level:
X-Spam-Status: No, score=-104.716 tagged_above=-999 required=5 tests=[AWL=1.261, BAYES_00=-2.599, FM_FORGED_GMAIL=0.622, RCVD_IN_DNSWL_MED=-4, USER_IN_WHITELIST=-100]
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 samZ2t5gkL3f for <hybi@core3.amsl.com>; Wed, 1 Dec 2010 11:10:12 -0800 (PST)
Received: from smtp-out.google.com (smtp-out.google.com [216.239.44.51]) by core3.amsl.com (Postfix) with ESMTP id E1BCE3A6C52 for <hybi@ietf.org>; Wed, 1 Dec 2010 11:10:09 -0800 (PST)
Received: from hpaq11.eem.corp.google.com (hpaq11.eem.corp.google.com [172.25.149.11]) by smtp-out.google.com with ESMTP id oB1JBL5Q001091 for <hybi@ietf.org>; Wed, 1 Dec 2010 11:11:21 -0800
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1291230681; bh=IFmHlBTG1pgqJO0L/4RQ8NHPebk=; h=MIME-Version:In-Reply-To:References:From:Date:Message-ID:Subject: To:Cc:Content-Type:Content-Transfer-Encoding; b=cHnm8XcBjNcYgtornw2vDmdHR/9Boo4VcgAIBXZytTKHefMxik+8pEfN2SoY4rI/v qSyyicLoYNKRPf2VKpfJA==
Received: from ywe9 (ywe9.prod.google.com [10.192.5.9]) by hpaq11.eem.corp.google.com with ESMTP id oB1JBJjP005514 for <hybi@ietf.org>; Wed, 1 Dec 2010 11:11:19 -0800
Received: by ywe9 with SMTP id 9so63944ywe.17 for <hybi@ietf.org>; Wed, 01 Dec 2010 11:11:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:received:mime-version:received:in-reply-to :references:from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=OtXE9KpdtRWGEuTYGFeOv7pcEFr2Dh0lIY1/bzmYrbU=; b=AlVbYWRAG3vkH4OUQPoMPp7yBDj3R8Ho1RhiqF19K9wvflh+xMG4q6AIOhFRsT3N7b px+Rr/3AWFalkyIZFKSA==
DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=JGf6ixvOotV34d3d0nnOG7dPCaPDbfQ++20svFDQUJapunkhGzkGpHlXBKBbfrUOzh KJUlbO6oxzPAJvIH03fw==
Received: by 10.151.50.10 with SMTP id c10mr2856201ybk.434.1291230678904; Wed, 01 Dec 2010 11:11:18 -0800 (PST)
MIME-Version: 1.0
Received: by 10.150.217.12 with HTTP; Wed, 1 Dec 2010 11:10:58 -0800 (PST)
In-Reply-To: <AANLkTimtjYUOidZcxkSEtaUniJC6m8ujzFa69DMQVhZH@mail.gmail.com>
References: <AANLkTik0wR-Oag5YJJDmdiSy67WW6TMaHmqWEo4o5kGW@mail.gmail.com> <AANLkTimwEtKrJm5KxTYZ4wrtONBYDTGjE5LF7__AHBEU@mail.gmail.com> <20101201183540.GF19021@1wt.eu> <AANLkTi=r-is4ZqJc6itsaBkyrmW746xXj8OV78M_Qbi3@mail.gmail.com> <AANLkTimtjYUOidZcxkSEtaUniJC6m8ujzFa69DMQVhZH@mail.gmail.com>
From: John Tamplin <jat@google.com>
Date: Wed, 01 Dec 2010 14:10:58 -0500
Message-ID: <AANLkTimQ3bm5-2tN0QEt=qX4CR_XFpcLXF7Auz2ijo0Z@mail.gmail.com>
To: Greg Wilkins <gregw@webtide.com>
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-System-Of-Record: true
Cc: Hybi <hybi@ietf.org>, Zhong Yu <zhong.j.yu@gmail.com>
Subject: Re: [hybi] Experiment comparing Upgrade and CONNECT handshakes
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: Wed, 01 Dec 2010 19:10:18 -0000

On Wed, Dec 1, 2010 at 2:01 PM, Greg Wilkins <gregw@webtide.com> wrote:
> As proposed, the Hello frames do not cost an extra round trip.

Unless I misunderstood your proposal, doesn't the server have to wait
for the client's Hello reply before it can send any messages?  That
seems like it adds one RTT (not two, as it would be if the first Hello
wasn't piggy-backed with the server response).

> The Hello frames are proposed to replace the current unframed bytes.
> There primary purpose is  to test the connection after an upgrade to
> see if WS frames really can be exchanged.  The secondary purpose was
> to carry nonces and hashes.
>
> I think with CONNECT there is probably less need for such Hello
> packets, as I think it much more likely that if a CONNECT succeeds
> then the path will be good.   But there could still be some failure
> cases, so there may still be value.   For example, consider a  really
> dumb intermediary that reads a HTTP request in full, then forwards it
> and then reads the response in full.  Such an intermediary would be
> able to forward a CONNECT and the 200 response, but would not then
> function as a WS intermediary.  Sending the Hello frame from the
> server would detect this as the client would timeout waiting for it.
> Without the Hello frame, the client would never know if the connection
> is working or if the server just has nothing to say.

I agree the Hello frames are useful in this case.  However, how often
is this case present, and is getting a WebSocket-layer timeout rather
than app-layer (which in most cases will have to be present anyway)
worth the price for all the other cases?  I don't have any numbers for
it (do you?), but my gut feeling is it is low.

> So this is why I think we should have kept incrementally improving the
> current handshake, so we could now simply switch to CONNECT.  But we
> still have the issue of the unframed bytes and the space encoded
> nonces etc.     I think both of these things need to go regardless of
> a switch to CONNECT.    Thus I think we should accept the Hello
> proposals before switching to CONNECT (but I don't necessarily think
> we need a draft inbetween).

Except that depending on what we switch to, those things you want
removed aren't present at all, such as in Adam's proposals.  So,
moving them somewhere else doesn't seem like an incremental step but
rather wasted effort.

-- 
John A. Tamplin
Software Engineer (GWT), Google