Design Candidate Saved-Search Alerts
Design saved job searches that match new listings and deliver retry-safe immediate alerts or daily digests.
Problem statement
For this exercise, assume a job-search platform lets candidates save a search and receive alerts when newly indexed or materially updated jobs match it. Candidates can create, update, pause, resume, and delete saved searches.
Each active search chooses either immediate delivery or one daily digest at the candidate's local send time, plus exactly one delivery channel: email or push. The system must not deliver the same job more than once for the same candidate and saved search, even when matching or delivery retries.
Each downstream provider accepts a caller-supplied idempotency key and supports status lookup by that key. Your system owns durable alert intent, retry, deduplication, and delivery status, but not provider internals.
Assume one deployment region with availability-zone failure tolerance; multi-region active-active delivery is out of scope. Design the feature end to end and be prepared to compare event-driven incremental matching with periodic full rescans.
What to build
- Candidates can create, update, pause, resume, and delete saved searches with an immediate or daily delivery preference and local send time.
- Candidates with active saved searches receive eligible matches for newly indexed or materially updated jobs within the selected cadence and freshness targets.
- A candidate receives a given job at most once for one saved search, even across matching, queue, worker, and provider retries.
- Candidates receive either immediate alerts or one bounded daily digest through their selected channel and can observe current delivery status.
At scale
- Assume 10 million candidates and 30 million active saved searches.
- Assume 5 million newly indexed or materially updated jobs per day, with peaks of 20,000 job-index events per second.
- Immediate matches should become eligible for delivery within five minutes for 99 percent of matching jobs.
- Daily digests may complete within two hours of each candidate's chosen local send time.
- Accepted alert intent must survive one availability-zone failure within the single deployment region.