A survey of API communication protocols beyond HTTP — gRPC, MQTT, AMQP, ZeroMQ, Cap'n Proto RPC, WebSockets, SSE, and more.
Most API code is written without a protocol decision. Engineers reach for REST over HTTP because it is what they know, what the framework assumes, and what everyone else uses. That is a reasonable default — but it is still a choice, and like any invisible choice, it has costs.
This book surveys the alternatives: what they are, how they work, where they outperform REST, and where they do not.
Published at https://cloudstreet-dev.github.io/HTTP-Alternatives-for-APIs/
- The Default We Never Questioned
- gRPC — HTTP/2 in a Convincing Costume
- WebSockets and SSE — When You Need the Server to Talk Back
- MQTT and the IoT World
- AMQP and Message Brokers
- ZeroMQ — Messaging Without a Broker
- Cap'n Proto RPC and the Binary Frontier
- Lesser-Known Contenders
- What Nobody Has Tried Yet
- How to Choose — A Decision Framework
Requires mdBook.
cargo install mdbook
mdbook serveThanks to Georgiy Treyvus, CloudStreet Product Manager, whose idea started this book.