Code Room
System designHard
Question
Design an MQTT message broker for an IoT platform with 20M intermittently-connected devices (sensors on cellular links), publishing small telemetry messages and receiving commands. Devices need QoS-1 delivery, persistent sessions across reconnects, and topic-based routing with wildcard subscriptions. Peak 2M messages/sec. How do you build the broker, route messages, and handle the flaky-connection reality?
What a strong answer looks like
Clarify scale and constraints first. Propose a clean component breakdown, then go deep on the hard parts — data model, bottlenecks, consistency, failure modes — and name the trade-offs you are making.
Learn the concepts
Loading whiteboard…
Run or narrate your approach, then ask the coach.