Live data from Hacker News

Ask HN: How did you build feature flags?

news.ycombinator.com

21–30 of 32 posts

Re: Ask HN: How did you build feature flags?

#21
We have below setup.

There are Global, Org, Store, User level settings type of each. User has the highest priority over others and values are read of highest to least priority and one final set of flags are fetched. When page loads we fetch them from cache(Browser + Backend - Redis) OR DB.

This works well with two tables in DB, CRUD APIs, UI for settings on various level.

Re: Ask HN: How did you build feature flags?

#22
post #19

Choosing a good solution heavily relies on whether your product is multi-tenant or not. If 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, ha…

Ah we're multi-tenant. In what ways do you feel like it gets complicated quickly?

Because now you have different tenants having different experiences and breaking your application in strange new ways you could never have predicted!

Re: Ask HN: How did you build feature flags?

#23

I work for Flagsmith these days, but formerly I was in charge of managing a lot of Trust and Safety related concerns for Clubhouse. This involved deleting a lot of records to appease regulators and creating custom features to handle stuff like CSAM and we used a lot of feature flags there to keep systems safe in case of an event. The most important architectural decision that we made was pushing some of the feature f…

Fascinating. This is exactly what I'm juggling between - whether I want to store the flag in our DB vs. on-the-fly evaluation. Just signed up for a demo w/ Flagsmith :)

Re: Ask HN: How did you build feature flags?

#24
post #19

Earlier quoted context omitted.

Ah we're multi-tenant. In what ways do you feel like it gets complicated quickly?

Because now you have different tenants having different experiences and breaking your application in strange new ways you could never have predicted!

Yeah, I just tried onboarding onto PostHog and I couldn't achieve what I wanted with my multi-tenant application.

Re: Ask HN: How did you build feature flags?

#25
post #19

Earlier quoted context omitted.

Ah we're multi-tenant. In what ways do you feel like it gets complicated quickly?

Because now you have different tenants having different experiences and breaking your application in strange new ways you could never have predicted!

Seemed like I can only filter by the end-user even though I wanted to filter by tenant.

Re: Ask HN: How did you build feature flags?

#26

Easiest way is a DB entry / Environment Variable / Config that turns a feature on and off, some central class/object that reads it and is a source of truth and a bunch of "if" statements in the right place to hide the feature and make it unavailable via APIs if turned off.

We do this at $BIG_TECH. Nothing too crazy. I should add that it tied into our company user directory though, so toggles can happen per user as well and support multiple data types

Re: Ask HN: How did you build feature flags?

#27

I work for Flagsmith these days, but formerly I was in charge of managing a lot of Trust and Safety related concerns for Clubhouse. This involved deleting a lot of records to appease regulators and creating custom features to handle stuff like CSAM and we used a lot of feature flags there to keep systems safe in case of an event. The most important architectural decision that we made was pushing some of the feature f…

I'm trying to onboard onto Flagsmith right now and it seems like the identities feature [0] is exactly what I need but I can't seem to figure out how to enable it for an arbitrary string value. For example - I want to feed the SDK "mintlify" and get a response on whether "mintlify" should have a feature or not.

[0] https://docs.flagsmith.com/basic-features/managing-identitie...

Re: Ask HN: How did you build feature flags?

#28
post #27

I work for Flagsmith these days, but formerly I was in charge of managing a lot of Trust and Safety related concerns for Clubhouse. This involved deleting a lot of records to appease regulators and creating custom features to handle stuff like CSAM and we used a lot of feature flags there to keep systems safe in case of an event. The most important architectural decision that we made was pushing some of the feature f…

I'm trying to onboard onto Flagsmith right now and it seems like the identities feature [0] is exactly what I need but I can't seem to figure out how to enable it for an arbitrary string value. For example - I want to feed the SDK "mintlify" and get a response on whether "mintlify" should have a feature or not. [0] https://docs.flagsmith.com/basic-features/managing-identitie...

Have you checked out this section of the docs?

https://docs.flagsmith.com/clients/server-side#get-flags-for...

Re: Ask HN: How did you build feature flags?

#29
Disclaimer: I work at Amplitude, where we offer a feature flagging and experimentation platform

Hey hahnbee, I echo a bunch of other folks sentiment that local evaluation mode is pretty important so you’re not constantly making network calls to figure out the state of your flags, that’s one of the biggest things.

The other thing I’d add is that it’s pretty important (esp as a homegrown system) to build user tracking into your flags so you know that for a given flag, which user saw which version at what time. This is so critical for debugging and issue resolution so you’re not left guessing (and doubly important for experiments where you want to run stats on different populations).

You probably will not be surprised to find out that we have this stuff built into our system, and that you can get started with our flags for free! So here’s my shameless plug to head over to Amplitude.com and check out our stuff

Re: Ask HN: How did you build feature flags?

#30
post #27

Earlier quoted context omitted.

I'm trying to onboard onto Flagsmith right now and it seems like the identities feature [0] is exactly what I need but I can't seem to figure out how to enable it for an arbitrary string value. For example - I want to feed the SDK "mintlify" and get a response on whether "mintlify" should have a feature or not. [0] https://docs.flagsmith.com/basic-features/managing-identitie...

Have you checked out this section of the docs? https://docs.flagsmith.com/clients/server-side#get-flags-for...

I did not. Thanks for sending!
Post reply on HN