WebSocket Keep-Alive

Keep the socket alive by matching the server ping cadence and reply window.

Ping
Every 30 seconds
Timeout
Disconnect after 60 seconds
Clients
Long-lived consumers

Connection Guide

Keep-alive

The server sends ping frames every 30 seconds. Clients that do not answer within 60 seconds are disconnected.

JavaScript
// Send a ping to keep connection alive
ws.send(JSON.stringify({ op: "ping" }));
// Server responds with:
// {"type": "pong"}

Keep exploring WebSocket