Hacker News new | ask | show | jobs
by twisteriffic 497 days ago
We did this. Two tables. One for feature flags, with name, desc, id, enum (none, defaultToEnabled, overrideToDisabled). One for user flag overrides, with flagId, userId, enum (enabled, disabled).

The combination of these two has been all we've ever needed. User segmentation, A/B testing, pilot soft launch etc are all easy.

1 comments

Would you mind expanding on the usage of enums for the feature flags table? Why not use a boolean?
We actually did use booleans, I just found it easier to explain using enums, and the code would have been simpler if we'd done it that way.