Re: [hybi] #4: handshake does not work properly with HTTP reverse proxy.

Greg Wilkins <gregw@webtide.com> Sun, 15 August 2010 23:50 UTC

Return-Path: <gregw@webtide.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 D8C573A6887 for <hybi@core3.amsl.com>; Sun, 15 Aug 2010 16:50:09 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -0.551
X-Spam-Level:
X-Spam-Status: No, score=-0.551 tagged_above=-999 required=5 tests=[AWL=-0.988, BAYES_40=-0.185, FM_FORGED_GMAIL=0.622]
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 u9od7HlIBRz8 for <hybi@core3.amsl.com>; Sun, 15 Aug 2010 16:50:08 -0700 (PDT)
Received: from mail-fx0-f44.google.com (mail-fx0-f44.google.com [209.85.161.44]) by core3.amsl.com (Postfix) with ESMTP id 8DC2E3A65A5 for <hybi@ietf.org>; Sun, 15 Aug 2010 16:50:08 -0700 (PDT)
Received: by fxm18 with SMTP id 18so3122307fxm.31 for <hybi@ietf.org>; Sun, 15 Aug 2010 16:50:44 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.223.111.200 with SMTP id t8mr4537699fap.31.1281916244261; Sun, 15 Aug 2010 16:50:44 -0700 (PDT)
Received: by 10.223.57.12 with HTTP; Sun, 15 Aug 2010 16:50:44 -0700 (PDT)
In-Reply-To: <afe794983c8933193841c79d74d4eb9a.squirrel@sm.webmail.pair.com>
References: <afe794983c8933193841c79d74d4eb9a.squirrel@sm.webmail.pair.com>
Date: Mon, 16 Aug 2010 09:50:44 +1000
Message-ID: <AANLkTi=F4U7FBteh4yPi8GKnMEzeNiihzNZ=JwhfDzky@mail.gmail.com>
From: Greg Wilkins <gregw@webtide.com>
To: shelby@coolpage.com
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
Cc: hybi@ietf.org
Subject: Re: [hybi] #4: handshake does not work properly with HTTP reverse proxy.
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: Sun, 15 Aug 2010 23:50:10 -0000

On 15 August 2010 19:59, Shelby Moore <shelby@coolpage.com> wrote:
> Greg Wilkins wrote:
>> This is already an issue with cometd-2, now that we support websocket
>> as an optional transport.  When it is enabled, there is noticeable
>> additional establishing a comet web page (eg logging into a chat
>> room), while websocket hand shake is tried and fails, before the next
>> handshake is tried.
>
> Use the BOSH or Comet in parallel until WebSocket handshake is completed?


Using websocket in parallel would just increase the connection count
and complexity of applications as they try to deal with something that
is essentially a transport concern.

When a web page downloads, the browser will typically use 2-6 HTTP
connections to download all the content, css, images, script etc.   It
makes perfect sense to me that if the scripts then start a websocket
connection, then the browser should be able to take one of those 2-6
existing connections an try a websocket upgrade.  That is a single
round trip to check and establish websocket is supported.

Sure there are failure modes where a websocket connection is accepted,
but then does not actually work (or subsequently fails to work).  But
there are similar failure modes with BOSH/comet and implementations of
those protocols still need to implement timeouts etc to catch all
failures. Websocket is not a silver bullet that will suddenly make the
internet a truly error free reliable network.


For me, the attraction of websocket is mostly that it offers the
possibility of reducing the long term connection count per client from
2 to 1. That it promises some potential improvements in data density
and max latency is entirely secondary for me.

cheers