Pusher’s pricing page arrives the week your side project goes viral. Ably works until “connections” becomes a monthly negotiation. You could bolt Socket.io onto Node and own every reconnect bug yourself—or you could run a realtime layer that was built to be infrastructure.
Centrifugo (centrifugal/centrifugo) is a Go pub/sub server for user-facing realtime: WebSockets, SSE, HTTP streaming, and more. Apache-2.0, about 11,000 GitHub stars, docs at centrifugal.dev. Your app backend publishes to channels over HTTP or gRPC; browsers and mobile SDKs subscribe. Self-hosting replaces PubNub, Pusher, and Ably with a binary you control on a Canadian VPS.
How it differs from AnyCable
We covered AnyCable as the “save Rails from holding WebSockets” story. Centrifugo is broader: language-agnostic, channel-based pub/sub, not tied to Action Cable’s protocol. PHP, Python, Go, and .NET backends all publish the same way. Use AnyCable when you already have Action Cable channels; use Centrifugo when realtime is its own product surface—live comments, dashboards, multiplayer state, streaming AI tokens.
What you get
Clients multiplex many channel subscriptions on one connection. Centrifugo handles presence, join/leave events, message history with recovery after reconnect, JWT or proxy auth, namespaces and per-channel permissions, Prometheus metrics, and an embedded admin UI to watch connections and publish test messages.
Scale-out goes through Redis (or Postgres/Nats) so you are not trapped on one box when a webinar chat spikes. Delta compression and protobuf options matter when payloads get chatty; most homelabs start simpler and grow into that.
Why self-host?
Realtime traffic carries user IDs, live business data, and sometimes regulated content. Keeping Centrifugo on your VPS means connection metadata and message flow stay in your network boundary—not a US SaaS bill keyed to MAU. Agencies shipping client portals in Canada often want that split: app servers in one place, realtime hub beside them, both under contract-friendly hosting.
Cost predictability is the other honest win: you pay for CPU and RAM, not connection tiers that punish success.
Running it
Trial locally with Docker (turn off the insecure flags before production):
docker run -p 8000:8000 centrifugo/centrifugo:latest centrifugo \
--client.insecure --admin.enabled --admin.insecure
Production: config file with secrets, TLS at the proxy, Redis for clustering if needed, JWT signing aligned with your login flow. Official SDKs exist for JavaScript, Dart, Swift, Python, and Go; SSE-only consumers can skip SDKs for read-only feeds.
Plan a VPS with headroom for concurrent sockets—not shared hosting. Pair with your existing stack; Centrifugo does not replace your database or API, only the fan-out layer.
Good fit / skip it
Good fit: apps outgrowing Pusher bills, multi-language teams wanting one realtime server, live dashboards and chat, AI token streaming to browsers, shops already running Redis for cache.
Skip it: Rails-only teams happy with AnyCable, projects with zero realtime needs, teams unwilling to operate another stateful service plus Redis.
Bottom line
Centrifugo is a self-hosted, scalable realtime messaging server—channels, recovery, presence, and ops tooling included. Publish once from your backend; let Go hold the long-lived connections so your app code does not have to.
Talk with Swift Host about Canadian VPS capacity for realtime stacks—we are in St. Albert, and we have seen connection counts spike harder than marketing promised.