Evaluation Engine
The evaluation engine is the core of FeatureSignals. It determines what value a feature flag returns for a given evaluation context.
Evaluation Flow
text
1. Flag exists? → NO: NOT_FOUND
2. Flag expired? → YES: DISABLED
3. Env state enabled? → NO: DISABLED
4. Mutex group winner? → NO: EXCLUDED
5. Prerequisites met? → NO: PREREQ
6. Targeting rules → MATCH: value
7. Default rollout → IN: rollout
8. A/B variants → ASSIGN variant
9. Fallthrough → default valueEach step short-circuits — the first matching condition determines the result.
Consistent Hashing
FeatureSignals uses MurmurHash3 (x86, 32-bit) for all bucket assignments:
text
hash = MurmurHash3(flagKey + "." + userKey, seed=0)
bucket = hash % 10000 // range: 0–9999Performance
- Zero-allocation hot path (except rule sorting)
- No database calls during evaluation (cache hit)
- No network calls from SDKs during variation reads
- O(rules + conditions) per evaluation