๐Ÿ”Œ API Patterns and Practices: WebSockets
Home Chapters Examples Diagrams Bibliography GitHub โ†—
Home / Performance & Optimization
Part 5 2 chapters

Performance & Optimization

Binary Protobuf framing over WebSockets, and the throughput work that follows once a socket carries real load.

Chapter 19

Binary Protobuf over WebSockets

A binary Protobuf encoding of the same message, negotiated by subprotocol, about 40 percent smaller than the JSON text frame.

12 min readRead โ†’
Chapter 20

Optimizing Throughput

Four throughput levers on a socket server: encoding, batching, permessage-deflate and size limits, and how to measure them.

18 min readRead โ†’
โ† Previous part Production Concerns Next part โ†’ Testing, Debugging & Observability

API Patterns and Practices: WebSockets

Designing WebSocket APIs well, with runnable examples in Quarkus WebSockets Next and Python FastAPI/websockets against one AsyncAPI 3 contract, fanned out through a live handling-event feed.

Site

  • Chapters
  • Examples
  • Bibliography

Reference

  • RFC 6455 โ†—
  • AsyncAPI โ†—
  • MDN WebSocket API โ†—
  • View on GitHub โ†—
  • Issues โ†—
Open source ยท MIT Last built 2026-11-09