[hybi] Are keep-alives necessary? Was: Re: NAT reset recovery? Was: Extensibility mechanisms?
Hugh Winkler <hugh.winkler@wellstorm.com> Tue, 20 April 2010 16:17 UTC
Return-Path: <hugh.winkler@wellstorm.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 02F3D3A69DF for <hybi@core3.amsl.com>; Tue, 20 Apr 2010 09:17:44 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: 0.623
X-Spam-Level:
X-Spam-Status: No, score=0.623 tagged_above=-999 required=5 tests=[BAYES_50=0.001, 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 OrLsvzE770eH for <hybi@core3.amsl.com>; Tue, 20 Apr 2010 09:17:43 -0700 (PDT)
Received: from mxout-08.mxes.net (mxout-08.mxes.net [216.86.168.183]) by core3.amsl.com (Postfix) with ESMTP id 2A80F3A6942 for <hybi@ietf.org>; Tue, 20 Apr 2010 09:17:42 -0700 (PDT)
Received: from mail-yx0-f179.google.com (unknown [209.85.210.179]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (No client certificate requested) by smtp.mxes.net (Postfix) with ESMTPSA id 73B07509DC for <hybi@ietf.org>; Tue, 20 Apr 2010 12:17:27 -0400 (EDT)
Received: by yxe9 with SMTP id 9so3595450yxe.29 for <hybi@ietf.org>; Tue, 20 Apr 2010 09:17:27 -0700 (PDT)
MIME-Version: 1.0
Received: by 10.151.49.20 with HTTP; Tue, 20 Apr 2010 09:17:26 -0700 (PDT)
Date: Tue, 20 Apr 2010 11:17:26 -0500
Received: by 10.150.128.4 with SMTP id a4mr7639740ybd.301.1271780246604; Tue, 20 Apr 2010 09:17:26 -0700 (PDT)
Message-ID: <s2t927441b31004200917x1d05b3f1jbbe5bb9e270f1c38@mail.gmail.com>
From: Hugh Winkler <hugh.winkler@wellstorm.com>
To: Hybi <hybi@ietf.org>
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: quoted-printable
Subject: [hybi] Are keep-alives necessary? Was: Re: 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 16:17:44 -0000
On Mon, Apr 19, 2010 at 4:36 PM, Vladimir Katardjiev <vladimir@d2dx.com> wrote: > > Having said that, from a mobile perspective this is disastrous. In the worst-case scenario, if your keepalive interval is 5 minutes, you could end up sending a keepalive message every 2.5 minutes. This would wake up the radio twice as often, and, consequently, halve battery life. In a scenario where the server's keepalive is triggered by the client's, the message from the server would likely arrive within the timeframe that the radio is "awake" anyway (3-5 seconds on smartphones) and thus avoid waking it up again. > I'm unsure keep-alives are driven by requirements. It's only necessary to keep the connection alive across long periods of no activity if you require that applications can expect their connections to be stateful. One requirement of web sockets protocol is that it must support WSAPI. So if WSAPI were to explicitly say that applications may not expect the remote end of a connection to maintain state across send()s, then a client implementation of WSP could just initiate a new TCP connection, if it discovers upon sending that the underlying connection has been closed. WSAPI as written doesn't explicitly say whether applications can expect the server to maintain state, and I think reasonable people can assume that's implied by the semantics of "connection". But if the WSAPI explicitly were to say that send() is idempotent, then WSP wouldn't need to keep the TCP connection alive. An implementation could open a new TCP connection under the hood for any send. And handset manufacturers would thank you. Hugh
- Re: [hybi] Are keep-alives necessary? Was: Re: NA… Hugh Winkler
- Re: [hybi] Are keep-alives necessary? Was: Re: NA… Jamie Lokier
- [hybi] Are keep-alives necessary? Was: Re: NAT re… Hugh Winkler
- Re: [hybi] Are keep-alives necessary? Was: Re: NA… Vladimir Katardjiev
- Re: [hybi] Are keep-alives necessary? Was: Re: NA… Bill de hOra