Open source by Evil Martians, in production since 2017
Every message arrives.
AnyCable keeps WebSocket connections open through your deploys and replays what a client missed when it comes back online. Delivery guarantees, ordering and presence, built in.
- Delivered
- 0
- Replayed
- 0
- Lost
- 0
Features
Why AnyCable?
Instant
A Go server holds the sockets and fans out every broadcast. Your app publishes over HTTP, Redis or the embedded NATS, then goes back to its own work.
11 msp99
roundtrip at 10K connections on Pro, 3 ms at p50
Scalable
Connections live outside your app processes, so you scale AnyCable by adding instances. Pro adapts its concurrency to load.
822K
idle connections on one Pro server, where Socket.io stopped at 120K
Dependable
Each stream keeps its recent history, 100 messages for 5 minutes by default and configurable, so a client that reconnects gets what it missed, in order.
100%
delivered through Wi‑Fi drops, against 85% to 87% for default Socket.io and uWebSockets.js
Yours
Run it in your cluster under the MIT license, or self-host Pro. Messages never leave your infrastructure. Nothing goes to a third party, which is why healthcare teams run AnyCable for HIPAA-covered data.
No caps
on connections or messages when you self‑host
What happens when…
WebSockets inside your app Action Cable, Socket.io
AnyCable Each dot is a message: delivered held in history lost
Each dot is a message: delivered held in history lost
-
You deploy your app
WebSockets inside your appEvery connection drops. Every client reconnects at once.
AnyCableConnections stay open. The Go server runs apart from your app.
-
A phone loses signal for 30 seconds
WebSockets inside your appMessages sent in that window are gone.
AnyCableThe client gets what it missed. It reconnects, restores its session and receives the missed messages from stream history, in order.
-
A WebSocket server restarts
WebSockets inside your appClients reconnect into an empty state.
AnyCableClients resume where they left off. Slow drain spreads the reconnects out, and stream history is shared across the cluster. Pro
Works with your stack
AnyCable runs next to your application. Rails, Laravel and Node.js get native SDKs, and any other backend that can send an HTTP request can broadcast. Hotwire, Turbo Streams and every JavaScript framework work out of the box, and if you already run Redis or NATS, AnyCable can use them. Coming from Pusher or Laravel Reverb? AnyCable speaks the Pusher protocol, so your Echo or pusher-js client stays as it is.
Streamed LLM answers resume after a dropped connection
A tab switch or a network blip cuts off a streamed LLM answer. With AnyCable, your backend broadcasts tokens to a stream, and the Go server holds the connection, keeps the history and replays from where the client left off. Read the Python and FastAPI guide →
import { createCable } from "@anycable/web";
const cable = createCable();
// Basic pub/sub interface
let channel = cable.streamFrom("chatty/2025");
channel.on("message", (msg) => {
// handle notification
});
// join the channel's presence set
channel.presence.join(user.id, { name: user.name })
channel.on("presence", (event) => {
// handle presence updates
})
export class ChatChannel extends Channel {
async speak(handle, params, data) {
const { message } = data;
const name = handle.identifiers.username;
const payload = {
event: "newMessage",
name,
message,
};
await broadcastTo(`roomId:${params.id}`, payload);
}
}
class ChatChannel < ApplicationCable::Channel
def speak(data)
workspace = Workspace.find(params[:workspace_id])
html = ApplicationController.render(
partial: "chats/message",
locals: {message: data["message"], user:}
)
broadcast_to(
workspace,
action: "newMessage",
html:,
author_id: user.id
)
end
end
# FastAPI: stream an LLM answer the client can resume
import base64, hmac, json, os, httpx
SECRET = os.environ["ANYCABLE_SECRET"].encode()
BROADCAST_URL = "http://anycable:8080/_broadcast"
def hmac_hex(message: bytes) -> str:
return hmac.new(SECRET, message, "sha256").hexdigest()
BROADCAST_KEY = hmac_hex(b"broadcast-cable")
def sign_stream(name: str) -> str:
raw = json.dumps(name).encode()
encoded = base64.b64encode(raw).decode()
return f"{encoded}--{hmac_hex(encoded.encode())}"
async def stream_answer(chat_id: str, prompt: str):
# Runs apart from the request: a closed tab can't stop it
auth = {"Authorization": f"Bearer {BROADCAST_KEY}"}
async with httpx.AsyncClient(headers=auth) as cable:
async for token in llm.stream(prompt):
await cable.post(BROADCAST_URL, json={
"stream": f"chat/{chat_id}",
"data": json.dumps({"token": token}),
})
@app.post("/chats/{chat_id}/answer")
async def answer(chat_id: str, q: Ask, bg: BackgroundTasks):
bg.add_task(stream_answer, chat_id, q.prompt)
# The browser subscribes with streamFromSigned(); AnyCable
# replays missed tokens when it reconnects
return {"stream": sign_stream(f"chat/{chat_id}")}
// Broadcast from Laravel with the anycable driver
class MessageSent implements ShouldBroadcast
{
public function __construct(public Message $message) {}
public function broadcastOn(): array
{
return [new PrivateChannel('chat')];
}
public function broadcastAs(): string
{
return 'message.sent';
}
}
broadcast(new MessageSent($message));
Customers
Teams that can't afford to drop a message
Healthcare, finance, field service and community platforms run AnyCable in production. Select a company for the details.
“Anytime you restart your application, which happens when you deploy, you're gonna get connection severances. AnyCable allows them to keep that connection open. That Go service stays up, and you can continue shipping your Rails application as normal.”
Open source
Built with AnyCable, in the open
- Commerce: community chat and buyer notifications
- Frameworks: Inertia.js live props refresh page data from your broadcasts
- Customer support: live chat and agent presence
- Developer education: test results streamed into the browser
- Competitions: live results for spectators
- Space tech: command and control for satellites
- Group chat: a self-hosted alternative to Slack and Discord
Pricing
Start free, pay when you scale
Managed, Pro and open source speak the same protocol, so moving between them takes no code changes.
Step 1
Start free on Managed AnyCable
We run, upgrade and support AnyCable for you. Nothing to deploy. Formerly AnyCable+, at plus.anycable.io.
- A cable is one hosted AnyCable server with its own WebSocket URL
- Built on the AnyCable Pro server
- Delivery guarantees, presence, JWT auth and signed streams
Step 2a, on your servers
Upgrade to on-premise Pro
Self-hosted on your infrastructure, with half the memory per connection of open source.
- Free 2-month trial, no card needed
- Staging and dev instances are free
- No metering or connection caps
Everything in open source, plus stream history and presence shared across a Redis cluster, adaptive scaling, slow drain, binary formats, long-polling, Apollo GraphQL, and dedicated Slack support. Compare with open source
- Startup Up to 5 production instances, Slack support, usually within 48h $1,490/yr $149/mo Start free trial
- Business Up to 20 production instances, Slack support, usually within 48h $4,900/yr $490/mo Start free trial
- Scale 20+ instances, priority support, guaranteed 48h response on critical issues from $9,000/yr Start free trial
- Enterprise Source access and customization, guaranteed 48h response on critical issues Custom Book a call or email us
Step 2b, or stay managed
Upgrade to paid Managed tiers
The alternative to Pro: more cables on Managed AnyCable, and still nothing to deploy.
Step 3
Bring us in to build your realtime core
The team behind AnyCable builds the custom realtime part of your product with you, from setup and deploys to load testing.
Part of Evil Martians
We build things from voice agents to multiplayer UI, and more.
At any time
Downgrade to open source
Run it yourself on Render, Railway, Heroku, Fly, AWS, GCP, or anywhere with Docker or K8s.
Open source vs. Pro
| Open source | Pro | |
|---|---|---|
| Delivery guarantees, presence, JWT auth, signed streams | Yes | Yes |
| Memory per connection | ~34 KB | ~18 KB |
| History and presence across a Redis cluster open source shares history through NATS | No | Yes |
| Adaptive scaling RPC concurrency adjusts to load | No | Yes |
| Slow drain on shutdown | No | Yes |
| Binary message formats | No | Yes |
| Long-polling fallback | No | Yes |
| Apollo GraphQL protocol | No | Yes |
| OCPP for EV chargers | No | Yes |
| Support | GitHub issues | Dedicated Slack |
| License | MIT | Commercial EULA |
Full list in the Pro docs.
Pricing questions
What counts as an instance?
One running AnyCable Pro server process in production. Each replica, container, pod, or VM is a separate instance. Your application, web, and RPC processes don't count.
Do staging and development count?
No. Only environments serving live traffic count. Run as many development, testing, staging, CI, and preview instances as you like.
What if autoscaling takes us past our tier?
Short spikes from autoscaling, rolling deploys, failover, or load tests don't count; tiers follow the peak you run steadily. The server never slows down or shuts off when you go over. If your steady peak grows, move up a tier in the billing portal, prorated for the rest of the period.
What happens when the trial ends?
The 2-month trial needs no card and doesn't turn into a paid subscription on its own. Buy a plan to keep your access; otherwise the license ends with the trial.
Can I cancel Startup or Business?
Yes, any time in the billing portal. The plan runs to the end of the month or year you've paid for and doesn't renew.
How are Scale and Enterprise billed?
By invoice, yearly in advance, under an order form we sign together. They renew automatically each year unless you opt out in the order form, or email us any time before the year ends. An Enterprise source license can also be added on top of any tier.
What are the limits on Managed AnyCable?
Managed AnyCable is free for two cables, each taking up to 2,000 concurrent connections, with no SLA. When you need more, move to self-hosted Pro; its Scale and Enterprise tiers include a 48h response on critical issues.
Resources
Documentation
- Works with any backend via HTTP API: Node.js, Rails, Laravel, FastAPI.
- Deploy with Docker, Kubernetes, Heroku, Fly.io, or as a standalone binary.
Newsletter & Community
- Subscribe to our newsletter: releases, tips and case studies.
- Follow on X (Twitter).
- Submit issues on GitHub.
- Try Slide Quiz: live polls for Sli.dev and Reveal.js web presentations powered by AnyCable.