Rollout logo

Rollout

Redis-backed feature flags for Ruby with granular rollout control

A lightweight Ruby gem that manages feature flags using Redis, enabling gradual rollouts through user percentages, groups, and individual targeting.

Overview

Fast, Flexible Feature Management

Rollout is a battle-tested Ruby gem that provides Redis-backed feature flag management with fine-grained control over feature activation. Designed for teams that need to safely deploy new functionality, it offers multiple targeting strategies without the overhead of complex feature management platforms.

Granular Control Strategies

The library supports four activation mechanisms: global toggles, user groups with custom logic, individual user targeting, and percentage-based gradual rollouts. The percentage algorithm uses CRC32 hashing to ensure consistent user assignment as rollout percentages increase, making it ideal for phased launches and A/B testing scenarios.

Production-Ready Architecture

With Redis as its backing store, Rollout delivers sub-millisecond flag checks while maintaining state across distributed application instances. The gem integrates seamlessly with existing Ruby applications through simple initialization and supports namespace isolation for multi-environment deployments. Teams can define custom groups programmatically, activate features for beta users, or roll out to calculated user segments—all with straightforward Ruby methods that check feature state in real-time.

Highlights

Percentage-based gradual rollouts with consistent user hashing (CRC32)
Custom group definitions with arbitrary Ruby logic for targeting
Individual user activation for beta testing and VIP access
Redis-backed storage for fast, distributed feature state management

Pros

  • Minimal dependencies and lightweight footprint for Ruby applications
  • Multiple targeting strategies (groups, users, percentages, global) in one library
  • Consistent percentage rollout algorithm maintains user assignment as rollout grows
  • Battle-tested in production with active maintenance and clear documentation

Considerations

  • Requires Redis infrastructure and operational knowledge
  • Group definitions must be re-declared on every application restart
  • No built-in admin UI (requires separate rollout-ui or dashboard integration)
  • Ruby-specific implementation limits cross-language team adoption

Managed products teams compare with

When teams consider Rollout, these hosted platforms usually appear on the same shortlist.

Hypertune logo

Hypertune

Type-safe feature flags platform with A/B testing, analytics, and app configuration optimized for TypeScript

LaunchDarkly logo

LaunchDarkly

Feature flag management platform for safe software releases with targeting, experimentation, and rollback capabilities

Reflag logo

Reflag

Feature flags and A/B testing for TypeScript

Looking for a hosted option? These are the services engineering teams benchmark against before choosing open source.

Fit guide

Great for

  • Ruby/Rails teams needing lightweight feature flag management
  • Gradual feature rollouts with percentage-based user targeting
  • Organizations already running Redis in their infrastructure
  • Teams wanting programmatic control without external SaaS dependencies

Not ideal when

  • Polyglot environments requiring consistent flags across multiple languages
  • Teams needing rich admin interfaces without additional tooling
  • Projects without existing Redis infrastructure or expertise
  • Organizations requiring persistent group definitions without code deployment

How teams use it

Phased Feature Launch

Roll out new chat functionality to 5% of users, monitor error rates, then gradually increase to 20%, 50%, and 100% based on performance metrics.

Beta Testing Program

Activate experimental features for a custom 'beta_testers' group while keeping them hidden from general users, enabling safe validation before wider release.

VIP Early Access

Grant specific premium users immediate access to new features using individual user activation, bypassing percentage rollouts for priority customers.

Emergency Kill Switch

Instantly deactivate problematic features globally when error thresholds are exceeded, preventing cascading failures across the application.

Tech snapshot

Ruby100%

Tags

redispercentagerubyrolloutfeature-flags

Frequently asked questions

How does the percentage rollout algorithm work?

Rollout uses CRC32 hashing on user IDs to deterministically assign users. For 20% rollout, users whose CRC32(user.id) falls below the threshold are included. This ensures the same users remain activated as percentages increase.

Do I need to persist group definitions in Redis?

No, group logic is defined in application code and must be declared on each app startup. Only group membership assignments are stored in Redis, not the group definition logic itself.

Can I use Rollout without a user object?

Yes, you can check global feature activation with `$rollout.active?(:feature)` without passing a user. Features activated for 100% of users are also considered globally active.

How do I manage Rollout flags through a web interface?

Rollout itself is a library without a UI. You can integrate separate projects like rollout-ui or Rollout-Dashboard for web-based feature flag management.

Does Rollout support multi-environment deployments?

Yes, use the redis-namespace gem to isolate keys by environment (e.g., 'development:feature:chat'). Initialize Rollout with a namespaced Redis connection to separate staging and production flags.

Project at a glance

Active
Stars
2,902
Watchers
2,902
Forks
213
LicenseMIT
Repo age15 years old
Last commit2 months ago
Primary languageRuby

Last synced 2 days ago