WebSocket vs SSE vs polling, reconnection with backoff and jitter, heartbeats, backpressure, message ordering, connection state UI, auth on upgrade, graceful degradation
94
98%
Does it follow best practices?
Impact
90%
1.87xAverage score across 5 eval scenarios
Passed
No known issues
{
"instruction": "Configure heartbeats to detect dead connections and prevent proxy timeouts",
"relevant_when": "Agent implements WebSocket, SSE, or real-time server endpoints that maintain persistent connections",
"context": "Proxies and load balancers close idle connections after 60 seconds. Without heartbeats, connections silently die and clients never know. The server must send periodic heartbeats (every 30 seconds) and detect clients that fail to respond.",
"sources": [
{
"type": "file",
"filename": "skills/realtime-web-patterns/SKILL.md",
"tile": "tessl-labs/realtime-web-patterns@0.2.0"
}
],
"checklist": [
{
"name": "server-sends-heartbeats",
"rule": "Server sends periodic heartbeats at least every 30 seconds. For SSE, send comment lines (': heartbeat'). For WebSocket, send ping frames. For Socket.IO, configure pingInterval.",
"relevant_when": "Agent implements real-time server endpoint"
},
{
"name": "dead-client-detection",
"rule": "Server detects and removes clients that do not respond to heartbeats (e.g., checking a pong response flag, or checking writableEnded for SSE)",
"relevant_when": "Agent implements raw WebSocket or SSE server with client tracking"
}
]
}evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
skills
realtime-web-patterns
verifiers