Open
Description
https://ibm-quantumcomputing.slack.com/archives/C07LYBYEFCH/p1732591598349079
let hashValue;
hashValue = murmurhashV3(entityID + ':' + featureID); // outputs a integer from 1 to 100
if (hashValue < rolloutPercentage) {
// serve featureflag's enabled value
} else {
// serve featureflag's disabled value
}
Example implementation:
- Node: https://github.com/IBM/appconfiguration-node-sdk/blob/master/lib/configurations/ConfigurationHandler.js#L576
- Go: https://github.com/IBM/appconfiguration-go-sdk/blob/master/lib/internal/models/Feature.go#L191
Some info:
- murmurhash produces the same input for a given string. When a entityID gets evaluated n-number of times, all the time it gets the same featureflag’s value
- we would need a large sample to test the partial rollout. Atleast 100 samples(100 unique entityIDs). Assume, featureflag rollout percentage is set to 30%. When we pass 100 different entityIDs, and check the evaluated value. The total count which received enabled value will be 30 & disabled value will be 70.
Metadata
Assignees
Labels
No labels