Design Flight Price Threshold Alerts
Track route-and-date flight prices and send reliable email alerts when a subscriber's threshold condition is met.
Problem statement
For this exercise, assume travelers create an alert for an origin, destination, travel date, currency, and maximum acceptable price. The platform ingests normalized itinerary price updates, evaluates active alerts, and sends one email when a qualifying price is observed.
Delivery retries must not produce repeated user-visible alerts for the same qualifying episode, and users can pause or delete subscriptions. Flight search, booking, fare prediction, and email-provider implementation are outside scope.
Design ingestion, subscription indexing, matching, notification state, retries, and operational delivery. Also explain how teams test, deploy, observe, and safely roll back changes to matching and notification behavior.
What to build
- Travelers create, pause, list, and delete route/date/currency price-threshold subscriptions.
- The service evaluates normalized itinerary price updates against active subscriptions.
- A qualifying episode produces one durable email notification with retry and visible delivery status.
At scale
- For this exercise, assume 100 million active alerts and 5 million normalized itinerary price updates per minute at peak.
- For this exercise, notify 99% of matching subscribers within five minutes of accepting a qualifying update.
- For this exercise, retain active alert state for one year and notification history for 90 days.
- For this exercise, price updates may be duplicated or arrive out of order by up to ten minutes.