Experiment with Feature Flags, No Account Needed
Feature flags seem simple — a boolean that gates a feature. But real-world implementations involve targeting rules, percentage rollouts, user segmentation, and consistent hashing. Before committing to a feature flag service, you should understand how these mechanisms work.
We built three free API endpoints at FlagBit that let you experiment with feature flag evaluation without creating an account. Test rules, simulate rollouts, and understand bucketing — all through simple API calls.
1. Evaluate Playground: Test Targeting Rules
curl -X POST https://flagbit.anethoth.com/api/v1/evaluate-playground \
-H "Content-Type: application/json" \
-d '{
"rules": [
{"attribute": "country", "operator": "in", "value": ["US", "CA", "GB"], "result": true},
{"attribute": "plan", "operator": "eq", "value": "enterprise", "result": true}
],
"default_value": false,
"context": {"country": "US", "plan": "starter", "user_id": "user-42"}
}'
{
"result": true,
"matched_rule": 0,
"rule_description": "country in [US, CA, GB]",
"evaluation_path": [
{"rule": 0, "attribute": "country", "operator": "in", "matched": true}
]
}
Send targeting rules and a user context, get back which rule matched and why. Supported operators: eq, neq, contains, in, percent. The evaluation_path shows exactly how the engine walked through your rules — useful for debugging complex targeting configurations.
2. Rollout Simulator: See Who Gets the Feature
curl "https://flagbit.anethoth.com/api/v1/rollout/simulate?flag=new-checkout&percentage=25&user_count=10"
{
"flag_key": "new-checkout",
"percentage": 25,
"total_users": 10,
"included_count": 3,
"excluded_count": 7,
"users": [
{"id": "user-1", "bucket": 42, "included": false},
{"id": "user-2", "bucket": 17, "included": true},
{"id": "user-3", "bucket": 91, "included": false},
...
]
}
Simulates a percentage rollout across N users using consistent hashing (MurmurHash3). The key insight: each user always lands in the same bucket for a given flag key, so rolling from 10% to 25% only adds users — it never removes someone who was already included. This is critical for stable rollouts.
3. Bucket Lookup: Where Does a Specific User Land?
curl "https://flagbit.anethoth.com/api/v1/rollout/bucket?flag=new-checkout&user_id=user-42"
{
"flag_key": "new-checkout",
"user_id": "user-42",
"bucket": 67,
"percentage_results": {
"10": false,
"25": false,
"50": false,
"75": true,
"100": true
}
}
Look up exactly which bucket (0-99) a user falls into for a specific flag. The percentage_results shows whether this user would be included at common rollout percentages. Useful for debugging "why isn't this user seeing the new feature?" issues.
Understanding Consistent Hashing
The rollout simulator uses the same consistent hashing algorithm used in production feature flag systems. Here's why it matters:
# User "alice" + flag "new-checkout" → bucket 34
# User "alice" + flag "new-pricing" → bucket 71
# User "bob" + flag "new-checkout" → bucket 12
- Same user + same flag = same bucket, always. Rollouts are deterministic.
- Different flags produce different buckets for the same user, so features are independently randomized.
- Increasing the percentage from 25% to 50% includes everyone who was at 25% plus more users. Nobody gets removed.
This is why feature flags use hashing instead of random number generation — predictability is the whole point.
Build a Feature Flag Decision Engine
You can combine the evaluate and rollout endpoints to model a real feature flag system:
# Step 1: Check targeting rules
# "Is this user in a targeted segment?"
EVAL=$(curl -s -X POST https://flagbit.anethoth.com/api/v1/evaluate-playground \
-H "Content-Type: application/json" \
-d '{"rules": [{"attribute": "plan", "operator": "eq", "value": "pro", "result": true}], "default_value": false, "context": {"plan": "pro", "user_id": "alice"}}')
# Step 2: Check percentage rollout
# "Is this user in the rollout percentage?"
BUCKET=$(curl -s "https://flagbit.anethoth.com/api/v1/rollout/bucket?flag=new-dashboard&user_id=alice")
echo "Rule matched: $(echo $EVAL | jq .result)"
echo "In 50% rollout: $(echo $BUCKET | jq '.percentage_results["50"]')"
Interactive Playground
Don't want to write curl commands? The Rollout Simulator tool page has an interactive UI where you can: adjust percentage with a slider, enter custom user IDs, see bucket distribution visually, and test different flag keys. It calls the same API endpoints under the hood.
Rate Limits
- 60 requests per hour per IP
- No authentication required
- CORS enabled for browser requests
- JSON responses with proper error messages
Need production feature flags with persistent storage, SDK evaluation, and team management? FlagBit starts at $9/month. No SDK required — evaluate flags with a simple REST call.
Try FlagBit free
A free API to evaluate feature flag targeting rules, simulate percentage rollouts across users, and test consistent hashing bucketing. Get started with our free tier — no credit card required.
Get started free →