Mercure in a Few Words
Mercure is an open solution for real-time communications designed to be fast, reliable and battery-efficient. It is a modern and convenient replacement for both the Websocket API and the higher-level libraries and services relying on it.
Mercure is especially useful to add streaming and asynchronous capabilities to REST and GraphQL APIs. Because it is a thin layer on top of HTTP and SSE, Mercure is natively supported by modern web browsers, mobile applications and IoT devices.
A free (as in beer, and as in speech) reference server, a commercial High Availability version and a hosted service are available.
The Protocol
native browser support, no lib nor SDK required (built on top of HTTP and server-sent events)
compatible with all existing servers, even those who don't support persistent connections (serverless architecture, PHP, FastCGI...)
built-in connection re-establishment and state reconciliation
JWT-based authorization mechanism (securely dispatch an update to some selected subscribers)
performant, leverages HTTP multiplexing
designed with hypermedia in mind, also supports GraphQL
auto-discoverable through web linking
message encryption support
can work with old browsers (IE7+) using an
EventSource
polyfillconnection-less push in controlled environments (e.g. browsers on mobile handsets tied to specific carriers)
The Hub
Fast, written in Go
Works everywhere: static binaries, Docker image and Kubernetes chart
Automatic HTTP/2, HTTP/3 and HTTPS (using Let's Encrypt) support
CORS support, CSRF protection mechanism
Cloud Native, follows the Twelve-Factor App methodology
Free and Open source (AGPL), SaaS, and commercial versions available