Flagr

Feature flagging, A/B testing, and dynamic configuration microservice in Go

Deploy Flagr

Postgres

railwayapp-templates/postgres-ssl

Just deployed

/var/lib/postgresql/data

Flagr

openflagr/flagr

Just deployed

flagr logo

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. It has clear swagger REST APIs for flags management and flag evaluation.

Flagr Concepts

The definitions of the following concepts are in API doc.

  • Flag. It can be a feature flag, an experiment, or a configuration.
  • Tag. This is a descriptive label attached to a flag for easy lookup and evaluation.
  • Variant represents the possible variation of a flag. For example, control/treatment, green/yellow/red, etc.
  • Variant Attachment represents the dynamic configuration of a variant. For example, if you have a variant for the green button, you can dynamically control what's the hex color of green you want to use (e.g. {"hex_color": "#42b983"}).
  • Segment represents the segmentation, i.e. the set of audience we want to target. Segment is the smallest unit of a component we can analyze in Flagr Metrics.
  • Constraint represents rules that we can use to define the audience of the segment. In other words, the audience in the segment is defined by a set of constraints. Specifically, in Flagr, the constraints are connected with AND in a segment.
  • Distribution represents the distribution of variants in a segment.
  • Entity represents the context of what we are going to assign the variant on. Usually, Flagr expects the context coming with the entity, so that one can define constraints based on the context of the entity.
  • Rollout and deterministic random logic. The goal here is to ensure deterministic and persistent evaluation result for entities. Steps to evaluating a flag given an entity context:
    • Take the unique ID from the entity, hash it using a hash function that has a uniform distribution (e.g. CRC32, MD5).
    • Take the hash value (base 10) and mod 1000. 1000 is the total number of buckets used in Flagr.
    • Consider the distribution. For example, 50/50 split for control and treatment means 0-499 for control and 500-999 for treatment.
    • Consider the rollout percentage. For example, 10% rollout means only the first 10% of the control buckets (again, use the previous step example, 0-49 out of 0-499 will be rolled out to control experience).

For more details, see the full Flagr Overview


Template Content

More templates in this category

View Template

Foundry Virtual Tabletop

A Self-Hosted & Modern Roleplaying Platform


View Template

(v1) Simple Medusa Backend

Deploy an ecommerce backend and admin using Medusa


View Template

peppermint

Docker-compose port for peppermint.sh