This guide explains how to host Rails applications with Falcon.
Integration with Rails
rails apps are built on top of
rack, they are compatible with
gem 'falcon'to your
Gemfileand perhaps remove
gem 'puma'once you are satisfied with the change.
falcon serveto start a local development server.
With older versions of Rails, the
Rack::Lock middleware can be inserted into your app by Rails.
Rack::Lock will cause both poor performance and deadlocks due to the highly concurrent nature of
falcon. Other web frameworks are generally unaffected.
Rails 3.x (and older)
Please ensure you specify
config.threadsafe! in your
module MySite class Application < Rails::Application # ... # Enable threaded mode config.threadsafe! end end
Please ensure you have
config.allow_concurrency = true in your configuration.
This became the default in Rails 5 so no change is necessary unless you explicitly disabled concurrency, in which case you should remove that configuration.
rack.hijack and is compatible with ActionCable. If you use the
async adapter, you should run Falcon in threaded mode, or in forked mode with
--count 1. Otherwise, your messaging system will be distributed over several processes with no IPC mechanism. You might like to try out async-redis as an asynchronous message bus.