System Design · Senior · Question 62 of 75
After a WebSocket server outage, all clients reconnect at once and knock it over again. How do you prevent this?
- ✓Correct answer: Reconnect with exponential backoff and random jitter, and let servers reject excess connections gracefully
- 2Reconnect every 100 ms until it works
- 3Never reconnect automatically
Explanation
It's a thundering herd. Spreading reconnects over time lets the service recover.