Wynn Netherland changelog.com/posts

Rollout: Conditionally roll out features with Redis

Ever wanted to roll out new features in your web app to only select users, bit by bit, testing performance as you go? James Golick has harnessed the power of Redis to do just that with Rollout.

Rollout is a gem, so just install from the command line:

gem install rollout

To get started, create your Rollout

$redis   = Redis.new
$rollout = Rollout.new($redis)

You can then activate/deactivate features in a number of ways

by group,

$rollout.activate_group(:chat, :all)
$rollout.deactivate_group(:chat, :all)

by user,

$rollout.activate_user(:chat, @user)
$rollout.deactivate_user(:chat, @user)

or even for a percentage of users

$rollout.activate_percentage(:chat, 20)
$rollout.deactivate_percentage(:chat)

As a failsafe, you can back out a broken feature with the nuclear option:

$rollout.deactivate_all

[Source on GitHub]


Discussion

Sign in or Join to comment or subscribe

Player art
  0:00 / 0:00