Design Firebase Cloud Messaging Fan-Out to Billions of Devices
Last updated: November 29, 2026
Quick Overview
Design a push messaging platform like Firebase Cloud Messaging that lets app developers send messages to single devices, topics with millions of subscribers, and device groups, delivering to Android devices over persistent connections.
0
0
0 solved
Design a push messaging platform like Firebase Cloud Messaging that lets app developers send messages to single devices, topics with millions of subscribers, and device groups, delivering to Android devices over persistent connections.
This shows up in Google system design rounds for infrastructure teams because FCM is a shared platform with billions of mostly idle connections and a few enormous topic sends. The interviewer wants connection management at scale, topic fan-out without hot spots, and honest delivery semantics for offline devices.
What the Interviewer Expects
- Design the persistent connection tier and how a message finds the right connection server
- Explain topic fan-out for a topic with 100M subscribers without overloading one partition
- Define storage and expiry (TTL) for messages to offline devices
- Discuss priority, collapse keys and battery constraints on Android
- Cover per-developer quotas and abuse protection
Key Topics to Cover
How to Approach This
- Start by clarifying functional and non-functional requirements with the interviewer.
- Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
- Draw a high-level architecture first, then deep dive into 1-2 critical components.
- Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
- Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
- How do you route a message when the device reconnects to a different data center?
- How do you report delivery metrics back to developers?
- How would you send a breaking-news alert to 200M devices in under a minute?
- What changes for iOS where you must go through APNs?
Sharpen Your Skills on Codemia
Practice similar problems with our interactive workspace, get AI feedback, and track your progress.
Practice System Design ProblemsSample Answer
Requirements
Functional: send to a registration token, a topic, or a device group; messages have priority (high or normal), TTL, and an optional collapse key; developers get delivery stats.
**Non-functional:*...
High-Level Design
- Send API (frontend): authenticates the developer, applies quotas, writes the request to a durable log.
- Connection servers (CS): hold long-lived TLS connections from Google Play services on...