Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Having 13,000 feature flags is just insane. I'm so happy that at my previous job I insisted that we use "release" flags for every new feature were there wasn't an explicit requirement to be able to enable it for some customers and disable it for other ones. We made it so that you couldn't enable one of these release flags in production, and developers were required to remove the code for the flag before final tests and release. It requires a little more work for every feature which requires a flag, but it really pays off in terms of reduced code base complexity in just a few months.


It is indeed insane, but there is some value to leaving coarse feature flags in production. I've seen outages resolved by flipping a feature flag that was accidentally left in production months after deployment, where without it we would've had to resort to more drastic or hackish measures to restore service. (Eg. If one query is overloading the database, you can disable the feature that runs the query and investigate the real problem at your leisure while the database stabilizes.)

That only works in moderation, though - with 13k flags, there's no way the particular combination that you're about to release directly on production has been properly tested.


This is also known as a "kill switch" which is technically slightly different than feature flags that get used for release safety.

You can bake kill switches into many features as a core part of the application for operational reasons.

One similar thing I like is having global "maintenance" switches so you can gracefully put an application into maintenance mode.


Yeah, fair enough. At some point my ex-employer wised up and implemented kill switches on purpose instead of by accident.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: