-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A/B testing - canary with session affinity #88
Conversation
Allow A/B testing scenarios where instead of weighted routing the traffic is split between the primary and canary based on HTTP headers or cookies.
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
==========================================
+ Coverage 54.8% 57.58% +2.77%
==========================================
Files 13 13
Lines 1540 1794 +254
==========================================
+ Hits 844 1033 +189
- Misses 556 605 +49
- Partials 140 156 +16
Continue to review full report at Codecov.
|
@@ -82,6 +82,8 @@ spec: | |||
interval: | |||
type: string | |||
pattern: "^[0-9]+(m|s)" | |||
iterations: | |||
type: number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't we have to include match field in the crd as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have validation for any of the Istio types (HTTPMatchRequest
, HTTPRewrite
, HTTPRetry
, Headers
and CorsPolicy
) used in the Canary CRD. This could be addressed in a separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sounds good
👍 |
Allow A/B testing scenarios where instead of weighted routing the traffic is split between the primary and canary based on HTTP headers or cookies. This is particularly useful for frontend applications where you want to have session affinity.
You can chose from two types of analysis:
Progressive weight
canaryAnalysis.maxWeight
canaryAnalysis.stepWeight
Match conditions
canaryAnalysis.iterations
canaryAnalysis.match
Example:
The above configuration will run an analysis for ten minutes targeting Safari users and those that have a test cookie. You can determine the minimum time that it takes to validate and promote a canary deployment using this formula:
And the time it takes for a canary to be rollback when the metrics or webhook checks are failing:
Fix: #87
Test image:
quay.io/stefanprodan/flagger:ab-testing-e80a3d3