Flagr is an open source Go service that delivers the right experience to the right entity and monitors the impact. It provides feature flags, experimentation (A/B testing), and dynamic configuration — all behind clear swagger REST APIs for flag management and evaluation.
openflagr/flagr is the community-driven home of Flagr, advancing development beyond the original checkr/flagr.
https://openflagr.github.io/flagr
| Page | Content |
|---|---|
| Overview | Concepts, running example, architecture |
| Use Cases | Feature flagging, A/B testing, dynamic configuration patterns |
| Server Configuration | All environment variables, database drivers, auth, data recorders |
| JSON Flag Source | GitOps workflows, JSON format spec, validator, CI integration |
| Datar Analytics | In-memory aggregate analytics engine |
| Notifications | Webhook configuration and payload format |
| API Reference | Swagger/OpenAPI spec |
| Capability | Description |
|---|---|
| Feature flags | Binary on/off toggles, kill switches, targeted rollouts by audience segment |
| A/B testing | Multi-variant experiments with deterministic distribution and rollout control |
| Dynamic configuration | Per-variant JSON attachments for runtime config without redeploy |
| GitOps / Flags-as-code | Load flags from JSON files or HTTP URLs. Manage flags in Git, validate in CI, rollback with git revert |
| Datar analytics | Built-in in-memory aggregate analytics — evaluation counts by variant, segment, and day. No external pipeline required |
| Webhook notifications | HTTP POST webhooks on every flag create/update/delete/restore with retry and exponential backoff |
| Multi-database | SQLite (dev), MySQL, PostgreSQL, and JSON sources |
| Eval cache | In-memory cache with short-circuit reload — only refreshes when flag snapshots change |
| Vue 3 UI | Modern management UI built with Vite, Vue 3, and Element Plus |
docker pull ghcr.io/openflagr/flagr
docker run -it -p 18000:18000 ghcr.io/openflagr/flagr
# Open the Flagr UI
open localhost:18000Or try the hosted demo at https://try-flagr.onrender.com (cold starts may take a moment; every push to main triggers a redeploy):
curl --request POST \
--url https://try-flagr.onrender.com/api/v1/evaluation \
--header 'content-type: application/json' \
--data '{
"entityID": "127",
"entityType": "user",
"entityContext": { "state": "NY" },
"flagID": 1,
"enableDebug": true
}'Flagr has three core components:
- Evaluator — evaluates incoming requests against an in-memory
EvalCacheof all flags, segments, variants, constraints, and distributions. The cache refreshes periodically (default 3s) and short-circuits when no new snapshots exist. - Manager — CRUD gateway for all flag mutations.
- Metrics — data pipeline for evaluation results. Supports Kafka, AWS Kinesis, Google Pub/Sub, and built-in Datar analytics.
See the architecture overview for the full diagram and evaluation algorithm.
Tested with vegeta — 2,000 req/s sustained:
Requests [total, rate] 56521, 2000.04
Duration [total, attack, wait] 28.26s, 28.26s, 365.53µs
Latencies [mean, 50, 95, 99, max] 371.63µs, 327.99µs, 614.92µs, 1.39ms, 12.50ms
Success [ratio] 100.00%
Status Codes [code:count] 200:56521
| Language | Client |
|---|---|
| Go | goflagr |
| JavaScript | jsflagr |
| Python | pyflagr |
| Ruby | rbflagr |
openflagr/flagr— Apache 2.0checkr/flagr— Apache 2.0 (original project)
