← Questions
Feature flags across channels with inheritance
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Build a feature flag store organized by channels. Each channel has an id, its own map of flag names to true or false, and zero or more parent channels. Looking up a flag on a channel returns the channel's own value if it sets one, otherwise the value from the nearest parent that sets it, and false when no ancestor does.
- Implement creating a channel (with its flags and parents), reading a flag, setting a flag on a channel, and deleting a channel.
- In production, lookups far outnumber changes. How would you make reads fast?
- When a flag changes on one channel, how do you keep lookups correct and fast for every channel that inherits from it, at scale?
Reported for a Weights & Biases team, now part of CoreWeave.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding