Building async public APIs using HTTP/2+ and the Mercure protocol
summary
Mercure is an HTTP/2+ async protocol that uses a Go hub to broadcast messages: a publisher sends one POST and connected browsers use Server-Sent Events to receive updates with reconnection, missed-event refetch and history. It uses JWT for per-user targets, supports URI-templated topics and patterns, falls back to HTTP/1, and claims ~95% HTTP/2 coverage. Deploy options include a Helm chart, automatic Let’s Encrypt TLS, a managed service and language libraries; reference hub is fast and production-ready.
AI-written summary · about
chapters (18)
- 0:00Mercure protocol intro
- 2:13Async APIs for browsers
- 3:57Polling vs WebSocket limits
- 6:29Server-Sent Events better
- 7:33WebSocket vs SSE comparison
- 9:39HTTP/2 replaces WebSocket
- 12:08Introducing Mercure
- 14:41Mercure features
- 15:43How Mercure hub works
- 16:32HTTP/2 improves Mercure
- 19:24Publishing with Mercure
- 20:51Browser subscribing to updates
- 21:35Mercure topic patterns
- 23:44Mercure JWT auth
- 25:49Deploying Mercure Hub
- 27:17Mercure in tools
- 28:22Async APIs with API Platform
- 29:23Mercure in AsyncAPI
related talks
50mHigh-performance web apps using HTTP/2
57mManaging Asynchronous APIs
24mEmbracre HTTP2 Server Push
25mApplying CloudEvents to Level up Application Communications
18mHTTP/2 For Me & You
55mGive it a REST - Tips for designing and consuming public API's
39mReal-time Notifications and Private Messaging in Drupal Using Mercure.rocks
01h 27mHTTP/2 for the Web developer
