USA | CoreWeave | Technical Coding Onsite
Summary
I completed a technical coding onsite interview for a Weights and Biases role at CoreWeave, which involved designing and implementing a feature flagging system, followed by discussions on system optimization and scaling.
Full Experience
Completed technical coding onsite for Weights and Biases role.
Question
You are tasked with creating a feature flagging system
The system consists of channels, with each channel having:
- a unique ID
- a mapping of feature flags to boolean values
- its parents (if any)
A channel can inherit features from other channels:
- If a feature is defined in a channel, return the value for that feature
- If a feature is not defined in a channel, it should inherit the value from its closest parent channel
- If a feature is not defined in any parent channel, it should default to false
Implement the following functions for the feature flagging system:
create_channel(channel_id, features, parents)get_feature(channel_id, feature_name)set_feature(channel_id, feature_name, value)delete_channel(channel_id)
Followups
- Suppose we deploy this system in prod, we don't as much reads as writes. How would you optimize the reads?
- What happens if you update a feature flag value for a channel. How do you ensure that the lookups work at scale?
Interview Questions (3)
Design and Implement a Feature Flagging System
You are tasked with creating a feature flagging system
The system consists of channels, with each channel having:
- a unique ID
- a mapping of feature flags to boolean values
- its parents (if any)
A channel can inherit features from other channels:
- If a feature is defined in a channel, return the value for that feature
- If a feature is not defined in a channel, it should inherit the value from its closest parent channel
- If a feature is not defined in any parent channel, it should default to false
Implement the following functions for the feature flagging system:
create_channel(channel_id, features, parents)get_feature(channel_id, feature_name)set_feature(channel_id, feature_name, value)delete_channel(channel_id)
Optimize Reads for Feature Flagging System
Suppose we deploy this system in prod, we don't as much reads as writes. How would you optimize the reads?
Scaling Feature Flag Updates and Lookups
What happens if you update a feature flag value for a channel. How do you ensure that the lookups work at scale?