Skip to content

Commit

Permalink
Mention Rails 7.1 isolation_level config (#218)
Browse files Browse the repository at this point in the history
  • Loading branch information
santib authored Jan 30, 2024
1 parent 8bc974c commit aa2344d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions guides/rails-integration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ Because `rails` apps are built on top of `rack`, they are compatible with `falco
1. Add `gem 'falcon'` to your `Gemfile` and perhaps remove `gem 'puma'` once you are satisfied with the change.
2. Run `falcon serve` to start a local development server.

## Isolation Level

Rails 7.1 introduced the ability to change its internal isolation level from threads (default) to fibers.

Make sure to configure it to fibers:
```ruby
# config/application.rb

config.active_support.isolation_level = :fiber
```

## Thread Safety

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.
Expand Down

0 comments on commit aa2344d

Please sign in to comment.