Principles behind Traffic Distribution

Bucketing

Bucketing is the process for distributing and assigning users to test groups in A/B testing. This article explains how bucketing works.

📘

Bucketing is deterministic.

Users are always assigned to the same test group unless the conditions of the A/B test change.

Each A/B test has a seed and 10,000 slots that will be used to randomly shuffle users and bucket them.

Hash the A/B test's seed and user identifier into an integer that maps to a slot range via the MurmurHash function. MurmurHash is deterministic, so the same user always maps to the same integer unless the seed changes. As long as the user identifier is also shared consistently between systems, the result will be the same regardless of the type of SDK used.

3096

Traffic Allocation

3688

1 Slot = 0.01%

10,000 slots correspond to the allocation ratio of traffic. Slot 0 corresponds to 0%, and slot 9999 corresponds to 100%. That is, 1 slot occupies 0.01% of the quota.

3242

Traffic allocation 0%

When traffic allocation is 0%, none of the users are assigned to the A/B test.

3932

Traffic allocation 40%

If the traffic allocation is set to 40%, users mapped to a slot from slot 0 to 3999, which are slots corresponding to 40%, are allocated and exposed to A/B testing.

Test Group Distribution

1928

Traffic allocation 40% / test group distribution A(50) : B(50)

If the A/B test with 40% allocated has two groups A and B and the group distribution ratio is 50:50, the allocated 4000 slots are distributed according to the group distribution ratio.

Users mapped to slots 0 to 1999 are assigned to group A, users mapped to slots 2000 to 3999 are assigned to group B.

1938

Traffic allocation 60% / group distribution A(50) : B(50)

If we increase the traffic to 60%, we need to allocate an additional 20% of slots. The system then allocates the remaining 2000 slots (20%) by distributing them according to the group distribution ratio.