AnyCable

MIT
Platform
Linux macOS Docker
Licence
MIT Open source
AnyCable

AnyCable is a realtime server for reliable two-way communication over WebSockets and Server-Sent Events, built and maintained by Evil Martians as a faster, language-agnostic replacement for the Action Cable server that ships with Ruby on Rails. The application keeps its existing broadcast code; AnyCable takes over the socket layer and the work of fanning messages out to connected clients.

How it works

  • WebSocket endpoint at /cable plus an SSE transport for clients that cannot hold a WebSocket open.
  • RPC controller (gRPC, with an mruby implementation available) where your own code authenticates connections and authorises channel subscriptions — so session logic stays in the application, not in the socket server.
  • HTTP broadcast API at /_broadcast, letting any process, cron job or third-party service push a message into a stream without opening a socket.
  • Pub/sub fan-out so several AnyCable nodes share one message stream; Redis pub/sub is the common choice and is what a default deployment connects to.
  • Operational endpoints: a /health check for load balancers, structured logs with per-node IDs, graceful shutdown on SIGTERM and hot restarts without dropping clients.

Deployment and requirements

AnyCable ships as a single static Go binary (anycable-go) and an official Docker image, so the server itself runs on Linux, macOS or Windows and drops cleanly into a container platform. A deployment needs two neighbours: a pub/sub backend (Redis, or another supported adapter) and an RPC server — the AnyCable Ruby gem inside your Rails app, the mruby runtime, or a gRPC service you write yourself. Configuration is entirely through flags or environment variables; there is no database schema of its own.

When it fits

It is aimed at teams already running Action Cable-style broadcasting in Rails, Laravel, or a custom backend who have outgrown the default WebSocket server: many concurrent connections, several app instances behind a load balancer, or a need to push events from background workers. Because the RPC boundary is explicit, it also suits non-Ruby stacks that want a proven socket server with their own session logic behind it.

Licence

Open source (MIT). The edition described here is the open source AnyCable server. Evil Martians also sells a commercial Pro edition and a managed hosting service under the same name, which add features on top of the MIT code base.

More developer tooling is catalogued in the full directory.

Explore More Categories

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.