← Lessons

quiz vs the machine

Platinum1750

System Design

The APNs And FCM Gateways

How platform push gateways accept messages and report delivery feedback.

6 min read · advanced · beat Platinum to climb

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.

Check yourself

Answer to earn rating on the learn ladder.

1. Why keep gateway connections warm?

2. What does gateway feedback let the service do?

3. Which gateway serves Apple devices?