System Design · Middle · Question 19 of 75
What should be handled when a WebSocket reconnects?
- ✓Correct answer: Backoff, resubscribing and fetching what was missed
- 2Instant reconnection in a loop with no pauses
- 3Reloading the page on every connection drop
Explanation
Instant retries from thousands of clients will finish off a recovering server. After reconnecting, the client resubscribes to channels and requests events since the last received id. The UI shows the connection status.