The platform gateways
Push does not go straight to a phone. It goes through a platform gateway: APNs for Apple and FCM for Android and web. Your service authenticates, submits a payload addressed by token, and the gateway delivers to the device.
Authentication and connections
- APNs uses token based auth over a persistent HTTP connection, favoring long lived connections for throughput.
- FCM uses service credentials and an HTTP API, often with batching helpers.
Keeping connections warm matters because handshake cost per message would dominate at scale.
Payload and limits
Each gateway caps payload size and offers fields for sound, badge, and priority. High priority pushes can wake a device; normal ones may be coalesced by the OS to save battery.
Feedback handling
Gateways return status synchronously and, for FCM, can report canonical or unregistered tokens. The service uses this to prune and to record delivery outcomes.
Key idea
APNs and FCM are platform gateways that authenticate sends, deliver payloads by token, and return feedback used to prune tokens.