navapbc / template-infra

A template to set up foundational infrastructure for your application in AWS
Apache License 2.0
11 stars 2 forks source link

Split testing (A/B testing) support #481

Open lorenyu opened 11 months ago

lorenyu commented 11 months ago

This ticket builds on https://github.com/navapbc/template-infra/issues/480 to add support for throttled rollouts and split tests.

(this ticket still needs to be refined)

Design notes

Feature flags are binary, but split tests need more complex configuration. Something like:

split_tests = [
  {
    name = "simple_ab_test"
    variations: [
      {
        name = "b"
        percentage = 0.5
      }
    ]
  },
  {
    name = "test_with_three_variations"
    variations = [
      {
        name = "b"
        percentage = 0.33
      },
      {
        name = "c"
        percentage = 0.33
      }
    ]
    variation_percentages = [0.33, 0.33]
  }
}
lorenyu commented 11 months ago

quick thought: might deprioritize "split testing" and move it into it's own milestone in favor of focusing this milestone on feature flags and gradual rollouts. A/B testing has a lot more to it, sampling, user segmentation, metrics, that add significant scope.