3 ms·
As you know, when terminating a WebSocket connection due to releases CloudFlare now signals this action to both client and origin server by sending the 1001 sta
by pencoyd 10y ago
As you know, when terminating a WebSocket connection due to releases CloudFlare now signals this action to both client and origin server by sending the 1001 status code (aka "going away", see section 7.4.1 of RFC 6455), so both sides are aware that the WebSocket termination is only a transient event, and that they can expect to immediately re-establish a connection again on retry.
We're working on additional refinements to the release process to minimize disruptions.
(I work at CloudFlare.)
- jhgg 10y agoAye! Well aware. I actually think you added that for us specifically! Anyways, it's worth noting for anyone interested that they'll need to be able to handle spikey reconnects. In our case, we keep a buffer of the last N websocket messages sent to the client, and when the client reconnects, it sends the last sequence id that the client saw, and the server catches it up. https://discordapp.com/developers/docs/topics/gateway#resuming https://discordapp.com/developers/docs/topics/gateway#resumi...