Skip to content

Use Murmurhash algorithm for the phased rollout #2

@rainerschoe

Description

@rainerschoe

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:

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

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions