-
Notifications
You must be signed in to change notification settings - Fork 262
Open
Description
Background / Epic: #3630
Observed behavior
- The connection could timeout from becoming idle causing Cloudflare and/or Google Load Balancer to close the connection
Expected behavior
- We send periodic messages that will keep the connection alive
- The periodicity should be easily configurable, and should default to 25 seconds initially
- A bonus would be to limit these messages to only occur if any other messages hadn't been sent during the period timeframe
User-facing consequences
- Without these messages, we'd need to rely on connection handling to keep reopening the connection which could cause unnecessary overhead
Additional information
- Addressing this first will help us iterate and be sure that nothing else is needed to keep the connection alive, before adding defensive handling to the frontend to keep it connected
- I'm unsure if we also need the server side to respond to these messages to keep the connection alive
Steps to reproduce the issue
- Open a channel on the websocket server https://websockets.studio.learningequality.org/ (note: seems like it's no longer connecting)
- Open the JS console
- Observe leaving it idle, then performing edits, causes error about connection being closed