Re: [hybi] NAT reset recovery? Was: Extensibility mechanisms?

Jamie Lokier <jamie@shareable.org> Tue, 20 April 2010 01:32 UTC

Return-Path: <jamie@shareable.org>
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 0F04B3A696C for <hybi@core3.amsl.com>; Mon, 19 Apr 2010 18:32:34 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -3.12
X-Spam-Level:
X-Spam-Status: No, score=-3.12 tagged_above=-999 required=5 tests=[AWL=-0.521, BAYES_00=-2.599]
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 kn9nlEc7+-QU for <hybi@core3.amsl.com>; Mon, 19 Apr 2010 18:32:33 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id 1DAEE3A6897 for <hybi@ietf.org>; Mon, 19 Apr 2010 18:32:33 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1O42K4-0006Ui-9p; Tue, 20 Apr 2010 02:32:20 +0100
Date: Tue, 20 Apr 2010 02:32:20 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Markus.Isomaki@nokia.com
Message-ID: <20100420013220.GC21899@shareable.org>
References: <20100419091736.GA28758@shareable.org> <p2w2a10ed241004190222ne3a61417i47b021dbe0422f71@mail.gmail.com> <B3F72E5548B10A4A8E6F4795430F841832040920C4@NOK-EUMSG-02.mgdnok.nokia.com> <20100419121000.GG28758@shareable.org> <87764B8E-5872-40EE-AA2F-D4E659B94F63@d2dx.com> <20100419140423.GC3631@shareable.org> <6959E9B3-B1AC-4AFB-A53D-AB3BA340208C@d2dx.com> <B3F72E5548B10A4A8E6F4795430F841832040F78C0@NOK-EUMSG-02.mgdnok.nokia.com> <w2q5821ea241004191309t7362de42p922788d380119dc4@mail.gmail.com> <B3F72E5548B10A4A8E6F4795430F841832040F78DB@NOK-EUMSG-02.mgdnok.nokia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <B3F72E5548B10A4A8E6F4795430F841832040F78DB@NOK-EUMSG-02.mgdnok.nokia.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org
Subject: Re: [hybi] NAT reset recovery? Was: Extensibility mechanisms?
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: Tue, 20 Apr 2010 01:32:34 -0000

Markus.Isomaki@nokia.com wrote:
> 
> Pieter Hintjens wrote:
> >
> >On Mon, Apr 19, 2010 at 9:53 PM,  <Markus.Isomaki@nokia.com> wrote:
> >
> >> I think the websocket spec should define two special frames 
> >explicitly 
> >> for keepalive purpose...
> >
> >For what it's worth, the keep alive design from AMQP used only 
> >one frame.  Senders are responsible for issuing KAs at regular 
> >intervals.
> >Receivers treat these as no-ops except to register "activity" 
> >on the connection.  Any other frame also acts as activity, 
> >obviously.  If no activity is received within X seconds, the 
> >connection can be killed.
> >There is no notion of request-response for KA in AMQP.
> >
> 
> This is another possibility, and it's even simpler. But how fast
> would the sender be able to detect that the keepalive did not go
> through and there's something wrong with the connection? Only after
> TCP has given up? Also an explicit response would tell something
> more about the liveliness of the server than a mere TCP ack.

An endpoint knows that the connection is down because it hasn't
*received* a keepalive after too long.

The speed of discovery depends on an agreed timing with the other end.

Which is actually the same as request-response:

> I'd prefer request-response pattern. 

You obviously don't want both ends sending requests, so at least one
of them has to passively timeout waiting to receive a keepalive, and
then decide the connection is down.

AMQP just does that at both ends, instead of one.

Request-response from one end only does not remove the need for a
passive timeout agreed between the endpoints.  (It can be negotiated,
or pre-agreed).

-- Jamie