Design a natural-disaster notification system
Company: Expedia
Role: Software Engineer
Category: System Design
Difficulty: hard
Interview Round: Onsite
## Scenario
You work for a vacation-rental / homestay platform. You need to design a **natural-disaster notification system** that alerts affected hosts and guests.
## Available data sources / APIs
- **Third-party disaster API**: returns impacted regions and/or incident metadata (e.g., wildfire, flood, earthquake) and can be queried periodically.
- **Geo API**: can help construct/normalize polygons (e.g., convert shapes, simplify, validate).
- **Internal APIs / data** (or databases) to retrieve:
- Properties (latitude/longitude, address, status)
- Hosts
- Guests
- Bookings/orders (stay dates, property id, guest contact)
## Core problem to solve
1. Given one or more **impacted polygons** (possibly large, many, and updated over time), **efficiently find all impacted properties**.
2. From impacted properties, find **impacted bookings** for relevant time windows (e.g., bookings overlapping the incident period).
3. Send **notifications** (email/SMS/push) to the right parties (host/guest), with deduplication and the ability to re-notify on material updates.
## Requirements to address
- Scale: potentially **millions of properties** and **many concurrent incidents**.
- Accuracy: avoid missing impacted properties; reduce false positives.
- Timeliness: near-real-time or bounded delay (define target SLOs).
- Reliability: retries, idempotency, audit trail.
- API and data design: endpoints, schemas, and how you store incidents/polygons.
- Discuss trade-offs (batch vs streaming, precomputation vs on-demand), and how you would test/monitor the system.
Quick Answer: This question evaluates system design competencies including large-scale geospatial data processing, spatial indexing, event-driven notification pipelines, API and data modeling, reliability, observability, and trade-off analysis for scalability, timeliness, and accuracy, and it is commonly asked to assess a candidate's ability to reason about real-world constraints when designing resilient, high-throughput user-facing services. The domain is system design and distributed systems with a strong emphasis on geospatial processing and data engineering, and the level of abstraction is primarily high-level architectural thinking balanced with practical implementation and operational considerations such as SLOs and idempotency.