Design a Push Notification Personalization System
Published:
๐ฏ Problem
Build a service that sends personalized notifications at the right time and frequency.
Goals:
- increase open/engagement rates
- avoid spam and fatigue
- honor user preferences and compliance rules
๐ Architecture Sketch
flowchart TD; Events["User Events"]-->FeatureStore["Feature Store"]; FeatureStore-->Ranker["Notification Ranker"]; Campaign["Campaign Rules"]-->Ranker; Ranker-->Policy["Policy & Frequency Guard"]; Policy-->Scheduler["Send-Time Scheduler"]; Scheduler-->Provider["APNs/FCM Gateway"]; Provider-->App["Mobile App"];
๐ Decision Points
Rule engine vs ML ranking
- Start with rule+score hybrid for explainability.
- Move to learned ranking when data quality is strong.
Frequency capping
- Global cap (e.g., max 3/day)
- Per-category cap (promo vs transactional)
- Cooldown after dismissals
Quiet hours and timezone correctness
- Store timezone per user
- Schedule send windows locally
- Fall back safely when timezone unknown
๐งช Scoring Inputs
- recency/frequency of relevant activity
- previous open/click behavior
- content category affinity
- predicted fatigue signal
๐จ Failure/Safety Controls
- provider outage -> retry queue with dedupe key
- malformed payload -> validation gate before send
- runaway campaign -> emergency campaign kill switch
๐ Metrics
- delivery rate
- open rate / click-through
- unsubscribe and disable-notification rate
- complaint rate / negative feedback
โ Interview Tip
Say explicitly: optimizing opens alone can hurt long-term retention; include negative-signal metrics in objective function.
Share on
Twitter Facebook LinkedInโ Buy me a coffee! ๐
If you found this article helpful, consider buying me a coffee to support my work! ๐
