All problems

Feature Flags

Flag evaluation on the hot path of every request — it has to feel free.

easy~12 min Pro Simulator · +80 ptsTheory +35 pts
The build

Keep every flag evaluation fast and correct while a deploy wave re-evaluates the whole fleet at once.

Flag evaluation sits on the hot path of every single request an app makes — it has to add near-zero latency and never be the reason a request fails. The evaluation set is tiny and changes rarely, so almost every lookup should be a cache hit, never a trip to the store.

Components in play

  • Flag gatewayAccepts SDK evaluation requests and returns flag states.
  • Flag cacheHolds the whole (tiny) rule set in memory for near-zero latency.
  • Flag storeSource of truth for flag definitions and targeting rules.

Graded on these SLOs

  • ≥ 99.00%Evaluations succeed
  • ≤ 50 msEvaluation p99
  • ≥ 5.5k rpsSustain the deploy wave
  • ≤ 85%Headroom
  • ≤ 5Lean footprint
Base 5,500 rps42s run 3 scripted failures

The brief

Design a feature-flag evaluation service like LaunchDarkly. Every app instance's SDK asks 'is this flag on for this user?' on essentially every request it handles — evaluation sits directly on the hot path, so it has to add near-zero latency and never be the reason a request fails. The flag rule set itself is small and changes rarely; the challenge is serving it at the request rate of every app that depends on it.

Functional

  • Evaluate a flag for a given user/context and return its value
  • Update a flag's targeting rules and have it take effect quickly
  • Support percentage rollouts and per-user targeting

Non-functional

  • Evaluation is on the hot path of every request — sub-tens-of-ms, always
  • A flag-service blip must never fail the caller's real request
  • Deploy waves cause every instance to re-evaluate its flag set at once

Warm-up: design decisions

Optional theory to prime the calls a senior engineer would make before you build.

Pro

Solving is a Pro feature

Unlock the on-canvas AI design coach, per-run design reviews, the chaos simulator and all 12 problems for $15/month.

  • AI design coach on your canvas — pins failure points & over-engineering
  • Honest AI design review on every run
  • All 12 problems + unlimited chaos simulator
  • Points, levels & leaderboard
Get started