Faye on Heroku?

826 views
Skip to first unread message

James Coglan

unread,
Apr 4, 2011, 3:18:59 PM4/4/11
to Faye users
Quick question: is anyone running Faye on Heroku? Did you have any
problems? Which version are you using? Someone just asked about this
on GitHub so need some info.

Ryan Bates

unread,
Apr 4, 2011, 4:09:10 PM4/4/11
to Faye users
I don't think Heroku allows you to run separate processes like this,
does it? I imagine you would need to keep Faye on a separate host.
Someone asked the same thing on the Railscasts episode and I pointed
them to Pusher if they aren't interested in managing a separate
server.

Ryan

James Coglan

unread,
Apr 4, 2011, 4:14:26 PM4/4/11
to faye-...@googlegroups.com
On 4 April 2011 21:09, Ryan Bates <rails...@gmail.com> wrote:
I don't think Heroku allows you to run separate processes like this,
does it? I imagine you would need to keep Faye on a separate host.
Someone asked the same thing on the Railscasts episode and I pointed
them to Pusher if they aren't interested in managing a separate
server.

Well, you can use Faye as middleware in front of your app, like this:

use Faye::RackAdapter, :mount => '/faye'
run My::Application

It then lives on the same host as your app under the /faye path. I'm more concerned about how Heroku manages Rack/Node processes; since Faye maintains all subscription state in the process's memory, so killing the process due to idleness, or spinning up multiple instances of it does not work. This should change once the Redis backend ships (can you run Redis on Heroku?) since it makes the web layer stateless, but right now this is a hard limit. The Ruby version also only works under Thin.

Luca Guidi

unread,
Apr 4, 2011, 4:20:32 PM4/4/11
to faye-users, James Coglan
On Mon, Apr 4, 2011 at 10:14 PM, James Coglan <jco...@gmail.com> wrote:
 (can you run Redis on Heroku?) 

You can use Redistogo as addon. 

Luca
--
http://about.me/jodosha

Michael van Rooijen

unread,
Apr 4, 2011, 9:04:02 PM4/4/11
to Faye users
I tried to deploy it to Heroku. It worked but it didn't feel stable to
me. I believe Heroku kept killing the process since after a short
while I'd get messages that Faye could not connect to the service
(Heroku). I just moved my Faye server from Heroku to my own Linux box
and do not experience this issue anymore so..
Reply all
Reply to author
Forward
0 new messages