Design a feature flag service
Let teams turn features on or off and roll them out to a percentage of users without deploying, like LaunchDarkly.
Functional requirements
- Create flags with on/off and percentage rollouts
- Target users by attributes such as country
- Apps read flag values on every request
Non-functional requirements
- Flag checks add under 1 ms
- Changes reach all servers within seconds
- Apps keep working if the flag service is down
Scale
- 500 customer apps
- 10K flags
- Billions of flag checks per day
How you’ll be scored
9 checks covering your diagram and your notes, and any valid approach counts. Hints appear for anything you miss. Common mistakes, such as single points of failure or components you never explain, cost points. How grading works
What interviewers look for
- Clarify before you draw. State what is in and out of scope. For “Design a feature flag service”, that starts with: Create flags with on/off and percentage rollouts; Target users by attributes such as country; Apps read flag values on every request. Interviewers notice candidates who pin the requirements down first.
- Turn the scale into numbers. The scale (500 customer apps; 10K flags; Billions of flag checks per day) should become requests per second, storage and bandwidth, and those figures should drive your choices. Estimates with units carry more weight than adjectives.
- Show how each quality is met. Your design should visibly deliver: Flag checks add under 1 ms; Changes reach all servers within seconds; Apps keep working if the flag service is down. Saying that it does isn’t enough; point to the part of the design that makes it true.
- Expect follow-ups on the hard parts. Interviewers usually probe configuration, caching and push here. This is an easy problem, so interviewers expect the fundamentals done cleanly: a clear request path, the right kind of data store, and a reason for each component.
- Explain failure and trade-offs. Say what happens when a component fails, where a single point of failure would hurt, and what you chose not to build. Naming a trade-off is a stronger answer than claiming there isn’t one.