Skip to main content
← CONCEPTS / SYSTEM-DESIGN
An end-to-end domain learning journey

Deterministic MurmurHash3 Experiment Bucketing
& Orthogonal Salt Isolation.

Random per-request coin flips break session consistency, while un-salted hashes create carry-over bias across experiments; MurmurHash3(user_id + ':' + salt) % 10000 guarantees deterministic, orthogonal bucketing.
Start the journey2 sections· Last modified Dec 1, 2026
FIRST PRINCIPLES. PRODUCTION SCALE.
The idea to keep with you

When scaling experimentation, use 10,000-bucket salted MurmurHash3 so rollouts ramp monotonically without DB reads.

TL;DR30-second simplified summary
▾

Guarantees zero network overhead, sign-safe Java modulo, and orthogonal experiment layers.

Before you begin · Building blocksAlready know these? Jump to Stage 01 ↓
Non-cryptographic hash functions (MurmurHash3)
Carry-over bias in A/B testing
Modulo bucket mapping
Full walkthrough · 2 stages
01
Stage 1 • Problembeginner

Why Random Coin Flips & Un-Salted Hashes Fail.

Why this matters: Show how non-deterministic or un-salted assignment corrupts A/B metrics.

Calling random.random() on each request flips a user between Variant A and Control on page reload. Hashing user_id alone without a salt assigns the exact same cohort to every experiment, coupling results.

02
Stage 2 • Mechanicsintermediate

10,000-Bucket Ruler & Monotonic Ramps.

Why this matters: Support 0.01% granularity rollouts without reshuffling existing users.

Mapping hashes onto [0, 9999] lets teams ramp Variant A from [0, 99] (1%) to [0, 999] (10%) monotonically: every user in [0, 99] stays in Variant A.

Practice · Explain the consequences

Practice: Make the trade-off yourself.

Question 1 of 3
Score: 0/3

Why append an experiment-specific salt before hashing user_id?

Recommended Learning Flow