MEDIUMInfrastructure

Design a Feature Flag System

Design a feature flag management system for controlled rollouts, A/B testing, and kill switches.

Estimated Time: 45 minutes
#Feature Flags#A/B Testing#Gradual Rollout#SDK
Solution Overview

Store flag configurations in distributed cache. Implement percentage-based rollouts with consistent hashing. Support targeting rules.

Hints to Get Started
1

Consistency across services

2

Flag evaluation latency

3

Audit logging requirements

Targeting
  • User ID
  • User attributes
  • Environment
Flag Types
  • Boolean
  • Multivariate
  • Percentage rollout
Sdk Patterns

Local cache with streaming updates