flippercloud / flipper

🐬 Beautiful, performant feature flags for Ruby.
https://www.flippercloud.io/docs
MIT License
3.71k stars 414 forks source link

Add ActorLimit adapter #847

Closed bkeepers closed 7 months ago

bkeepers commented 8 months ago

This adds the ActorLimit adapter and configures it to be used by default.

101.times { |i| Flipper.enable :some_feature Flipper::Actor.new(i) }
# Error: Actor limit of 100 exceeded for feature some_feature

100 has been our recommended max for individual actors for a while, so I started with that default. It can easily be configured with:

Rails.application.configure do |config|
  config.flipper.actor_limit = 1000

  # or disable
  config.flipper.actor_limit = false
end