Re: [pcp] Comments on draft-reddy-pcp-optimize-keepalives-00

"Reinaldo Penno (repenno)" <repenno@cisco.com> Mon, 05 November 2012 10:56 UTC

Return-Path: <repenno@cisco.com>
X-Original-To: pcp@ietfa.amsl.com
Delivered-To: pcp@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 07D5B21F8542 for <pcp@ietfa.amsl.com>; Mon, 5 Nov 2012 02:56:42 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -10.199
X-Spam-Level:
X-Spam-Status: No, score=-10.199 tagged_above=-999 required=5 tests=[AWL=-0.200, BAYES_00=-2.599, J_CHICKENPOX_24=0.6, RCVD_IN_DNSWL_HI=-8]
Received: from mail.ietf.org ([64.170.98.30]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u2NTX9guxcHM for <pcp@ietfa.amsl.com>; Mon, 5 Nov 2012 02:56:41 -0800 (PST)
Received: from rcdn-iport-7.cisco.com (rcdn-iport-7.cisco.com [173.37.86.78]) by ietfa.amsl.com (Postfix) with ESMTP id C282421F8533 for <pcp@ietf.org>; Mon, 5 Nov 2012 02:56:24 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cisco.com; i=@cisco.com; l=6854; q=dns/txt; s=iport; t=1352112984; x=1353322584; h=from:to:subject:date:message-id:in-reply-to:content-id: content-transfer-encoding:mime-version; bh=F59Cmhj4B6NZmaAFA30kR2/nCzAvk/wZq8MLk78VCi0=; b=MFgun+p6+oJJEjfi8HG6z8mxhUu6K+kcc7nFQhfFG7kRS63jZIIwTEMK +o62oekNRwAM4CDdmxWDylvhYZU008LCLjhFcHD0zW0/JT+vwJ9LuYMxw bEBbpJ/mD4FUydA4u6CXKwQUxt5dbVpFbPsAdHCCGG76WVwodyXq0/EKA g=;
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: Av8EAOial1CtJV2Z/2dsb2JhbABEw0KBCIIeAQEBBAEBAQ8BFBM0HQEIGAoUCS4LFBEBAQQBEggah2gLmiifPwSMHIVAYQOkVIFrgm+CGQ
X-IronPort-AV: E=Sophos;i="4.80,714,1344211200"; d="scan'208";a="138822204"
Received: from rcdn-core-2.cisco.com ([173.37.93.153]) by rcdn-iport-7.cisco.com with ESMTP; 05 Nov 2012 10:56:24 +0000
Received: from xhc-rcd-x10.cisco.com (xhc-rcd-x10.cisco.com [173.37.183.84]) by rcdn-core-2.cisco.com (8.14.5/8.14.5) with ESMTP id qA5AuO3k026176 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 5 Nov 2012 10:56:24 GMT
Received: from xmb-rcd-x04.cisco.com ([169.254.8.200]) by xhc-rcd-x10.cisco.com ([173.37.183.84]) with mapi id 14.02.0318.001; Mon, 5 Nov 2012 04:56:23 -0600
From: "Reinaldo Penno (repenno)" <repenno@cisco.com>
To: "Markus.Isomaki@nokia.com" <Markus.Isomaki@nokia.com>, "dthaler@microsoft.com" <dthaler@microsoft.com>, "pcp@ietf.org" <pcp@ietf.org>, "draft-reddy-pcp-optimize-keepalives@tools.ietf.org" <draft-reddy-pcp-optimize-keepalives@tools.ietf.org>
Thread-Topic: [pcp] Comments on draft-reddy-pcp-optimize-keepalives-00
Thread-Index: Ac26ICGtepI7C2jMS3WSr/1EfDkumAA0bIyAABavwQA=
Date: Mon, 05 Nov 2012 10:56:22 +0000
Message-ID: <45A697A8FFD7CF48BCF2BE7E106F06041367B1@xmb-rcd-x04.cisco.com>
In-Reply-To: <E44893DD4E290745BB608EB23FDDB7622F6B2E@008-AM1MPN1-041.mgdnok.nokia.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/14.13.0.110805
x-originating-ip: [10.21.64.238]
x-tm-as-product-ver: SMEX-10.2.0.1135-7.000.1014-19340.004
x-tm-as-result: No--61.466700-8.000000-31
x-tm-as-user-approved-sender: No
x-tm-as-user-blocked-sender: No
Content-Type: text/plain; charset="us-ascii"
Content-ID: <B37BEB17430E2D4F9EEC4D6C30ADC9E0@cisco.com>
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [pcp] Comments on draft-reddy-pcp-optimize-keepalives-00
X-BeenThere: pcp@ietf.org
X-Mailman-Version: 2.1.12
Precedence: list
List-Id: PCP wg discussion list <pcp.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/pcp>, <mailto:pcp-request@ietf.org?subject=unsubscribe>
List-Archive: <http://www.ietf.org/mail-archive/web/pcp>
List-Post: <mailto:pcp@ietf.org>
List-Help: <mailto:pcp-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/pcp>, <mailto:pcp-request@ietf.org?subject=subscribe>
X-List-Received-Date: Mon, 05 Nov 2012 10:56:42 -0000

Hello,

Comments inline...

On 11/4/12 9:16 PM, "Markus.Isomaki@nokia.com" <Markus.Isomaki@nokia.com>
wrote:

>Hi Dave,
>
>Thanks for your review. See comments inline.
>
>Dave Thaler [mailto:dthaler@microsoft.com] wrote:
>>
>>1) The document is nominally about optimizing keepalives to conserve
>>power, and Section 3.3 is the core section about keepalive optimization.
>>However,
>>that section doesn't actually say anything that would result in any
>>optimization.
>
>True. The current version misses this explanation. And I agree it should
>be pretty much the crux of the draft.
>
>>It basically just says you can send PCP messages instead of application
>>layer
>>messages, but just changing the packet format doesn't save power.  The
>>main
>>issues that it needs to discuss are as follows:
>>* Simply using PCP instead of an app-layer message doesn't optimize for
>>power.
>>Power is optimized if keepalive messages (whether PCP or app-layer) are
>>sent
>>less often
>>* App-layer keepalive messages typically still need to be sent to keep
>>server
>>state alive
>>* Sending PCP messages less frequently than the application needs to keep
>>the server state alive isn't useful, since the keepalives to refresh
>>server state
>>will refresh middlebox mappings.
>>* Thus using PCP only optimizes power if the PCP message interval is
>>strictly
>>longer than what the app would normally use the keep middlebox state
>>alive,
>>and strictly shorter than the server state refresh interval.
>>* Since PCP is not ubiquitously deployed in every middlebox already
>>(obviously) an app has to have its own app-layer algorithm regardless.
>>And to
>>optimize power, some apps already do their own dynamic detection
>>algorithm
>>(e.g., [RFC4380]
>>section 5.2.7 has one such algorithm, and undoubtedly there are others).
>>Where
>>power is important (where isn't it? :) such algorithms are what all apps
>>probably ought to be doing anyway.
>>* With such an algorithm, using PCP for keepalive interval detection only
>>provides benefit when a middlebox gives a longer mapping timeout as a
>>result
>>of using PCP than connections without PCP.
>>
>>Since we want PCP to be successful [RFC5218] for keepalive optimization,
>>I
>>believe it follows that we need to strongly encourage middleboxes to
>>grant a
>>noticeably longer timeout when refreshed with PCP messages than when
>>refreshed with
>>data packets.   But I'm not sure such a requirement/recommendation is in
>>any
>>document (maybe it is, but I didn't see it from a quick glance).
>>
>>(Of course this might also beg the question of what happens if every
>>connection Then uses PCP, does that cause any problems?)
>>
>>Separately, there is a potential argument that using PCP can help an
>>app's
>>keepalive interval detection algorithm converge more quickly, but that's
>>usually a startup-time thing and not a steady-state thing and so any
>>power
>>savings due to faster convergence may be negligible.
>>
>
>I agree with the above. In most cases the application will need to send
>some kind of end-to-end heartbeat anyway. What we need is a way to set
>the NAT/FW timers long enough so that no *additional* keep-alives would
>be needed just for their sake.
>
>I admit it is not entirely clear to me how PCP can or should be best used
>for this purpose. If I've understood correctly PCP actually can't be used
>to tell the NAT "keep this binding as long as you see any traffic on it
>at least every N seconds", i.e., control the implicit mapping timeout.

Interesting, please see below.

>It can only tell the NAT "keep this binding for the next N seconds". Is
>this correct? If so, the best approach is probably to set the binding
>lifetime as long as possible via PCP so that the PCP refreshes would be
>as infrequent as possible, and set the application heartbeat timeout to
>maximum value. A further optimization is to send the PCP refresh and the
>app timeout at the same time when appropriate.


In the case of PCP PEER if the client misses a refresh, the NAT reverts
back to its normal operation and outbound packets would trigger a refresh

"If a PEER-created or PEER-managed mapping is not renewed using PEER,
   then it reverts to the NAT's usual behavior for implicit mappings,
   e.g., continued outbound traffic keeps the mapping alive, as per the
   NAT or firewall device's existing policy."

Is that what you need?


> 
>
>If the PCP binding lifetime were for example 4 hours, and app heartbeats
>would be sent once an hour, the message sequence would thus be:
>--> app connection setup (t=0)
>--> PCP PEER (t=0)
>--> app heartbeat (t=1h)
>--> app heartbeat (t=2h)
>--> app heartbeat (t=3h)
>--> PCP PEER + app heartbeat (t=4h)
>
>Without PCP the app would have to send heartbeats (or other types of
>keep-alives) as frequently as needed by the NAT, most likely more often.
>And even if the NAT would have a default binding lifetime of >1 hour, it
>might be hard for the app to *reliably* detect this.
>
>>2) The document does not explain how to detect firewalls.  Indeed it
>>says that
>>"Firewalls can not be detected this way" and then goes on to say what
>>would
>>happen
>>if the app determines that "all NATs and Firewalls on its path support
>>PCP".
>>The
>>obvious problem is that if there's no way to know whether all firewalls
>>on the
>>path support PCP, then you cannot use this draft.
>>
>
>Yes, this would be major showstopper. My co-authors have some ideas how
>we could solve it, I believe.
>
>>3) Section 4.2 discusses HTTP and websockets.   Such protocols are used
>>for
>>persistent connections because they go through HTTP proxies.   However
>>the
>>section only discusses NATs, without any mention of HTTP proxies (or
>>firewalls, for that matter).  I believe it needs to discuss having HTTP
>>proxies be
>>PCP servers, and how the client then uses PCP in that case.
>>
>
>Proxies also complicate the detection of PCP-unaware NATs, as we can't
>ask the proxy which source IP:port it sees on the TCP connection in the
>same way as we can do with an HTTP server.
>
>>Note that since hosts do have ways to discover and/or be configured with
>>proxy addresses, this would be another potential PCP server discovery
>>mechanism
>>besides DHCP and default router list.   Should proxy addresses be used
>>when
>>DHCP and the default router don't respond to PCP?
>>
>
>Interesting. I haven't thought that we could use PCP to set the HTTP
>proxy TCP connection lifetimes. Would the PCP semantics be compatible
>with what is needed for that usage?
>
>>-Dave
>_______________________________________________
>pcp mailing list
>pcp@ietf.org
>https://www.ietf.org/mailman/listinfo/pcp