PhysicsWallah · SDE-2 · May 2023 — Jun 2024
Notification Microservice
Centralized NestJS + Redis service cutting notification delivery time by 30%.
Overview
Built for PhysicsWallah's ecosystem, this NestJS microservice acts as the single notification hub across email, push, and in-app channels. Upstream services emit events to Kafka topics; a typed consumer picks them up, loads EJS-rendered templates from MongoDB, checks Redis for rate-limit and deduplication, then dispatches via AWS SES or FCM. Exponential-backoff retry via `async-retry` handles transient failures. The result: a 30% drop in delivery latency and a 40% reduction in server load across the platform.
Workflow
Architecture and data-flow diagram. Click to zoom.