Notifications Cheat Sheet
Key concepts, trade-offs, and quick-reference notes for your interview prep.
Three Priority Tiers, Three Physical Queues
#1💡 One shared queue with a priority field is the classic wrong answer. Physical isolation per tier is the fix.
Scale Math: 10B/day to Gateway Fleet Size
#2💡 Derive the fleet from concurrency (rate x latency), not from raw QPS. 580K/sec x 50ms = 29K in flight.
Device Token Lifecycle and the 410 Feedback Loop
#3💡 410/Unregistered responses are permanent errors: route them to token pruning, never to retry.
At-Least-Once + Deterministic Idempotency Keys
#4💡 Random UUIDs as idempotency keys are a bug: retries mint new keys. Hash the event identity instead.
Coalescing Windows + Provider Collapse Keys
#5💡 Coalescing is a latency trade: up to 120s added to collapsible types. Classify types explicitly.
Per-User Daily Budgets (Fatigue Control)
#6💡 Opt-out is the real cost function. Past ~2 marketing pushes/day, disable rates climb sharply.
Two-Stage Campaign Fanout
#7💡 Chunk size balances checkpoint granularity vs message overhead. 10K users/chunk is the sweet spot.
Gateway Backpressure: Circuit Breakers + Retry Topics
#8💡 Push has no alternative carrier: only Apple delivers to iPhones. Redundancy is across channels, not providers.
Quiet Hours: Local Time, Deferred Not Dropped
#9💡 Order matters: defer first, budget-check at release. Otherwise deferred messages double-draw budgets.
The Five Metrics That Matter
#10💡 Opt-out rate is the metric nobody dashboards until it is too late. A push disabled is a user lost.