How I Built a Self-Hosted Alternative to LaunchDarkly in 300 Lines of Code
Feature flags and A/B testing are table stakes. The hosted services charge per seat, per flag evaluation, per environment, per month. For a solo product with a handful of active experiments, the bill adds up to a line item that should not exist. I built Flip as a self-hosted replacement because I wanted three things: a drop-in SDK, a clean dashboard, and a real statistical significance engine that does more than show me which variant got more clicks.
This is how the important bits work.
Deterministic variant assignment
Assigning a user to a variant needs three properties. The same user must always get the same variant (consistency across page loads). The assignment should not require any round trip (no server call, no cookie write). Variants should distribute evenly by weight even on small samples.
MurmurHash3 handles all three. It is a non-cryptographic hash function designed for lookup keys: fast, well-distributed,...
Copyright of this story solely belongs to hackernoon.com. To see the full text click HERE