Ask A Question

Notifications

You’re not receiving notifications from this thread.

How ActionCable Uses Redis Discussion

Nice! I d like to see an episode on ActionCable & Redis tuning and optimisation to allow massive number of subscribers (100+) with frequent updates. Im currently pushing matrix with data of size 800*50 each few seconds and struggling to have more than 100 subscribers, as it starts lagging

Reply

Yeah that's going to be an interesting one. Presumably you'll end up needing to build a cluster of dedicated actioncable servers and maybe you connect 100 users to each at a maximum. At some point as well, you'll probably run into Redis pubsub scaling problems, but that hopefully isn't a bottleneck right away.

Reply

Chris, I'm currently using RedisCloud $10 plan on my Heroku app.

From the pricing page (https://elements.heroku.com..., this plan has 256 connections.

Does it mean my app can only serve 256 concurrent (ActionCable chat) users at one time?

What will happen to 257th user? He will not subscribed to Redis Pub/Sub and his message won't get broadcasted?

Reply

That's a great question. I'll try to find the answer.

Reply

Very cool to see how it works under the hood! Redis is quite a mystery for the most part since we generally only use it for very specific things, because that's how everyone does it. Things like caching/background jobs, etc. So it's good to see what really happens at Redis level

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.