Web Development
Application Development
UI/UX Design
DevOps Consulting
Cloud Services
Blockchain Development
QA & Testing
Support & Maintenance
Ecommerce
Fintech
Real Estate
Healthcare
Logistics
Education
Fitness
Travels & Hospitality
73, Swashray Soc, Diwali Baug, Athwa Gate, Surat- 395001,
Guj- Bharat.
Back to Articles
BotNET IT Team
November 24, 2025
4 min read
We built a real-time notification system for a client dashboard. WebSockets on localhost: instant updates, zero issues. Deployed to production: connections established, then died after exactly 60 seconds.
Not a code bug—the same build worked locally. Not authentication—the handshake completed successfully. Not SSL—wss:// connected fine.
Our load balancer had a default idle timeout of 60 seconds. WebSocket connections are long-lived HTTP upgrades. The LB treated them as idle HTTP connections and cut them off.
We increased the load balancer idle timeout for WebSocket routes and enabled sticky sessions so reconnections hit the same backend instance. We also added client-side heartbeat pings every 30 seconds as a safety net.
Infrastructure defaults are designed for request/response traffic, not persistent connections. Always check proxy, load balancer, and CDN timeout settings when deploying WebSockets or SSE.
Tags: