Ask HN: How did you build feature flags?
1–10 of 32 posts
Re: Ask HN: How did you build feature flags?
#2There are millions variants to implement a product, even within the same environment/infra constraints.
If you elaborate your specific goals and products - that may be a very fruitful topic.
Re: Ask HN: How did you build feature flags?
#3Re: Ask HN: How did you build feature flags?
#4Re: Ask HN: How did you build feature flags?
#5Re: Ask HN: How did you build feature flags?
#6State kept in a database table indexed on customer. One row per customer/flag name, only there when the flag is set.
We keep active flags names as constants and put into an array for easy looping in our admin ux. This makes it easy to find usage and clean them up after launch.
These are passed to the browser so the frontend can check flags, and via grpc context to any downstream services.
Re: Ask HN: How did you build feature flags?
#7I worked at an adtech company that had our own feature flag system built. Absolute pain to work with. To be fair, it had been built 6 years prior, and I worked there 4 years ago, so there were less off the shelve solutions at the time.
Switched to a company that used an off the shelve solution and it was 100x easier to work with.
Re: Ask HN: How did you build feature flags?
#8Re: Ask HN: How did you build feature flags?
#9Re: Ask HN: How did you build feature flags?
#10If multi-tenant things get complicated quite quickly. It may be worth looking into existing packages/libraries for your stack. I would be careful about using a third party service for this due to the latency it may introduce.
If not then just have a FEATURES constant. The value can be as primitive as an associative array, dict, hashmap, or struct. The keys are your flags and their values are booleans.
Not your forever choice, but very simple, quick, and easy to use.