flagger icon indicating copy to clipboard operation
flagger copied to clipboard

Promotion phase equivalent to stepWeights

Open aufarg opened this issue 1 year ago • 2 comments

Describe the feature

There's already stepWeights field that provides finer control of traffic shifting during canary, I propose adding stepWeightsPromotion field that provides the equivalent control for traffic shifting during promotion.

For context, in my specific case, I use stepWeights to do geometric progression for the weights rather than arithmatic (i.e. 2 -> 4 -> 8 -> 16 -> ... rather than 2 -> 4 -> 6 -> 8 -> ...). Doing arithmatic progression for the weights results in a trade-off between canary time vs resource consumption. For example, having 10% increase of traffic handled by 200 pods means adding more 20 pods amount of work to canary at a time. It means that adding 10% increase to 2 canary pods is going to starve more resources than adding 10% increase to 80 canary pods. The alternative is to have lower amount of percentage increase but it takes much longer if the target percentage stays the same.

This feature, in conjunction to geometric progression, would allows us to cut the amount of promotion phases while providing relatively smooth traffic shifting regardless of the current weights.

Proposed solution

Have the equivalent of stepWeights but for promotion phase.

Any alternatives you've considered?

Right now stepWeightPromotion allows smooth shift to primary, but have higher trade-off between canary time vs stability.

aufarg avatar Oct 18 '23 04:10 aufarg

I'm also willing to work on this if the feature is accepted.

aufarg avatar Oct 18 '23 04:10 aufarg

sounds good, looking forward to your contribution!

aryan9600 avatar Oct 18 '23 07:10 aryan9600