WebSocket.
also: WebSockets · websocket · websockets · web socketA protocol that upgrades an HTTP connection into a long-lived, two-way channel, so server and client can push messages any time.
the two-minute refresher
- Starts as an HTTP request with an Upgrade header, then stays open as a full-duplex connection.
- Use it for chat, live dashboards, multiplayer games and in-app notifications.
- Scaling is the hard part: millions of open connections, and you must route messages to the server holding a user's socket.
- For one-way server push, Server-Sent Events are simpler.