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

<Markus.Isomaki@nokia.com> Tue, 20 April 2010 06:51 UTC

Return-Path: <Markus.Isomaki@nokia.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 F23273A6A6B for <hybi@core3.amsl.com>; Mon, 19 Apr 2010 23:51:32 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.413
X-Spam-Level:
X-Spam-Status: No, score=-6.413 tagged_above=-999 required=5 tests=[AWL=0.186, BAYES_00=-2.599, RCVD_IN_DNSWL_MED=-4]
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 N5V1GVSmHnwE for <hybi@core3.amsl.com>; Mon, 19 Apr 2010 23:51:32 -0700 (PDT)
Received: from mgw-mx03.nokia.com (smtp.nokia.com [192.100.122.230]) by core3.amsl.com (Postfix) with ESMTP id 6A5B63A6910 for <hybi@ietf.org>; Mon, 19 Apr 2010 23:51:28 -0700 (PDT)
Received: from vaebh106.NOE.Nokia.com (vaebh106.europe.nokia.com [10.160.244.32]) by mgw-mx03.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id o3K6oomJ031495; Tue, 20 Apr 2010 09:51:13 +0300
Received: from vaebh102.NOE.Nokia.com ([10.160.244.23]) by vaebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Apr 2010 09:51:02 +0300
Received: from smtp.mgd.nokia.com ([65.54.30.7]) by vaebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 20 Apr 2010 09:50:58 +0300
Received: from NOK-EUMSG-02.mgdnok.nokia.com ([65.54.30.87]) by nok-am1mhub-03.mgdnok.nokia.com ([65.54.30.7]) with mapi; Tue, 20 Apr 2010 08:50:57 +0200
From: Markus.Isomaki@nokia.com
To: Martin.Thomson@andrew.com, ph@imatix.com, jamie@shareable.org
Date: Tue, 20 Apr 2010 08:50:56 +0200
Thread-Topic: [hybi] NAT reset recovery? Was: Extensibility mechanisms?
Thread-Index: AcrgTvQnApmteXUaSny7rKTiU724LAAARuTAAADmC7A=
Message-ID: <B3F72E5548B10A4A8E6F4795430F841832040F7B57@NOK-EUMSG-02.mgdnok.nokia.com>
References: <20100419091736.GA28758@shareable.org> <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> <20100420013220.GC21899@shareable.org> <l2s5821ea241004192301u692d2344y8da146470a68ab75@mail.gmail.com> <8B0A9FCBB9832F43971E38010638454F03E7D06A36@SISPE7MB1.commscope.com>
In-Reply-To: <8B0A9FCBB9832F43971E38010638454F03E7D06A36@SISPE7MB1.commscope.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
acceptlanguage: en-US
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
X-OriginalArrivalTime: 20 Apr 2010 06:50:58.0294 (UTC) FILETIME=[D4F1D160:01CAE055]
X-Nokia-AV: Clean
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 06:51:33 -0000

Hi,

Martin Thomson wrote:
>
>Furthermore, you don't need a response, TCP provides ACKs.  A 
>one-way exchange of as little as a single byte should be 
>enough to keep any bindings alive in (TCP) intermediaries.
>

This is true. 

I would say there are two options to do keepalives:
i) Define a keepalive frame that the client sends. There is no websocket level response but the TCP ACK is still enough to keep NATs, firewalls etc. open. 
Ii) Define a keepalive request frame that the client sends and keepalive response that the server uses to respond to it. The response is not really necessary for NATs etc., but might help the client to notice a broken connection faster. (I'm not sure if this is true but I remember this was an argument in another protocol, SIP, why keepalive over TCP was done in that way.) The response may make the protocol more complicated, though, as people have commented.

I would not want to make the keepalives peer-to-peer in a sense that also the server could send keepalives. I think the client should be in charge. The reason is that as a client developer for a mobile device I would like to be able to send keepalives as infrequently as possible. We have had some bad experiences with IMAP servers sending stuff frequently back to the client (presumably because not all clients are clever enough to do any keepalives themselves - this is a risk of course if we don't specify this at all in websocket spec), and the client has no way to affect their rate, which has been fixed.

If there really is a requirement for the server to see keepalives at a certain minimum rate (for instance so that it can abandon stale connections), I would then have that negotiated so that the server can tell that back to the client who would still do the sending. But I'm not sure if that's needed.

Markus