Re: [Webpush] Message expiration (TTL) and Negative Acknowledgements

Benjamin Bangert <bbangert@mozilla.com> Thu, 15 October 2015 16:08 UTC

Return-Path: <bbangert@mozilla.com>
X-Original-To: webpush@ietfa.amsl.com
Delivered-To: webpush@ietfa.amsl.com
Received: from localhost (ietfa.amsl.com [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 560751A92B3 for <webpush@ietfa.amsl.com>; Thu, 15 Oct 2015 09:08:02 -0700 (PDT)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -1.978
X-Spam-Level:
X-Spam-Status: No, score=-1.978 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, FM_FORGED_GMAIL=0.622, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_PASS=-0.001] autolearn=ham
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TcvMH08zeqmB for <webpush@ietfa.amsl.com>; Thu, 15 Oct 2015 09:07:58 -0700 (PDT)
Received: from mail-lf0-f53.google.com (mail-lf0-f53.google.com [209.85.215.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 5AB8C1A9007 for <webpush@ietf.org>; Thu, 15 Oct 2015 09:07:57 -0700 (PDT)
Received: by lfaz124 with SMTP id z124so34324494lfa.1 for <webpush@ietf.org>; Thu, 15 Oct 2015 09:07:55 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=53l1TeA548towAwgbizMq+xeuzCYJPdVUecmnq8RFWY=; b=iBqxw1LJAisTsFtJ0yjm7g2oyGfraK9KQEbmdmayeIoaV/gyG7a7knQuaoKXNeJnA3 wzkW9gmL28JJSAJ3rUhpC9krj1T8XYtz7mFkXan0AUIoxqOVq8D0R0GZqgljGk4515+m PjZgtKJ5+dCO8VRn0O6l1PjOBY33Wc5uptr3yeJlJVM99L/mRgmkcmP7NhQonGIi8Bjc sy6GZWExUW6kucnbodnKGE+faFaIPmlU25BSeUcg7qOYufHd1/TpWoTuKTRviohIxsfM Zx0HHD9fF8HYEDHae26is+YONnpRnrOhYnAOwIZTBGX7xELaHlyl1MR7ZEPWKGybrpeW 14vw==
X-Gm-Message-State: ALoCoQmJWLPMvgmQLMRQkXSnR7QA8sX6zjF50iebnOLg+jGl0/x/gBFrgx3GMnHE9fVa/dRf+af4
MIME-Version: 1.0
X-Received: by 10.180.104.69 with SMTP id gc5mr10834798wib.69.1444925275506; Thu, 15 Oct 2015 09:07:55 -0700 (PDT)
Received: by 10.27.33.18 with HTTP; Thu, 15 Oct 2015 09:07:55 -0700 (PDT)
In-Reply-To: <561ED106.8030806@mozilla.com>
References: <BY2PR0301MB0647111FCF5845E3AA0C244583300@BY2PR0301MB0647.namprd03.prod.outlook.com> <CABkgnnUs_S6aRpTi6H5+d4xpuU1+2G1OKmWCxzczk+DYDWZGSQ@mail.gmail.com> <BY2PR0301MB0647EAE2174E1103EF59A2A083300@BY2PR0301MB0647.namprd03.prod.outlook.com> <CABkgnnUOcuK6p2C5WDaS==nwcYMfnpu1jXKj8oo31css7CFJNg@mail.gmail.com> <561EC47C.4090803@mozilla.com> <CABkgnnUHF1Z0expqJmggyYxnJm-EUU5x97JUo7=NhjhRDUVWvA@mail.gmail.com> <561ED106.8030806@mozilla.com>
Date: Thu, 15 Oct 2015 09:07:55 -0700
Message-ID: <CABp8EuLoOx_Vda_A+6bcs27q3erRR0+eHWC0DS_JB3fzgoniow@mail.gmail.com>
From: Benjamin Bangert <bbangert@mozilla.com>
To: jr conlin <jconlin@mozilla.com>
Content-Type: multipart/alternative; boundary="f46d043bdbe6c643f0052226e1ee"
Archived-At: <http://mailarchive.ietf.org/arch/msg/webpush/qlEwm2909d6o7NDgSlNzoOnixgQ>
Cc: Martin Thomson <martin.thomson@gmail.com>, "webpush@ietf.org" <webpush@ietf.org>
Subject: Re: [Webpush] Message expiration (TTL) and Negative Acknowledgements
X-BeenThere: webpush@ietf.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: Discussion of potential IETF work on a web push protocol <webpush.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/webpush>, <mailto:webpush-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/webpush/>
List-Post: <mailto:webpush@ietf.org>
List-Help: <mailto:webpush-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/webpush>, <mailto:webpush-request@ietf.org?subject=subscribe>
X-List-Received-Date: Thu, 15 Oct 2015 16:08:02 -0000

So, nacking in the case that we have to clear a client's notifications (too
many) feels like it can cause a really nasty infinite loop error.

Here's the situation I'm seeing:
1. User hits limit on the most queued messages the Push Service wishes to
hold at once for a single client.
2. On the next incoming notification, Push Service clears out the client's
notification queue to make space for new notifications. (I believe GCM
already will drop a bunch of notifications at once when this happens)
3. We send out NACK's for all the dropped notifications
4. App-Servers get nack's and decide to resend notifications.
5. Go to step 1.

What steps are being taken with NACK's to ensure an app-server doesn't do
something like this? Is there going to be some status code or something to
indicate that these messages shouldn't be retried for some period of time?

Or is it going to be up to a Push Service to try and detect these loops,
and when they occur, the Push Service is just going to have to fully expire
all the clients subscriptions to stop the loop?

On Wed, Oct 14, 2015 at 3:02 PM, jr conlin <jconlin@mozilla.com> wrote:

> On 10/14/2015 2:37 PM, Martin Thomson wrote:
> > On 14 October 2015 at 14:09, JR Conlin <jconlin@mozilla.com> wrote:
> >> 429: This will allow the server to apply "back pressure" to the
> >> application service in cases where there may be too many incoming
> >> messages in a short period of time. This response would carry a
> >> RETRY-AFTER response header indicating the number of seconds that should
> >> elapse before the remote server should retry transmission of the
> message.
> >
> > How is that different from 503?
>
> Traditionally (as if that's a thing for the web) 503 tends to be used by
> intermediary services like load balancers to indicate that "something's
> amiss with the box I normally talk to". Since it's a 500 class error, it
> indicates an error state possibly from outside the server. 429 was
> identified as part of https://tools.ietf.org/html/rfc6585 to be used
> more as a rate limiter and carries with it the "Retry-After" response
> header indicating how long the requester should wait before retry. It's
> a 400 class error, which means it should come from the responding server.
>
> Either would work, of course, but it may be that programmers can take
> advantage of pre-existing handlers in libraries to do the back-off for
> them, rather than have to code the response themselves.
>
> _______________________________________________
> Webpush mailing list
> Webpush@ietf.org
> https://www.ietf.org/mailman/listinfo/webpush
>