Heads up: this is a cautionary tale with actual numbers.
Client on my KnownHost 4GB plan wants live chat for "massive flash sale." I install self-hosted chat app. Pro tip: WebSocket connections are not free.
The math they dont teach you:
- 1 Apache worker ≈ 15MB RAM
- 1 WebSocket connection ≈ 0.5MB but never releases until close
- My plan: 50 concurrent process limit
- Chat alone hit 47, everything else 503
What I tried:
1. Move chat to subdomain chat.example.com
2. Point to GreenCloudVPS free tier VM (separate from main store)
3. Use Redis pub/sub between nodes so agents see all rooms
Still weeping. 2000 "active users" = maybe 400 actual WebSocket, but my stack cant tell difference.
What community wisdom says (I havent done yet):
- Offload to managed chat service (CloudCone has websocket proxy?)
- Use CDN for static, keep sockets on minimal origin
- Consider SSE instead of WS for one-way updates
Anyone solved this on budget hardware? Client expects "Amazon-level" on $15/month.