Posts Tagged ‘RabbitMQ’
[NodeCongress2021] Push Notifications: Can’t Live With Em, Can’t Live Without Em – Avital Tzubeli
In an era where digital alerts permeate daily rhythms, the orchestration of push notifications embodies a delicate equilibrium between immediacy and reliability. Avital Tzubeli, a backend engineer at Vonage, unravels this dynamic through her recounting of the message bus at the heart of their communications platform—a conduit dispatching 16 million dispatches daily, contending with temporal pressures and infrastructural strains. Drawing from Hebrew folklore, where a louse embarks on a globetrotting odyssey, Avital likens notifications to intrepid voyagers navigating service boundaries.
Avital’s tale unfolds across Vonage’s ecosystem: inbound triggers from Frizzle ingress via RabbitMQ queues, auto-scaling consumers in HTTP services validate payloads, appending trace IDs for audit trails. Continuation Local Storage (CLS-Hooked) embeds identifiers in request scopes, facilitating log enrichment without prop modifications. As payloads traverse to PushMe—Vonage’s dispatch hub—interceptors affix traces to Axios headers, ensuring end-to-end visibility.
This choreography yields sub-15ms latencies: Frizzle to HTTP in milliseconds, thence to PushMe, culminating in device delivery via APNS or FCM. Avital spotlights middleware elegance—CLS-Hooked instances persist contexts, auto-injecting IDs into logs or headers, oblivious to underlying transports.
Architectural Resilience and Observability
Resilience pivots on RabbitMQ’s durability: dead-letter exchanges quarantine failures, retries exponential backoffs temper bursts. Monitoring via Grafana dashboards tracks queue depths, consumer lags; alerts preempt pileups. Avital shares code vignettes—middleware instantiation, trace retrieval, log augmentation—revealing CLS-Hooked’s prowess in decoupling concerns.
For broader applicability, Avital posits analogous buses for event sourcing or microservice fan-outs: RabbitMQ’s ACK semantics guarantee at-least-once semantics, complemented by idempotent handlers. Blaming externalities like Apple for undelivered alerts underscores the perils of third-party dependencies, yet Vonage’s stack—Node.js scripts fueling the frenzy—exemplifies robust engineering.
Avital’s odyssey, though sans parasitic flair, affirms notifications’ global sprint, propelled by vigilant teams and scalable sinews.