Design a Time-Zone-Aware Birthday Notification Service
Send one birthday email in each recipient's local day despite retries, outages, and time-zone changes.
Problem statement
For this exercise, assume each recipient has a birthday, IANA time zone, consent state, and email template choice. The service should send one birthday email during a configured local-time window, never before the recipient's local birthday, and must tolerate scheduler, worker, and provider failures.
Profile or time-zone changes may race with scheduling, provider calls may time out after accepting a message, and leap-day birthdays need a declared policy. Design eligibility, local-time scheduling, deduplication, delivery, retry, reconciliation, suppression, and audit.
Exclude campaign authoring and general-purpose marketing automation.
What to build
- Profile, time zone, consent, and leap-day policy determine one versioned birthday occurrence.
- Eligible recipients are scheduled inside the configured local-time window and never before their local birthday.
- Retries and ambiguous provider outcomes do not create duplicate user-visible birthday emails.
- Consent withdrawal suppresses uncommitted delivery and every decision remains auditable.
At scale
- Assume 100 million recipient profiles across all IANA time zones.
- Support five million eligible birthday occurrences on the busiest calendar date.
- Begin each delivery within a two-hour local-time window.
- Retain occurrence and provider-reconciliation evidence for one year.