ANYCABLE
Action Cable on steroids!
Combines the good parts of Action Cable with the power of your favorite language for concurrent applications
FORK ON GITHUB
ANYCABLE
TRY IT NOW
See how it works
You Had
Client applications communicating with Rails through Action Cable.
It's written in Ruby and doesn't act well in terms of resources usage and overall performance, especially under high load.
It's written in Ruby and doesn't act well in terms of resources usage and overall performance, especially under high load.
How can we fix it?
Now You Have
AnyCable plugged into the Rails application that allows you to use custom WebSocket server.
Try one of the existing AnyCable servers or write your own in any language you like.
Try one of the existing AnyCable servers or write your own in any language you like.
Reduced CPU usage
Running WebSocket Shootout benchmark
AnyCable-Go
ActionCable
Reduced memory usage
Handling 20K idle connections
AnyCable-Go
798 MB
ErlyCable
832 MB
ActionCable
3,5 GB
Drastically increased broadcasting performance
Broadcast RTT depending on number of connections
AnyCable-Go
ErlyCable
ActionCable
Outside of Rails usage
AnyCable doesn't depend on Rails.
You can use it with other Ruby applications too.
Check out Sinatra example.
You can use it with other Ruby applications too.
Check out Sinatra example.
How To Use With Rails?
# Add AnyCable to your Gemfile
gem 'anycable-rails', group: :production
# Generate server script
rails generate anycable
# Run gRPC server
./bin/anycable
# Run WebSocket server (e.g. anycable-go)
anycable-go -addr=0.0.0.0:3334