Design Emergency Earthquake Alerts Delivered to Android Phones
Last updated: November 29, 2026
Quick Overview
Design an Android earthquake alert system that detects shaking from phone accelerometers and official seismic networks, estimates the epicenter and magnitude, and warns users in the affected area seconds before strong shaking arrives.
0
0
0 solved
Design an Android earthquake alert system that detects shaking from phone accelerometers and official seismic networks, estimates the epicenter and magnitude, and warns users in the affected area seconds before strong shaking arrives.
This mirrors a real Android safety feature and is a demanding Google onsite question because the latency budget is seconds, the input is noisy crowdsourced sensor data, and false alarms are very costly. The interviewer looks for end-to-end latency reasoning and careful false-positive control.
What the Interviewer Expects
- Use phones as sensors with on-device trigger detection to avoid streaming raw data
- Aggregate triggers by region on the server to detect a quake and estimate parameters
- Compute who should be warned and push within a second or two
- Bypass normal notification throttling and Do Not Disturb safely
- Explain false-alarm safeguards and staged confidence
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 distinguish a quake from a truck passing or a phone being dropped?
- How do you handle a region with few Android phones?
- What are the privacy implications of using location for sensing?
- How do you test a system that rarely fires?
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: detect earthquakes of magnitude 4.5 and above; estimate epicenter and magnitude; send 'Be aware' alerts for light shaking and 'Take action' alerts for strong shaking; integrate officia...
High-Level Design
- On-device detector: when a phone is stationary and charging (to reduce noise), a lightweight model on the accelerometer detects P-wave-like signals and sends a tiny trigger `(coarse location cel...