Introduction

Chatty provides live chat for e‑commerce sites. They needed to handle sudden spikes during sales events. This case study shows how they scaled WebSocket connections on Hostxpeed.

The Scaling Need

During Black Friday, client stores see 10x user spike. Previous WebSocket server (Node.js on single VPS) capped at 50k concurrent connections.

Hostxpeed Architecture

10 x NVME-3 VPS ($49.99 each) running Node.js WebSocket servers. HAProxy (NVME-2) for load balancing with least‑conn algorithm. Redis (on separate NVME-3) for pub/sub between servers. Each WebSocket server handles 100k connections (optimised with cluster module).

Performance Results

Total capacity: 1 million concurrent WebSocket connections. Message latency under 50ms p99. During a flash sale, they served 680k concurrent users without degradation.

Cost Efficiency

Total monthly cost: $549.90 (10 x $49.99 + $24.99 for LB). AWS equivalent (Network Load Balancer + 10 c5.large) would exceed $2,000. Savings: 72%.

Lessons Learned

Used Hostxpeed private networking to reduce inter‑server latency. Implemented sticky sessions via HAProxy cookie. Auto‑scaling script adds WebSocket servers when connection count exceeds 80%.

Conclusion

Chatty now guarantees scalability for any client campaign. Hostxpeed’s high‑bandwidth VPS and load balancer made it possible.