CloudBees Feature Flags utilizes a distributed algorithm. This algorithm is similar to tossing a coin on the device. But once a coin is tossed the result is consistent for a feature flag.
The client side SDK generates a UUID (called
rox.distinct_id) and serializes it on the device.
Every feature flag has its own seed to make sure there isn’t a statistical bias between 2 feature flags.
The SDK takes the seed and
distinct_idand runs a hash function that is mapped to a double number from 0-1.
If you select a 50% split, for example, then we are checking if the hash result is smaller the 0.5.
The result is consistent, every time a user opens the app they will get the same result (unless you changed percentage).
If you increase percentage, all your existing users that already received true value will keep getting it.
If you decrease percentage, some of your users will stop receiving a true value even if they have received one before.
A single user’s place in the bucket is different in every feature flag (so your users will not always get a new feature).
Override distinct_id with user id
You can choose to override the
See also Flag context.