Notification system

hunchboard

Push, email and SMS from one place: templates, preferences, retries and no duplicates.

Comments

    What is on this board

    Parts

    • Any service Service
    • Notifications API Service
    • Preferences and templates Relational DB
    • Per person Rate limiter
    • One queue per channel Message queue · SQS
    • Push workers Worker pool
    • Email workers Worker pool
    • SMS workers Worker pool
    • APNs and FCM External API
    • Email Email / SMS / push · Resend
    • SMS Email / SMS / push · Twilio
    • Failed Dead-letter queue
    • What was sent Audit log
    • At least once, deduplicated Decision record

    How they connect

    • Any service → Notifications API: order shipped
    • Notifications API → Preferences and templates: does she want this?
    • Notifications API → Per person: too many today?
    • Notifications API → One queue per channel: send
    • One queue per channel → Push workers: push
    • One queue per channel → Email workers: email
    • One queue per channel → SMS workers: sms
    • Push workers → APNs and FCM: send
    • Email workers → Email: send
    • SMS workers → SMS: send
    • Push workers → Failed: gave up
    • Push workers → What was sent: sent

    Notes and decisions

    • Any service: Says what happened, not how to tell people
    • Per person: Nobody wants 50 pushes
    • What was sent: Also the idempotency key
    • At least once, deduplicated: Providers fail, so we retry. An idempotency key per notification stops the second copy.

    More like this