I am deploying a system of dashboards that need to check for regular updates to various kinds of information. In a prototype, I used ActionController::Live
and Server-Sent Events, but I found that approach overloaded the number of Unicorn workers I had deployed somewhat quickly, and eventually broke down into every dashboard app instance (each browser connected) just reloading each of the SSE connections every time Heroku or Unicorn cut them off. Essentially, some of the time I had instantaneous updates, and the rest of the time I had polling.
Iām trying to figure out a more elegant solution to this problem. Iāve been looking at some kind of pub/sub system with a second Heroku app thatās using Faye. Iām working on that prototype now, but itās hard to find information on this topic with regard to hosting environments that isnāt just the Heroku documentation.
If I have 50+ dashboards (each with multiple panels that each have their own data) that are persistently connected to the server, plus another 500 clients that might be browsing at any time, is there a most efficient server-side solution to allow push updates that wonāt require me to spin up a huge number of dynos?