WebSockets
websocket, ws, wss, real-timeDefinition
A long-lived, two-way connection between a browser and a server, opened by an HTTP upgrade and then free of HTTP’s request-and-response shape — either side sends a message whenever it has one, which is what a live scoreboard, a chat, or a collaborative cursor needs and what polling only imitates
Standardized by the IETF (RFC 6455) with the browser API from the WHATWG. This site’s scoreboard streams over one, at /_ws/scoreboard, through Nitro’s WebSocket support (crossws); the other live surface, the AI chat, streams over Server-Sent Events instead, which is one-way and enough. The trade: a socket is state the server must hold per reader, which is the thing load balancing wants gone, so sockets need sticky sessions or a shared broker once there are two instances.
HTTP asks and is answered; a socket talks. The first is right for almost everything, which is why the second is worth the trouble only where a reader would otherwise be refreshing.