You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Rolling updater should be more resilient when maintaining SLA during scaling #3844
The enhancements to rolling updates for #3701 include a change to allow the updater to maintain an SLA represented by a minimum percentage of ready pods to remain ready for the duration of the deployment. However, the mechanism is brittle: during a given scale-up each interval, if any pods in the current chunk don't become ready in time, the updater gives up entirely and immediately.
The scaling should be more resiliant by continuing to scale down and up as long as possible subject to timeouts given the total pod readiness count hasn't dipped below the minimum representing the SLA from the configurable update percentage. The scaling increment each interval should be variable, treating the SLA minimum as the basis for a maxium increment per interval.
The updater should know what the minimum ready count threshold is, and should do "as much as possible" each interval within the bounds of the SLA.
changed the title [-]Rolling updater should be more resiliant when maintaining SLA during scaling[/-][+]Rolling updater should be more resilient when maintaining SLA during scaling[/+]on Jul 22, 2015
What would greatly simplify things would be to eliminate modality and make it more opinionated: scratch the updateAcceptor concept, compute an SLA/minimum, and each interval do what you can within the bounds of the min/max. Readiness checks baked right in (instead of outside in an acceptor).
What would greatly simplify things would be to eliminate modality and make
it more opinionated: scratch the updateAcceptor concept, compute an
SLA/minimum, and each interval do what you can within the bounds of the
min/max. Readiness checks baked right in (instead of outside in an
acceptor).
—
Reply to this email directly or view it on GitHub #3844 (comment).
So here's an interesting case. If at the beginning your old deployment is at 2, and your new desired is 10, and your update factor is 10%, your the contract is to keep 9 total running during the transition. Assume down/up. This means we start off violating the minimum. The way our algo currently works is that we'll block waiting for more pods to become ready since if we scaled down we'll violate the minimum. One option would be to "lie" by no-op'ing and returning that we scaled down the difference of max(minimum-actual, maxIncrement) so that the scale up would attempt to bring us back over the line.
Actually, if we're already under the threshold, how about on scale down no-op'ing and just informing the scale up to scale up by maxIncrement... this will repeat until we're back above board
So here's an interesting case. If at the beginning your old deployment is
at 2, and your new desired is 10, and your update factor is 10%, your the
contract is to keep 9 total running during the transition. Assume down/up.
This means we start off violating the minimum. The way our algo currently
works is that we'll block waiting for more pods to become ready since if we
scaled down we'll violate the minimum. One option would be to "lie" by
no-op'ing and returning that we scaled down the difference of
max(minimum-actual, maxIncrement) so that the scale up would attempt to
bring us back over the line.
—
Reply to this email directly or view it on GitHub #3844 (comment).
Actually, if we're already under the threshold, how about on scale down
no-op'ing and just informing the scale up to scale up by maxIncrement...
this will repeat until we're back above board
—
Reply to this email directly or view it on GitHub #3844 (comment).
Another asymmetry nuance: when there's an imbalance like old=2, new=4, shouldn't the actual % increment be based on the min of old/new? Or actually, should the max increment always be a percentage of the old replicas?
Hrm - the SLA is the percentage on the old. I think the increment should
be percentage of the new. Then if you have the SLA acting as the floor you
still make progress.
Another asymmetry nuance: when there's an imbalance like old=2, new=4,
shouldn't the actual % increment be based on the min of old/new? Or
actually, should the max increment always be a percentage of the old
replicas?
—
Reply to this email directly or view it on GitHub #3844 (comment).
Hrm - the SLA is the percentage on the old. I think the increment should be percentage of the new. Then if you have the SLA acting as the floor you still make progress.
@Kargakis found a scenario which seems a little nuanced. During a scale down event, it's possible that for external reasons, pods for either the old or new RC could go sideways, bringing our ready count under the SLA for reasons outside our control. Let's say that we computed the SLA, and then on the very first scale down, some old pods for the current prod deployment became unready for some reason and now we're already under the SLA. We have some options to consider:
Don't scale down further, scale up new to (max increment + deficit) to get us back above board
No-op and keep iterating, hoping that the readiness issues are transient (seems safe but slow)
Fail because we couldn't preserve the SLA
1 is problematic because it only works if you're doing up-down; we can't add pods without making capacity with a scale-down for the in-place configuration.
Discussed in IRC - I don't think it's our responsibility to watch readiness
on old rc - only to ensure we don't cause an SLA violation ourselves. A
health monitor on the old rc would be responsible for handling pods going
dead. Maybe eventually we have a flag or mode that does additional
readiness checking, but not now.
@Kargakishttps://github.com/kargakis found a scenario which seems a
little nuanced. During a scale down event, it's possible that for external
reasons, pods for either the old or new RC could go sideways, bringing our
ready count under the SLA for reasons outside our control. Let's say that
we computed the SLA, and then on the very first scale down, some old pods
for the current prod deployment became unready for some reason and now
we're already under the SLA. We have some options to consider:
Don't scale down further, scale up new to (max increment + deficit)
to get us back above board
No-op and keep iterating, hoping that the readiness issues are
transient (seems safe but slow)
Fail because we couldn't preserve the SLA
1 is problematic because it only works if you're doing up-down; we can't
add pods without making capacity with a scale-down for the in-place
configuration.
—
Reply to this email directly or view it on GitHub #3844 (comment).
Activity
[-]Rolling updater should be more resiliant when maintaining SLA during scaling[/-][+]Rolling updater should be more resilient when maintaining SLA during scaling[/+]ironcladlou commentedon Jul 22, 2015
@smarterclayton this needs prioritized/scheduled.
smarterclayton commentedon Jul 22, 2015
p1 - I would like it to make 3.0.1 but that depends on how complex you think this is.
ironcladlou commentedon Jul 22, 2015
Is there a use case for scaling by % and not also enforcing an SLA?
smarterclayton commentedon Jul 22, 2015
I can think of a use case of down the road making the SLA a separate
parameter. In the short term, I think not.
On Wed, Jul 22, 2015 at 3:21 PM, Dan Mace [email protected] wrote:
Clayton Coleman | Lead Engineer, OpenShift
ironcladlou commentedon Jul 22, 2015
What would greatly simplify things would be to eliminate modality and make it more opinionated: scratch the updateAcceptor concept, compute an SLA/minimum, and each interval do what you can within the bounds of the min/max. Readiness checks baked right in (instead of outside in an acceptor).
smarterclayton commentedon Jul 22, 2015
Maybe make the "is this ready" check an interface.
On Wed, Jul 22, 2015 at 3:25 PM, Dan Mace [email protected] wrote:
Clayton Coleman | Lead Engineer, OpenShift
ironcladlou commentedon Jul 22, 2015
That might be good... I've got a sketch for this in a branch and will have something tangible to discuss further tomrorow.
ironcladlou commentedon Jul 23, 2015
So here's an interesting case. If at the beginning your old deployment is at 2, and your new desired is 10, and your update factor is 10%, your the contract is to keep 9 total running during the transition. Assume down/up. This means we start off violating the minimum. The way our algo currently works is that we'll block waiting for more pods to become ready since if we scaled down we'll violate the minimum. One option would be to "lie" by no-op'ing and returning that we scaled down the difference of max(minimum-actual, maxIncrement) so that the scale up would attempt to bring us back over the line.
ironcladlou commentedon Jul 23, 2015
Actually, if we're already under the threshold, how about on scale down no-op'ing and just informing the scale up to scale up by maxIncrement... this will repeat until we're back above board
smarterclayton commentedon Jul 23, 2015
SLA is the min of new / old.
On Jul 23, 2015, at 5:04 PM, Dan Mace [email protected] wrote:
So here's an interesting case. If at the beginning your old deployment is
at 2, and your new desired is 10, and your update factor is 10%, your the
contract is to keep 9 total running during the transition. Assume down/up.
This means we start off violating the minimum. The way our algo currently
works is that we'll block waiting for more pods to become ready since if we
scaled down we'll violate the minimum. One option would be to "lie" by
no-op'ing and returning that we scaled down the difference of
max(minimum-actual, maxIncrement) so that the scale up would attempt to
bring us back over the line.
—
Reply to this email directly or view it on GitHub
#3844 (comment).
smarterclayton commentedon Jul 23, 2015
That's possible - after you do the canary
On Jul 23, 2015, at 5:10 PM, Dan Mace [email protected] wrote:
Actually, if we're already under the threshold, how about on scale down
no-op'ing and just informing the scale up to scale up by maxIncrement...
this will repeat until we're back above board
—
Reply to this email directly or view it on GitHub
#3844 (comment).
ironcladlou commentedon Jul 23, 2015
You mean 100-N% of min(oldActualReplicas, newDesired)?
smarterclayton commentedon Jul 23, 2015
Well, juts from the perspective of - if you are at 2 now, you can't pretend
that your SLA is really 10. Once the deployment completes, your SLA is 10.
Also. we should be able to mark the deployment successful and NOT roll it
back once all old pods are gone and SLA % of pods are ready.
On Thu, Jul 23, 2015 at 5:13 PM, Dan Mace [email protected] wrote:
Clayton Coleman | Lead Engineer, OpenShift
ironcladlou commentedon Jul 23, 2015
Yeah, makes sense. Going with the min calculation I described.
ironcladlou commentedon Jul 24, 2015
Another asymmetry nuance: when there's an imbalance like old=2, new=4, shouldn't the actual % increment be based on the min of old/new? Or actually, should the max increment always be a percentage of the old replicas?
smarterclayton commentedon Jul 24, 2015
Hrm - the SLA is the percentage on the old. I think the increment should
be percentage of the new. Then if you have the SLA acting as the floor you
still make progress.
On Jul 24, 2015, at 10:11 AM, Dan Mace [email protected] wrote:
Another asymmetry nuance: when there's an imbalance like old=2, new=4,
shouldn't the actual % increment be based on the min of old/new? Or
actually, should the max increment always be a percentage of the old
replicas?
—
Reply to this email directly or view it on GitHub
#3844 (comment).
ironcladlou commentedon Jul 24, 2015
I think that's what we're looking for.
ironcladlou commentedon Jul 27, 2015
@smarterclayton
@Kargakis found a scenario which seems a little nuanced. During a scale down event, it's possible that for external reasons, pods for either the old or new RC could go sideways, bringing our ready count under the SLA for reasons outside our control. Let's say that we computed the SLA, and then on the very first scale down, some old pods for the current prod deployment became unready for some reason and now we're already under the SLA. We have some options to consider:
1 is problematic because it only works if you're doing up-down; we can't add pods without making capacity with a scale-down for the in-place configuration.
smarterclayton commentedon Jul 27, 2015
Discussed in IRC - I don't think it's our responsibility to watch readiness
on old rc - only to ensure we don't cause an SLA violation ourselves. A
health monitor on the old rc would be responsible for handling pods going
dead. Maybe eventually we have a flag or mode that does additional
readiness checking, but not now.
On Jul 27, 2015, at 10:56 AM, Dan Mace [email protected] wrote:
@smarterclayton https://github.com/smarterclayton
@Kargakis https://github.com/kargakis found a scenario which seems a
little nuanced. During a scale down event, it's possible that for external
reasons, pods for either the old or new RC could go sideways, bringing our
ready count under the SLA for reasons outside our control. Let's say that
we computed the SLA, and then on the very first scale down, some old pods
for the current prod deployment became unready for some reason and now
we're already under the SLA. We have some options to consider:
to get us back above board
transient (seems safe but slow)
1 is problematic because it only works if you're doing up-down; we can't
add pods without making capacity with a scale-down for the in-place
configuration.
—
Reply to this email directly or view it on GitHub
#3844 (comment).
ironcladlou commentedon Jul 28, 2015
Upstream PR for continued discussion: kubernetes/kubernetes#11942
ironcladlou commentedon Aug 20, 2015
This will be tracked in https://trello.com/c/6aC2dI6Q going forward.
smarterclayton commentedon Sep 10, 2015
This has been implemented