01
The Challenge
The existing app polled the server every few seconds per user to check for new notifications, which worked at low volume but started overwhelming the database as the user base grew.
02
The Approach
1
Replaced polling with a WebSocket-based push architecture using Socket.io and a dedicated Node.js real-time service.
2
Introduced Redis Pub/Sub to broadcast events across multiple app server instances so notifications work correctly behind a load balancer.
3
Added delivery guarantees with a fallback queue for offline users, so notifications are never silently lost.
4
Built connection health monitoring to detect and gracefully reconnect dropped WebSocket sessions.
03
The Outcome
Notification-related database load dropped, and delivery latency went from several seconds to near-instant, with the system now handling significantly higher concurrent users without additional database scaling.