> For the complete documentation index, see [llms.txt](https://openai.gitbook.io/code-cheatsheets/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://openai.gitbook.io/code-cheatsheets/all/cs_fundamentals/featureflags.md).

# Feature Flags

Easily enable or disable features for experimentation or slow rollouts

* <https://www.growthbook.io/>)

<https://software.rajivprab.com/2019/12/19/when-feature-flags-do-and-dont-make-sense/>

### Simplest

Store in a db

name | is\_active

Then write api to fetch is\_active for that name before enabling. Or just fetch all feature flags on load and store in cookie or localStorage so persists. Hash user\_id and name into % so stable percentage difference. Add custom flagging for user field and add in flags check.

#### Why feature flag provider?

A feature flag provider has a seperate db, audit log, user interface, code to automatically keep clientside flags updated(worker with socket), **enable for selective users**,

Providers:

* LaunchDarkly
* Posthog
* \[Growthbook]\(
