Need help with your APIs? I offer API discovery, governance & evangelism services. Explore services →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

WebSockets

WebSocket is a communication protocol, standardized by the IETF as RFC 6455 and maintained as a living standard by the WHATWG, that provides full-duplex communication channels over a single TCP connection, enabling real-time, bidirectional data exchange between client and server.

WebSockets is a communication protocol — standardized by the IETF as RFC 6455 and maintained as a living standard by the WHATWG — that opens a single, long-lived, full-duplex channel over one TCP connection. After a client and server complete an HTTP-based handshake and “upgrade” the connection, either side can send messages at any time without the request/response ceremony that HTTP normally imposes. That makes it the default choice when you need low-latency, two-way data to flow between a browser or client and a server.

  • Full-duplex - Client and server can both send at will over the same connection, rather than the client always having to ask first.
  • HTTP upgrade handshake - The connection starts as an ordinary HTTP request and upgrades in place, so it traverses existing web infrastructure.
  • Persistent connection - One connection stays open for the session, avoiding the overhead of repeated polling.
  • wss:// transport security - Run over TLS, WebSocket traffic is encrypted just like HTTPS.

In real API operations WebSockets is the workhorse behind live dashboards, chat, collaborative editing, market data feeds, and streaming responses — anywhere a client needs the server to push. It is also where API governance gets harder: because it is event-driven rather than resource-oriented, it does not fit an OpenAPI contract, which is exactly why AsyncAPI exists to describe it. As agent-facing and streaming interfaces grow, WebSockets remains one of the core real-time transports a well-rounded API program has to describe, secure, and govern alongside its request/response surfaces.

Referenced on the API Evangelist blog

Where this standard shows up across sixteen years of my writing at apievangelist.com — how it fits into API design, governance, and the agentic turn.