2
3 Comments

How does ActionCable play with Heroku?

Colleagues,
I have been mulling with the idea to replace a polling strategy I currently use in my #RoR app with ActionCable. The think is that my app runs on Heroku lower tiers (hobby) and hence i have access to only one dyno. Does anybody know how the full-duplex communication that ActionCable realises dovetails with Heroku dynos? E.g. can I have one dyno listening to multiple channels (of the ActionCable)? Any advise or insight will be greatly appreciated.

Thanks in advance

on December 5, 2020
  1. 2

    I believe it's totally fine to have only one dyno. This blog article from Heroku might help you: https://blog.heroku.com/real_time_rails_implementing_websockets_in_rails_5_with_action_cable

    Another alternative - which I tend to prefer - is to use https://pusher.com with https://github.com/pusher/pusher-http-ruby. Pusher handles all the websockets and while your apps keeps focusing on the core business logic.

    1. 1

      Thank @alachaum , that is a very useful pointer.
      Appreciated.
      Nat

      1. 1

        You're most welcome :)