We're investigating alert pushes (priority 10, mutable-content, short expiration) that occasionally arrive 2-4 minutes late, usually around a cellular -> Wi-Fi handover. The provider gets HTTP 200 immediately.
What we've observed with the APNs logging profile:
- apsd logs mention "dual channel is enabled" and "Connected on N interfaces", and per-interface states for WWAN and NonCellular.
- When we silently break the device's push connection (no RST), the device notices via a keep-alive timeout, reconnects (falling back to 443 when 5223 is blocked), and pending pushes arrive within ~0.3s of the new connection.
- In the field, a push sent later can arrive first: push 1 is held ~2-3 minutes while push 2, sent ~60s after it, arrives over Wi-Fi in ~2s.
Questions:
- Can a device hold APNs connections over cellular and Wi-Fi at the same time, and if so, how does APNs choose which one to deliver a push on?
- If a push was sent on one connection and isn't acknowledged, does APNs keep retrying on that same connection until it times out, or does it move the push to another live connection for the same device?
- What is the retry/backoff behaviour for an unacknowledged push (intervals, any jitter, the timeout before it's re-queued), and does that schedule reset when the device opens a new connection?
- On the device side, how does apsd back off between reconnect attempts after consecutive failures, and can anything (for example network changes) cut that wait short?
- Anything a provider can do to reduce this (for example apns-expiration choices), or is this expected best-effort behaviour?
Separate from the questions:
I've been genuinely impressed by how resilient the push connection is. Even when I silently killed the connection, the device noticed, fell back to another port, and APNs delivered the pending pushes within a fraction of a second of reconnecting. It's an amazing piece of engineering and I wish I got to see behind the curtain.