Open source · Apache-2.0 · Pre-1.0

A/B testing and feature flags you run yourself.

Controlvar is an open-source experimentation platform for engineering teams that run their experiments and feature flags on their own infrastructure.

The demo is read-only, with simulated traffic, and is rebuilt every night.

DocsWalkthroughsSource

The power calculator: the baseline conversion rate, the minimum detectable effect, the sample size each variant needs, and a power curve.

Specific to Controlvar

  • Apache-2.0, SDKs MIT

    The core and full builds are both free and have the same licence. Read the LICENSE.

  • Flags that roll themselves back

    Each active flag's error rate and latency are checked against your thresholds every 5 minutes by default, with an automatic rollback on a breach when you turn that on.

    Safety Monitoring

  • Corrected for several variants

    Frequentist results are judged at the experiment's confidence level, with Benjamini-Hochberg (the default) or Bonferroni correction across its variants.

    How results are judged

  • Sequential testing

    Beta: mSPRT with always-valid confidence intervals, so you can read results at any time.

    Sequential Testing & Early Stopping

  • Compose, Helm or AWS CDK

    Docker Compose: one host, on the published images.

    Kubernetes: a Helm chart, which CI installs on a kind cluster.

    AWS CDK: stacks that provision the API, the dashboard and their data stores in your AWS account.

  • Tested statistics

    Tests check the analysis against known answers: the false-positive rate of A/A tests, interval coverage and a planted lift.

What Controlvar does not do is in Limitations; its main capabilities are in What Controlvar does today.

How it works

  1. Run it

    Clone the repository and start it from the root. It runs four containers: Postgres, Redis, the API and the dashboard. The first start builds the images, creates the database and applies the demo seed.

    Then open localhost:3000. The quick start has the default credentials and what to change before anyone else can reach it.

    git clone https://github.com/Controlvar/controlvar.git
    cd controlvar
    docker compose up -d --wait

    Or install on AWS with one command, a beta that installs the core profile in us-west-2; as of v0.37.0 it has been run end to end once, in a test account, and it is not for production data.

  2. Add the SDK

    Sticky experiment assignment, then a conversion tracked for that experiment. The JavaScript and Python SDKs are on npm and PyPI as betas.

    // npm install @controlvar/js-sdk
    const assignment = await client.getAssignment('checkout_button_color', user);
    await client.track('user-123', 'purchase', { value: 49.99, experimentKey: 'checkout_button_color' });

    The whole example in the JavaScript guide

  3. Read the result

    The change on each metric with its p-value, whether the planned sample is reached, and a sample ratio check of the traffic split.

    How to read a results page, in the user guide

The Controlvar books

Engineering and programming books that use Controlvar's own code for their examples. They are for newcomers to a language or framework, engineers who already code, and contributors. The licence is CC BY 4.0.

All the books

Roll features out gradually, with automatic rollback

Sticky assignment, and gradual rollouts with configurable stages.

  • Error rate and latency checked against your thresholds, and an automatic rollback on a breach when you turn that on
  • Targeting with 20+ operators: semantic version comparison, geo-distance, time windows and array operations
  • Switch a flag on and off, and find each change in the audit log
  • Local evaluation (beta): the JavaScript and Python SDKs answer flags in a server process from a downloaded ruleset, checked against cases generated by running the server's own evaluator.

Gradual Rollouts in the docs

A feature flag's page in the dashboard: its rollout schedule in stages, with the current stage, beside its safety check on the error rate.

Plan tests and analyse results

Work out a test's sample size in the power calculator, which needs no account.

  • Frequentist and Bayesian analysis
  • Sequential testing (beta): mSPRT with always-valid confidence intervals
  • Multi-armed bandits
  • Per-segment breakdowns with a Bonferroni correction across segments
  • Mutual exclusion groups and a global holdout, whose results are beta

Revenue, count, duration and custom metrics are analysed as their mean per assigned user, compared with a permutation test of Welch's t and judged at the experiment's confidence level, and their results give the difference per user with its confidence interval.

Open the power calculator

Invite teammates, each with a role

Admins and developers change experiments and flags; analysts and viewers read them.

  • An audit log you can filter by action, entity and date
  • It downloads as CSV or JSON (the download is beta)

Role-based access control in the docs

The audit log, filtered to feature flags: each change with its time, user, action and flag.

SDKs for web, mobile and server

All MIT-licensed. By default, flag evaluation and experiment assignment happen on the server.

Walkthroughs

All the walkthroughs

Open source

The whole platform is Apache-2.0 and the SDKs are MIT. The test suites, the automated checks and the release pipeline are all in the repository.