DevPrep

All topics › Software architecture

How do you design feature flags?

Middle PRO

The point

A feature flag is a switch that lets you ship code in a release turned off and enable it later without a new build: gradual rollout, A/B tests, a kill switch for a misbehaving feature, different configurations for QA. Sources: remote config (Firebase Remote Config, your own backend), a local override for a debug menu, a default value in code.

The rest of this answer, with code and interview follow-ups, is in the DevPrep app.

Read the full answer in DevPrep

Practice this before your interview

DevPrep turns these answers into one-minute challenges: what does this code print, find the bug, mock interviews. One challenge a day.

Get DevPrep on the App Store