Separate channel policies and failures#
Push, email, SMS, and in-app delivery use different providers, limits, urgency, and product semantics. A notification service turns product events into preference-aware jobs, while independent channel workers isolate throughput and provider failures.
Notification
id · user_id · type · channel
template/payload · status · scheduled_at · created_at
UserNotificationPreference
user_id · notification_type · enabled_channelsThe schema is illustrative. Apply provider throttles, retry transient failures with backoff, make sends duplicate-safe where the provider contract allows, and stop after an expiry. A password-reset message whose token expired should not retry forever.
Use these prompts to extend the design. The useful answer is a reasoned change, not a memorized sentence.
- Which channels are urgent versus best effort?
- How are provider callbacks reconciled?
- How are templates versioned and localized?
- What protects one tenant from consuming the provider quota?
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- Probabilistic data typesRedis Documentation