FlagSwitch is building a feature flag service (like LaunchDarkly lite). Features:
- Boolean flags - simple on/off toggles for features. SDKs (JS, Python, Go) check flag state in < 10 ms.•Percentage rollouts - roll out a feature to 5% → 25% → 50% → 100% of users gradually.•User targeting - enable a flag for specific user segments (e.g., "enterprise customers" or "internal employees").•A/B testing - split traffic between variants (A/B/C) and track conversion metrics.•Audit log - record who changed what flag, when, with the ability to roll back.•SDK caching - SDKs cache flag values locally and poll for updates every 30 seconds.
Targeting 500 applications with 100,000 flag evaluations per second across all clients.
Design a feature flag service that lets teams toggle features, run A/B tests, and do gradual rollouts. Build this architecture under realistic production constraints, then validate tradeoffs in the design lab simulation.
Request path: The solution keeps ingress, service logic, and stateful dependencies separated so each layer can scale independently.
Reference flow: Web Clients -> API Gateway -> API Service -> Primary SQL DB -> Redis Cache