Build vs buy: should you build your own feature flag system?
Every engineering team has this conversation eventually. Someone says “feature flags are just booleans in a config file, why are we paying for a tool?” Someone else says “yes but targeting.” And then the team spends two quarters building what they could have rented for $79/month.
I have been on both sides of this conversation. Here is the honest version.
What you can actually build in a day
A boolean flag backed by a flags.json or a database table. An admin UI with a toggle. A helper function that reads the value. In most web frameworks this is under 100 lines of code.
If that is all you need, build it. Feature flag platforms are overkill for three flags that change twice a year.
What you will need after three months
Once you have more than a handful of flags, the following things show up, one at a time, and each of them is a small project:
Targeting rules. “Show this to admins but not to trial users in Germany.” You need a rule engine. You need a way to define attributes. You need to evaluate rules consistently across client and server.
Environments. Dev, staging, and production need separate flag states. You need a way to promote configs between them without accidentally flipping prod.
Caching. Reading flags from the database on every request is slow. You need a local cache. You need to invalidate the cache when flags change. You need to handle the stampede when 200 instances reload at once.
Real-time updates. If a flag change takes five minutes to propagate, it is not a kill switch. You need SSE or webhooks. You need to handle reconnects.
Audit logs. Someone will eventually flip the wrong flag in prod. You will need to know who did it and when.
Percentage rollouts. This sounds simple until you want the same user to get the same variant consistently across sessions. You need deterministic hashing. (We wrote about why we use deterministic hashing — it’s not obvious.)
Access control. Developers can toggle dev flags. Only release managers can toggle prod. Some flags are sensitive and should not be visible to the whole team.
SDKs. You want to call the system from your React app, your Node API, your mobile app, your background workers. Each needs a client with the same evaluation semantics.
None of these are hard individually. All of them together are a sizable project.
The real cost of building
I have watched this project at three companies. The pattern is always the same:
- Someone builds the minimum viable version in a week.
- It works. Teams start using it.
- Over six months, feature requests pile up: targeting, environments, better UI, audit logs.
- A dedicated engineer or team takes it over. Maintenance is their job.
- Two years in, the internal tool is a 20,000-line codebase with tech debt, and nobody wants to touch it.
The salary of that engineer alone is more than any feature flag tool on the market.
When building makes sense
I am not saying never build. There are cases where it makes sense:
- Regulatory constraints. You are in a market where you cannot send user data to a third-party US-hosted tool. Build.
- Extreme scale. You are evaluating a billion flags per second and no vendor can match your latency needs. Build, but know that you are building infrastructure, not a side project.
- Deep integration. Flags are a core part of your product (e.g., you sell A/B testing as a feature). Build, because it is part of what you sell.
- You have already built it and it works. Don’t throw out a working system because a vendor pitches you.
For everyone else, buy.
What buying actually gets you
A good feature flag platform handles the things above out of the box. SDKs for the languages you use. Targeting rules. Environments. Audit logs. Real-time sync. Percentage rollouts with consistent hashing.
The differences between vendors are at the edges: developer experience, pricing model, CLI support, framework coverage, AI tool integration. We compare Flagify vs LaunchDarkly in detail if you are shopping.
tl;dr
If you have fewer than 5 flags and no plans to grow, build. Beyond that, you are spending engineering time on infrastructure that is not your product. Pay the $79/month.
Flagify gives you feature flags, targeting, environments, and audit logs starting at $79/mo with no per-seat pricing. See the quick start to set up your first flag in under five minutes.
Start for free — 50K evaluations per month on the free plan, no credit card required.