skip to content

In a parcel-tracking app sending high-priority data-only pushes for every list change, 'driver nearby' alerts start arriving late; why, and how should priorities be set?

level: seniorimportance: should knowfreq 42%

answer

  1. priority is a promise to the user
  2. high means something visible follows
  3. the service watches what pushes lead to
  4. background updates go low and few
  5. compare sent and delivered priority

basics

~20 s

High priority is for pushes that end in something the user sees. One service demotes an app whose high-priority pushes rarely do, so its real alerts then wait while the phone sleeps. Send only visible, urgent alerts high.

solid answer

~50 s

Both APNs and FCM treat high priority as a promise that the push will produce something the user sees. On one service, if an app's high-priority messages mostly do not lead to a visible notification, judged over about a week of that app's behaviour on that device, its messages are **demoted to normal priority**, and normal priority waits while the device sleeps. So the list nudges taught the service to distrust the app, and the 'driver nearby' alerts paid for it. The other service expects background updates at low priority and throttles them beyond a few an hour. The fix: high priority only for visible, time-sensitive alerts (driver nearby, signature required); data-only list nudges at normal priority, collapsed and few; and the permission state reported so nothing is sent high to a phone that cannot show it.

go deeper

for a junior

Recall that pushes have a priority, that high priority can wake a sleeping phone, and that it is meant for alerts the user will see.

for a middle

Explain what normal priority does on a sleeping device and assign a priority to each parcel-app push from whether it is visible and time-sensitive.

for a senior

Diagnose demotion from delivered versus original priority, explain the week-long behaviour window, and close the refused-permission route by reporting the permission state.

for a principal

Make priority a reviewed property of every push type so one team's background nudge cannot slow every team's urgent alerts on the same app.

## What priority means to a push service A push service decides not only whether to deliver a message but **when**. A sleeping phone keeps its radio off as long as it can, and waking it costs battery. So both services let the sender say how urgent a message is: - **High priority**: deliver now, waking a sleeping device if needed. Intended for time-sensitive messages the user will see. - **Normal or low priority**: deliver when convenient. On one service a normal-priority message waits while the device is in its deep idle state; on the other, low-priority notifications may be grouped and delivered in bursts. The services do not simply trust the label, because every app would otherwise send everything at high priority. ## Why the 'driver nearby' alerts got slow The app sent a high-priority data-only push every time the shipments list changed. None of those pushes produced anything the user could see. Here is what each service does with that pattern: | | One service | The other service | |---|---|---| | Rule | high-priority messages should result in user-facing notifications | background updates are sent at low priority | | Watching | about 7 days of the app's behaviour, decided per app instance | the total number of background updates | | Consequence | the app's messages may be demoted to normal priority | background updates are throttled; guidance is no more than two or three an hour | On the first service, demotion is not limited to the nudges. Once that app instance is judged to misuse high priority, its genuine visible alerts can also be delivered as normal priority, held until the phone wakes. The customer's phone sits on a desk, idle, and the 'two stops away' alert arrives when they pick it up, after the van has gone. There is a second route to the same result. On that service, if the user has turned notifications off, no notification can ever be shown, so every high-priority message to that device fails the "leads to something visible" test and the app's messages are demoted. ## Setting priorities by what the user will see | Push | Visible | Priority | Why | |---|---|---|---| | Driver is two stops away | yes | high | time-sensitive, worthless if late | | Signature required | yes | high | the user must act before the attempt | | Delivered | yes | high | the user acts on it now | | Delivery window moved to tomorrow | yes | normal | matters within hours, not seconds | | Shipments list changed | no | normal or low, collapsed | a hint; the on-open fetch is the truth | Supporting rules: 1. **Send a data-only push at high priority only if the app will show a notification from it.** A nudge that shows nothing goes at normal priority; if something is urgent, it is urgent for the user, so it ends in a visible notification. 2. **Keep data-only nudges few.** Collapse them under one identifier and stay within a few an hour per device; how the server batches them is the send pipeline's design. 3. **Report the permission state** with the device token, and skip high-priority alerts to devices that cannot show them. 4. **Show the alert from what the push carries.** On one service the processing time after a push is meant only for rendering a notification, and a network call first risks a late or missing alert; how long the app may run is the background-work budget's subject. ## Diagnosing it in production Demotion does not fail loudly. Sends keep succeeding; only timing degrades. Ways to see it: - One service lets the app compare, per message, the **priority it was delivered at** with the **priority it was sent at**. Logging that pair on the device shows demotion directly. - Its aggregate delivery reports give the share of the app's messages that were demoted. - Put the server's send time in the payload and record the arrival time on the device; a growing gap for high-priority alerts while the phone was idle points the same way. Device clocks drift, so treat it as a trend, not a measurement. Because the judgement covers about a week of behaviour, a fix may take days to show: after the nudges move to normal priority, the alerts should recover as the app's recent history looks right again. ## Where this question stops The server's own queues and priority lanes, frequency caps and digests are the notification pipeline's design. Each service's exact priority fields are the vendor's documentation. How long the app may run after a wake is the background-work budget's subject. This question keeps the client-facing promise: high priority is spent only on what the user will see.

  • How would you confirm that demotion, not the network, made the alerts late?
    On the service that demotes, have the app log each message's delivered priority beside its original priority; a high-priority alert delivered as normal is the evidence. Its aggregate reports give the demoted share across all devices. Arrival times measured against a send time in the payload help show the pattern, though device clocks drift.
  • Could the list nudge be turned into a visible notification so it may stay high priority?
    Only by showing the user something they did not need every time any parcel changed, which is noise. Users who get noise turn notifications off, and on one service that also demotes the app's high-priority messages. The nudge should stay data-only at normal priority, collapsed and infrequent.

  • Marking every push high priority makes all of them arrive faster.
  • Priority only orders the server's own queue, not delivery to the phone.
  • A high-priority data-only push is the reliable way to sync in the background.
  • If high-priority pushes are fast in testing, they will stay fast in production.
  • Sending high-priority alerts to a user who turned notifications off is harmless.