All Projects → fetlife → Rollout

fetlife / Rollout

Licence: mit
Feature flippers.

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Rollout

Flipper
🐬 Beautiful, performant feature flags for Ruby.
Stars: ✭ 2,732 (-1.51%)
Mutual labels:  feature-flags, redis, rollout
laravel-rollout
A package to integrate rollout into your Laravel project.
Stars: ✭ 23 (-99.17%)
Mutual labels:  feature-flags, rollout
PowerShell-FeatureFlags
PowerShell module containing a Feature Flags implementation based on a local config file.
Stars: ✭ 15 (-99.46%)
Mutual labels:  feature-flags, rollout
flipper
Feature Flipper, Feature Flags, Rollout Flags, Feature Toggles for Crystal
Stars: ✭ 21 (-99.24%)
Mutual labels:  feature-flags, rollout
toggler
toggler is a feature flag service to decouple deployment, feature enrollment and experiments
Stars: ✭ 27 (-99.03%)
Mutual labels:  feature-flags, rollout
Fun with flags
Feature Flags/Toggles for Elixir
Stars: ✭ 554 (-80.03%)
Mutual labels:  feature-flags, redis
Molasses
Feature toggle library for elixir
Stars: ✭ 70 (-97.48%)
Mutual labels:  feature-flags, redis
Video Chat
Video chat app using Vue, Vuex, WebRTC, SocketIO, Node, Redis & Docker with horizontal scaling. Multiparty and 1 to 1 video functionality, several public rooms and user status
Stars: ✭ 240 (-91.35%)
Mutual labels:  redis
Awesome crawl
腾讯新闻、知乎话题、微博粉丝,Tumblr爬虫、斗鱼弹幕、妹子图爬虫、分布式设计等
Stars: ✭ 246 (-91.13%)
Mutual labels:  redis
Webrtc im
webrtc 直播连麦
Stars: ✭ 237 (-91.46%)
Mutual labels:  redis
Redis Windows
Vagrant redis configuration and the binary releases of MS Open Tech redis port of windows
Stars: ✭ 2,596 (-6.42%)
Mutual labels:  redis
Golang Url Shortener
URL Shortener written in Golang using Bolt DB or Redis. Provides features such as Deletion, Expiration, OAuth and is of course Dockerizable.
Stars: ✭ 240 (-91.35%)
Mutual labels:  redis
Spring Boot Start Current
Spring Boot 脚手架 Mybatis Spring Security JWT 权限 Spring Cache + Redis
Stars: ✭ 246 (-91.13%)
Mutual labels:  redis
Chain
链喵 CMDB 本项目已停止开发!因长时间未对代码进行维护,可能会造成项目在不同环境上无法部署、运行BUG等问题,请知晓!项目仅供参考!
Stars: ✭ 240 (-91.35%)
Mutual labels:  redis
Ecommerce website development
本项目基于Django1.8.2等来开发一个电商平台,可实现注册、登录、浏览、购买、支付等全部常用功能。
Stars: ✭ 246 (-91.13%)
Mutual labels:  redis
Php
PHP相关资料
Stars: ✭ 234 (-91.56%)
Mutual labels:  redis
Redis Rogue Server
Redis 4.x/5.x RCE
Stars: ✭ 243 (-91.24%)
Mutual labels:  redis
Netcorekit
💗 A crafted toolkit for building cloud-native apps on the .NET platform
Stars: ✭ 248 (-91.06%)
Mutual labels:  feature-flags
Redis Manager
Integrates your Laravel application with a redis manager
Stars: ✭ 245 (-91.17%)
Mutual labels:  redis
Docker Lnmp
🐋Docker-compose(Linux,Nginx,MySQL,PHP7,Redis)
Stars: ✭ 244 (-91.2%)
Mutual labels:  redis

rollout

Fast feature flags based on Redis.

Gem Version CircleCI Code Climate Test Coverage

Install it

gem install rollout

How it works

Initialize a rollout object. I assign it to a global var.

require 'redis'

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

or even simpler

require 'redis'
$rollout = Rollout.new(Redis.current) # Will use REDIS_URL env var or default redis url

Update data specific to a feature:

$rollout.set_feature_data(:chat, description: 'foo', release_date: 'bar', whatever: 'baz')

Check whether a feature is active for a particular user:

$rollout.active?(:chat, User.first) # => true/false

Check whether a feature is active globally:

$rollout.active?(:chat)

You can activate features using a number of different mechanisms.

Groups

Rollout ships with one group by default: "all", which does exactly what it sounds like.

You can activate the all group for the chat feature like this:

$rollout.activate_group(:chat, :all)

You might also want to define your own groups. We have one for our caretakers:

$rollout.define_group(:caretakers) do |user|
  user.caretaker?
end

You can activate multiple groups per feature.

Deactivate groups like this:

$rollout.deactivate_group(:chat, :all)

Groups need to be defined every time your app starts. The logic is not persisted anywhere.

Specific Users

You might want to let a specific user into a beta test or something. If that user isn't part of an existing group, you can let them in specifically:

$rollout.activate_user(:chat, @user)

Deactivate them like this:

$rollout.deactivate_user(:chat, @user)

User Percentages

If you're rolling out a new feature, you might want to test the waters by slowly enabling it for a percentage of your users.

$rollout.activate_percentage(:chat, 20)

The algorithm for determining which users get let in is this:

CRC32(user.id) < (2**32 - 1) / 100.0 * percentage

So, for 20%, users 0, 1, 10, 11, 20, 21, etc would be allowed in. Those users would remain in as the percentage increases.

Deactivate all percentages like this:

$rollout.deactivate_percentage(:chat)

Note that activating a feature for 100% of users will also make it active "globally". That is when calling Rollout#active? without a user object.

In some cases you might want to have a feature activated for a random set of users. It can come specially handy when using Rollout for split tests.

$rollout = Rollout.new($redis, randomize_percentage: true)

When on randomize_percentage will make sure that 50% of users for feature A are selected independently from users for feature B.

Global actions

While groups can come in handy, the actual global setter for a feature does not require a group to be passed.

$rollout.activate(:chat)

In that case you can check the global availability of a feature using the following

$rollout.active?(:chat)

And if something is wrong you can set a feature off for everybody using

Deactivate everybody at once:

$rollout.deactivate(:chat)

For many of our features, we keep track of error rates using redis, and deactivate them automatically when a threshold is reached to prevent service failures from cascading. See https://github.com/jamesgolick/degrade for the failure detection code.

Namespacing

Rollout separates its keys from other keys in the data store using the "feature" keyspace.

If you're using redis, you can namespace keys further to support multiple environments by using the redis-namespace gem.

$ns = Redis::Namespace.new(Rails.env, redis: $redis)
$rollout = Rollout.new($ns)
$rollout.activate_group(:chat, :all)

This example would use the "development:feature:chat:groups" key.

Frontend / UI

Implementations in other languages

Contributors

Copyright

Copyright (c) 2010-InfinityAndBeyond BitLove, Inc. See LICENSE for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].