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

Jamie Lokier <jamie@shareable.org> Tue, 20 April 2010 19:57 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 1EEC53A6A99 for <hybi@core3.amsl.com>; Tue, 20 Apr 2010 12:57:47 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -2.955
X-Spam-Level:
X-Spam-Status: No, score=-2.955 tagged_above=-999 required=5 tests=[AWL=-0.356, 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 Dqlse8ebd0Jr for <hybi@core3.amsl.com>; Tue, 20 Apr 2010 12:57:46 -0700 (PDT)
Received: from mail2.shareable.org (mail2.shareable.org [80.68.89.115]) by core3.amsl.com (Postfix) with ESMTP id EFCE93A6A0D for <hybi@ietf.org>; Tue, 20 Apr 2010 12:57:44 -0700 (PDT)
Received: from jamie by mail2.shareable.org with local (Exim 4.63) (envelope-from <jamie@shareable.org>) id 1O4JZb-0004X1-JS; Tue, 20 Apr 2010 20:57:31 +0100
Date: Tue, 20 Apr 2010 20:57:31 +0100
From: Jamie Lokier <jamie@shareable.org>
To: Markus.Isomaki@nokia.com
Message-ID: <20100420195731.GF11723@shareable.org>
References: <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> <B3F72E5548B10A4A8E6F4795430F841832040F7B57@NOK-EUMSG-02.mgdnok.nokia.com> <8B0A9FCBB9832F43971E38010638454F03E7D06A56@SISPE7MB1.commscope.com> <B3F72E5548B10A4A8E6F4795430F841832040F80AE@NOK-EUMSG-02.mgdnok.nokia.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Disposition: inline
In-Reply-To: <B3F72E5548B10A4A8E6F4795430F841832040F80AE@NOK-EUMSG-02.mgdnok.nokia.com>
User-Agent: Mutt/1.5.13 (2006-08-11)
Cc: hybi@ietf.org, Martin.Thomson@andrew.com
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 19:57:47 -0000

Markus.Isomaki@nokia.com wrote:
> Mobile clients would often want to send keepalives as infrequently
> as possible to save battery. They may use intelligent
> (unstandardized) mechanisms to learn what the mimimum rate
> acceptable for their access network NATs and firewalls are and use
> it. (As of today I believe the ballpark for TCP is something like a
> once per 10 minutes of idleness.)
>
> The servers on the other hand want to get rid of unused connections
> as fast as possible and may want to check the connection liveliness
> even faster. (I heard that some major XMPP servers send keepalives
> every 30 seconds.)

That depends a lot on the server, the application, and how loaded it is.

> For many clients (running in PCs etc.) this is probably fine but
> really bad for the clients in mobile devices. If the same device has
> multiple apps (websockets, XMPP, SIP, IMAP, ...)  running it can
> even synchronize the keepalives it sends for all of them (so that
> radio is active only once during the cycle),

Excellent idea :-)

> but for the server initiated keepalives it can't do the same.

That's an excellent reason to use per-hop keepalives with a proxy
on the other side of the mobile link...

Timing needs are highly application dependent.  If you are offering a
web-based chat service, the server might want to know aggressively so
it can update "users online", but if it's just a channel to send
interactive wiki updates out, the server might have a long timeout -
reducing when the server is loaded.

> I've always wondered if all those warnings and nice words in RFCs
> help, but if/when we specify the server-initiated keepalive frame,
> the above case should be explained, so the servers would not use if
> carelessly. I think the gist should be so that the client is in
> charge of keeping NATs, firewalls, proxies and all that stuff (which
> is mostly related to the clients current point of attachment) happy,
> while the server should only worry about its own resources and those
> related to it, such as the load balancers.

Exactly: Both sides should worry about their own resources, and their
own application-specific needs.

I don't think the client is more special than the server in that way.

Negotiation is not essential, and it could be made an optional
extension.  It's useful because it reduces the overheads compared with
pings.  Up front negotation is not as good as a "send me keepalives
every N seconds of idle time" which can be sent by either side at any
time and override the previous setting.

-- Jamie