Open-source realtime server 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.
For any backend that can send an HTTP request, including Node.js, Rails, Laravel and FastAPI.
Managed AnyCable gives you two cables free. Pro comes with a two-month trial, no card needed.
- delivered
- 0
- replayed
- 0
- lost
- 0
- 100%of messages delivered through Wi‑Fi drops
- 0connections dropped when you deploy
- 3 msp50 roundtrip at 10,000 connections
- 18 KBof RAM per idle connection on Pro
Instant, scalable, dependable. And yours.
Scalable
822K
idle connections on one Pro server, where Socket.io stopped at 120K
Connections live outside your app processes, so a launch-day spike lands on AnyCable, and you scale it by adding instances. Pro adapts its concurrency to load.
Dependable
100%
delivered through Wi‑Fi drops, against 85% to 87% for default Socket.io and uWebSockets.js
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.
Yours
No caps
on connections or messages when you self‑host
Run it in your cluster under the MIT license, or self-host Pro, priced by production instance, with unlimited connections from $1,490 a year. Messages never leave your infrastructure.
What happens whenβ¦
| When | WebSockets inside your app (Action Cable, Socket.io) | AnyCable |
|---|---|---|
| You deploy your app | Every connection drops, and every client reconnects at once | Connections stay open: the Go server runs apart from your app |
| A phone loses signal for 30 seconds | Messages sent in that window are gone | The client reconnects, restores its session and receives what it missed from stream history |
| A WebSocket server restarts | Its clients reconnect into an empty state | Slow drain spreads the reconnects out, and clients resume from stream history shared across the cluster Pro |
| Launch-day traffic arrives | App processes hold the connections and run short of memory | Add AnyCable instances; your app's memory stays flat |
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.
Delivery guarantees, out of the box
Chat messages, edits in a shared document and notifications reach every user in order, including the one whose phone just switched from Wi‑Fi to cellular.
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, hashlib, 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, hashlib.sha256).hexdigest()
BROADCAST_KEY = hmac_hex(b"broadcast-cable")
def sign_stream(name: str) -> str:
encoded = base64.b64encode(json.dumps(name).encode()).decode()
return f"{encoded}--{hmac_hex(encoded.encode())}"
async def stream_answer(chat_id: str, prompt: str):
# Runs apart from the request, so 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));
Managed AnyCable, Pro, or open source
Start on Managed AnyCable with two free cables. Move to self-hosted Pro when you want it on your own infrastructure, or run open source for free. All three speak the same protocol, so moving between them takes no code changes.
Your messages stay on your servers
Self-hosted Pro and open source keep every realtime message, chat history included, inside your infrastructure. Nothing goes to a third party, which is why healthcare teams run AnyCable for HIPAA-covered data.
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.
Healthie:
25K+
clinicians message patients over AnyCable Pro, running inside Healthie's own infrastructure.
Read the case study β
"We use AnyCable for our dialer products, which is where real-time is critical β it's our video and voice platform. 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
- Space tech: command and control for satellites
- Commerce: community chat and buyer notifications
- Customer support: live chat and agent presence
- Developer education: test results streamed into the browser
- Competitions: live results for spectators
- Group chat: a self-hosted alternative to Slack and Discord
Pricing
Start free, pay when you scale
Start on Managed AnyCable with two free cables. Move to self-hosted Pro when you want it on your own infrastructure.
Start here
Managed AnyCable
We run, upgrade, and support AnyCable for you. Nothing to deploy. Formerly AnyCable+, at plus.anycable.io.
Free for 2 cables, up to 2,000 connections each, no SLA
Start for free- A cable is one hosted AnyCable server with its own WebSocket URL
- Up and running in minutes
- Built on the AnyCable Pro server
- Delivery guarantees, presence, JWT auth and signed streams
- Moves to self-hosted Pro with no code changes
Need more than two cables? Self-host Pro or ask us for a larger quota
Pro
Self-hosted on your infrastructure, with half the memory per connection of 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 Contact us
- Enterprise Source access and customization, guaranteed 48h response on critical issues Custom Contact us
- 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
-
Read the docs
Open-source Free
Run it yourself on Render, Railway, Heroku, Fly, AWS, GCP, or anywhere with Docker or K8s.
-
anycable@evilmartians.com
Consulting $200/hour
Setup, deploy, and load testing with the team behind AnyCable.
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.
- Guides for Hotwire, Laravel, Python, serverless and client-side apps.
Resources
Talks & Videos
- Conference talks, screencasts, and deep dives on real-time architecture.
- From the maintainers, and from Wealthbox on collaborative editing with Yjs.
All screencasts on YouTube
Resources
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