Design an APNs and FCM Push Gateway That Survives Token Churn

Last updated: November 29, 2026

Quick Overview

Design Meta's internal gateway that every product uses to send push notifications to iOS and Android devices, handling invalid tokens, provider throttling, and multiple Meta apps per device.

Meta
System Design
Software Engineer
Meta
November 29, 2026
Software Engineer
System Design Round
System Design
Hard

0

0

0 solved


Design Meta's internal gateway that every product uses to send push notifications to iOS and Android devices, handling invalid tokens, provider throttling, and multiple Meta apps per device.

Meta runs several apps (Facebook, Instagram, Messenger, WhatsApp, Threads) that all depend on one push infrastructure. The interviewer looks for connection management to external providers, token lifecycle, backpressure, and per-app isolation so one app's burst does not starve another.

What the Interviewer Expects
  • Model device tokens and their lifecycle per app
  • Maintain pooled persistent connections to APNs and FCM
  • Apply per-app and per-priority quotas with backpressure
  • Handle provider responses (invalid token, throttle, retry)
  • Report delivery outcomes back to callers
Key Topics to Cover
Connection pooling
Backpressure
Token registry
Priority queues
External dependencies
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • How do you clean up tokens for uninstalled apps without false positives?
  • What if APNs latency spikes in one region?
  • How do you guarantee security alerts get through during a marketing burst?
  • How do you collapse multiple pushes for the same thread?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Functional: API send(app_id, user_id, payload, priority, collapse_key, ttl). Resolve user to devices for that app, send to the right provider, return or log results. Register and unregister toke...

High-Level Design
  • Token registry: (app_id, user_id) -> [device_id, token, platform, last_refresh, status], sharded by user.
  • Ingress API validates, assigns a push id, and writes to a per-app, per-priority ...

Submit Your Answer
Markdown supported