Merge lp:~ralsina/ubuntu-push/server-limits-doc into lp:ubuntu-push/automatic

Proposed by Roberto Alsina
Status: Merged
Approved by: Roberto Alsina
Approved revision: 353
Merged at revision: 352
Proposed branch: lp:~ralsina/ubuntu-push/server-limits-doc
Merge into: lp:ubuntu-push/automatic
Diff against target: 50 lines (+43/-0)
1 file modified
docs/_common.txt (+43/-0)
To merge this branch: bzr merge lp:~ralsina/ubuntu-push/server-limits-doc
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+241948@code.launchpad.net

This proposal supersedes a proposal from 2014-11-13.

Commit message

Add section describing limitations of the server API

Description of the change

Add section describing limitations of the server API

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'docs/_common.txt'
2--- docs/_common.txt 2014-10-09 16:06:52 +0000
3+++ docs/_common.txt 2014-11-17 12:23:20 +0000
4@@ -185,3 +185,46 @@
5 :clear_pending: Discards all previous pending notifications. Usually in response to getting a "too-many-pending" error.
6 :replace_tag: If there's a pending notification with the same tag, delete it before queuing this new one.
7 :data: A JSON object.
8+
9+Limitations of the Server API
10+-----------------------------
11+
12+The push notification infrastructure is meant to help ensuring timely
13+delivery of application notifications if the device is online or
14+timely informing the device user about application notifications that
15+were pending when the device comes back online. This in the face of
16+applications not being allowed to be running all the time, and
17+avoiding the resource cost of many applications all polling different services
18+frequently.
19+
20+The push notification infrastructure is architected to guarantee at
21+least best-effort with respect to these goals and beyond it, on the
22+other end applications should not expect to be able to use and only
23+rely on the push notification infrastructure to store application
24+messages if they want ensure all their notification or messages are
25+delivered, the infrastructure is not intended to be the only long term
26+"inbox" storage for an application.
27+
28+To preserve overall throughput the infrastructure imposes some limits
29+on applications:
30+
31+ * message data payload is limited to 2K
32+
33+ * when inserted all messages need to specify an expiration date after
34+ which they can be dropped and not delivered
35+
36+ * an application is limited in the number of messages per token
37+ (application/user/device combination) that can be undelivered/pending at the
38+ same time (100 currently)
39+
40+replace_tag can be used to implement notifications for which the newest
41+one replace the previous one if pending.
42+
43+clear_pending can be used to be deal with a pending message limit
44+reached, possibly substituting the current undelivered messages with a
45+more generic one.
46+
47+Applications using the push notification HTTP API should be robust
48+against receiving 503 errors, retrying after waiting with increasing
49+back-off. Later rate limits (signaled with the 429 status) may also come
50+into play.

Subscribers

People subscribed via source and target branches