Pavia vs Centrifugo
Both recover channels the same way, with an epoch and an offset per channel. Centrifugo is a standalone Go server that your backend reaches through proxies and an API. Pavia is a protocol your Rust server speaks itself, with typed calls in both directions.
How each is deployed
THE SHARED IDEA
Pick up exactly where you left off.
Every publication on a channel gets the next offset. A client that comes back sends the epoch and the last offset it saw, and gets the rest. If the history is gone, the client is told so, and knows to reload instead of showing a gap.
since { epoch: "e7", offset: 42 }Which to pick
Pick Centrifugo when
- your backend is not Rust, or is several languages
- you want real-time as a separate service with an admin UI
- clients need SSE or HTTP streaming
- you want official SDKs for Dart, Swift, Java, Python, Go or .NET
Pick Pavia when
- your server is Rust and you want no extra hop
- the server calls clients and waits for answers
- calls stream in both directions, with a typed contract
- you want WebTransport and lossy datagrams
Feature by feature
| Question | Pavia | Centrifugo |
|---|---|---|
| Where it runs | PartlyInside your Rust server, on axum | YesA standalone Go server; any backend language |
| Bindings | YesWebTransport over HTTP/3, raced against WebSocket | PartlyWebSocket, SSE, HTTP streaming; WebTransport experimental |
| Client calls the server | YesTyped calls in four shapes | PartlyUnary RPC, proxied to your backend |
| Server calls a client | YesEvery call shape, to one session | NoNot documented |
| Contracts | YesManifest, generated clients, compatibility checker | NoOpaque payloads |
| History and recovery | YesEpoch and offset | YesEpoch and offset, as a bounded cache |
| Presence | YesSnapshot, joins, leaves, updates | YesPer namespace; joins and leaves at-most-once |
| Lossy datagrams | YesReal on WebTransport, latest-value topics | NoNone |
| Session resumption | Yes30 s window; groups and subscriptions kept | PartlyChannels recover; no session resume documented |
| Scale-out | YesNATS with JetStream | YesRedis and compatibles; NATS as a broker only |
| Clients | PartlyTypeScript and Rust; open spec for others | YesJavaScript, Dart, Swift, Java, Python, Go, Rust, .NET |
| Licence | YesMIT or Apache 2.0 | PartlyApache 2.0; some features in the paid PRO edition |
The Pavia column describes the protocol as its specification defines it, and the reference implementation as it is designed. The conformance matrix shows which levels each implementation passes.
Questions
Is the recovery model really the same?
In outline, yes: each channel has an epoch and an offset, and a client asks for everything after the last offset it saw. Pavia also resumes the whole session for short drops, so groups, subscriptions and notifications come back without a resubscribe.
Can my backend in another language use Pavia?
The reference server is Rust. The specification and its test vectors are public, so a server in another language can implement Pavia and check itself against the conformance suite. Centrifugo is the better fit when you want one server in front of any backend today.
Does Pavia need Redis?
A single node of the reference server needs nothing else. Several nodes share groups, channels and history over NATS with JetStream.
Why no SSE?
Pavia carries calls in both directions, which SSE cannot do. WebTransport and WebSocket both can, so the protocol keeps to those two.
Sources, checked November 2026
- Centrifugo repository
- Centrifugo introduction
- Transports overview
- WebTransport in Centrifugo
- Channels and namespaces
- History and recovery
- Online presence
- Proxy to your backend
- Client SDKs
- Client SDK API: rpc and operation timeout
- Server API
- Engines and scalability
- Admin web UI
- Centrifugo PRO
- MDN: Using server-sent events
- Pavia specification, sections 7.8, 10 and 13.8