TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Do you use feature flags? What's the best tool for the job?

9 点作者 nshntarora超过 4 年前
I'm currently evaluating tools to add feature flags to my application at work. Looking for open-source or SaaS tools you folks have used or are currently using.

10 条评论

yoz超过 4 年前
Hi, I&#x27;m a Developer Advocate at LaunchDarkly: <a href="https:&#x2F;&#x2F;launchdarkly.com&#x2F;" rel="nofollow">https:&#x2F;&#x2F;launchdarkly.com&#x2F;</a><p>Obviously I&#x27;d like you to use our service, but I&#x27;d rather that you find the one that best suits your business needs. There are plenty of good open source feature management systems out there. Just - whatever you do - don&#x27;t fool yourself into building your own. Your time&#x27;s worth more than that.<p>If you want a deeper argument, I wrote it up here, along with some examples of good open source systems: <a href="https:&#x2F;&#x2F;launchdarkly.com&#x2F;blog&#x2F;feature-management-platform-build-or-buy&#x2F;" rel="nofollow">https:&#x2F;&#x2F;launchdarkly.com&#x2F;blog&#x2F;feature-management-platform-bu...</a>
kyle-ssg超过 4 年前
I think something to note on this as I already see this in the comments. There&#x27;s always the suggestion of &quot;Yeah that&#x27;s easy we could do that&quot;.<p>To this I&#x27;d say it totally depends on the usecase, I&#x27;ve seen 10s of tech teams build this badly and end up causing more harm than good, some even just static config files that require a build to change which totally defeats the point.<p>I think looking for an open source tool is great, to this I&#x27;d say consider the following :<p>- Before anything else, you&#x27;d definitely want the ability to turn the flags off per environment (dev&#x2F;prod etc) without having to deploy code.<p>- Do you want to control who can manage features? Quite often you&#x27;d want to enable non-tech people to manage &#x2F; test features.<p>- How scalable does it need to be? Some people might want to just not have to worry about serving thousands or millions of flags.<p>- Do you want to serve flags based on users or maybe even groups of users? I&#x27;ve seen attempts at this but then you start having to worry about setting traits and building some sort of rules engine.
TheSpiciestDev超过 4 年前
I&#x27;ve worked with Split.io at a client, they had libraries for our frontend and our backends. Their interface was also neat and would allow you to separate out your feature flags per environment, per user or user group, or through any other custom condition. They&#x27;d also provide statistics for A&#x2F;B testing, but I never got that far with them to try it out.<p>Theirs was dynamic in that you could change the rules and at a given interval the connected user&#x27;s app would refresh and react accordingly. It was pretty complex, I suppose, but I&#x27;d roll out my own and go to something like them if I had a lot more conditions or targets.
mattmanser超过 4 年前
If you mean global feature flags, use the config file built into virtually every single webframework and and an if statement.<p>It&#x27;s really not complicated.<p>Some webframeworks require an app restart for config file changes to be detected, or restart the app automatically when it detects changes to the file, so I&#x27;ve seen people use databases. But it tends to be an overcomplication and it&#x27;s usually turned out to be a bit of a pita. It&#x27;s only worth it if you&#x27;re regulalrly turning the feature on and off.<p>Many languages also support build flags, which strips the extra code out completely, but it&#x27;s an obscure feature, unless you write libraries, that can confuse other programmers.
评论 #24381912 未加载
fullstackwife超过 4 年前
I usually avoid using third-party FF enablement services. Maybe 5 years ago it made more sense to use them, but as of 2020 I can&#x27;t find good reasons anymore. They don&#x27;t solve the right problem. Rolling your own FF enablement solution is cheap nowadays, it&#x27;s much less hassle, much more robust, adjusted to your needs, and it&#x27;s more privacy friendly.<p>KISS, you most likely don&#x27;t need to use an external feature flag &quot;hadron collider&quot;.
deepaksurti超过 4 年前
Like me who didn’t know about feature flags it is described here. [1]<p>[1] <a href="https:&#x2F;&#x2F;www.martinfowler.com&#x2F;articles&#x2F;feature-toggles.html" rel="nofollow">https:&#x2F;&#x2F;www.martinfowler.com&#x2F;articles&#x2F;feature-toggles.html</a>
larsthorup超过 4 年前
Should you use a tool at all? One code file with the flags, and a small piece of router middleware that allows the URL to override the value of flags, and then just if statements. This has served me well on the past 3 frontend projects I have built.
评论 #24365240 未加载
matt_s超过 4 年前
This isn&#x27;t a huge ordeal to DIY. A database table with some fields (name, on&#x2F;off, dates) and a module to call that checks the db. A simple UI&#x2F;API to CRUD those rows.<p>If it&#x27;s a SaaS, how does your app function if the SaaS is unavailable?
评论 #24363124 未加载
评论 #24381829 未加载
dabeeeenster超过 4 年前
We recently open sourced our platform, Bullet Train.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;BulletTrainHQ" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;BulletTrainHQ</a><p>We&#x27;d love feedback!
dyeje超过 4 年前
I typically roll my own. Never had an issue. The flexibility is nice especially if you get into very granular feature flags.