Skip to content

upstream: account for degraded hosts in panic mode calculations - #5630

Merged
alyssawilk merged 3 commits into
envoyproxy:masterfrom
snowp:degraded-panic
Jan 23, 2019
Merged

alyssawilk merged 3 commits into
envoyproxy:masterfrom
snowp:degraded-panic

Conversation

@snowp

@snowp snowp commented Jan 16, 2019

Copy link
Copy Markdown
Contributor

Updates the way panic mode is calculated to treat degraded hosts as
available. This ensures that panic mode is entered when there are
insufficient available hosts.

Also updates the panic mode documentation to use more generic language.

Signed-off-by: Snow Pettersen [email protected]

Risk Level: Medium
Testing: UTs for mixed healthy/degraded hosts
Docs Changes: Updated panic mode docs
Release Notes: n/a
#5063

Snow Pettersen added 2 commits January 16, 2019 17:12
Updates the way panic mode is calculated to treat degraded hosts as
available. This ensures that panic mode is entered when there are
insufficient available hosts.

Also updates the panic mode documentation to use more generic language.

Signed-off-by: Snow Pettersen <[email protected]>
Signed-off-by: Snow Pettersen <[email protected]>
@snowp

snowp commented Jan 17, 2019

Copy link
Copy Markdown
Contributor Author

/retest

@repokitteh-read-only

Copy link
Copy Markdown

🔨 rebuilding ci/circleci: coverage (failed build)

🐱

Caused by: a #5630 (comment) was created by @snowp.

see: more, trace.

@alyssawilk alyssawilk left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! (and way simpler than I had expected =P)

<envoy_api_field_Cluster.CommonLbConfig.healthy_panic_threshold>`. The panic threshold
is used to avoid a situation in which host failures cascade throughout the cluster as load
increases.
During load balancing, Envoy will generally only consider available (healthy or degraded) hosts in

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM but reminds me: can I task with you a follow-up of grepping through docs/root/intro/arch_overview/load_balancing/* and seeing if there's anywhere else we should replace healthy with available?

@cpakulski

Copy link
Copy Markdown
Contributor

I am wondering if #4685 still does make sense after this change?

@snowp

snowp commented Jan 17, 2019

Copy link
Copy Markdown
Contributor Author

@cpakulski I think so, your suggestion still makes sense as long as we consider both healthy and degraded as available hosts. Once healthy+degraded is below the threshold, panic mode should kick in and target any host in the priority that is selected. WDYT?

@cpakulski

Copy link
Copy Markdown
Contributor

@snowp I have to look at the code to see how you implemented this. In design proposal, you talked about moving hosts to new priorities P0->PN. I was not sure how to treat those new priorities.

@snowp

snowp commented Jan 17, 2019

Copy link
Copy Markdown
Contributor Author

The hosts are still in P0, but conceptually we route to degraded hosts in P0 after we've failed to route it to any healthy hosts, as if they belonged to P0: https://github.com/envoyproxy/envoy/blob/master/source/common/upstream/load_balancer_impl.cc#L65

Notice how we're iterating over each priority for healthy hosts first, then for degraded.

I'm imagining that when we enter panic mode with your proposal, we simply set all the healthy_per_priority_load values according to your suggestion and target all hosts in the priority.
This effectively disables the distinction between degraded and healthy hosts when panic mode applies. Does that make sense?

@cpakulski

Copy link
Copy Markdown
Contributor

@snowp. Thanks for explaining. Makes sense. Let me finish #4685 and I will ask you to check my code.

@snowp

snowp commented Jan 18, 2019 •

Copy link
Copy Markdown
Contributor Author

@alyssawilk Yeah I thought it would be more involved too, but I'm not gonna complain about things being easy haha

I went through and did a bunch of the docs updates right now, might as well. If you think it belongs in a different PR i can pull it out

@alyssawilk
alyssawilk merged commit ca93fc9 into envoyproxy:master Jan 23, 2019
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Jan 24, 2019
…yproxy#5630)

Updates the way panic mode is calculated to treat degraded hosts as
available. This ensures that panic mode is entered when there are
insufficient available hosts.

Also updates the panic mode documentation to use more generic language.

Signed-off-by: Snow Pettersen [email protected]

Risk Level: Medium
Testing: UTs for mixed healthy/degraded hosts
Docs Changes: Updated panic mode docs
Release Notes: n/a
envoyproxy#5063

Signed-off-by: Snow Pettersen <[email protected]>

Signed-off-by: Dan Zhang <[email protected]>
danzh2010 pushed a commit to danzh2010/envoy that referenced this pull request Jan 31, 2019
…yproxy#5630)

Updates the way panic mode is calculated to treat degraded hosts as
available. This ensures that panic mode is entered when there are
insufficient available hosts.

Also updates the panic mode documentation to use more generic language.

Signed-off-by: Snow Pettersen [email protected]

Risk Level: Medium
Testing: UTs for mixed healthy/degraded hosts
Docs Changes: Updated panic mode docs
Release Notes: n/a

Signed-off-by: Snow Pettersen <[email protected]>

Signed-off-by: Snow Pettersen <[email protected]>
fredlas pushed a commit to fredlas/envoy that referenced this pull request Mar 5, 2019
…yproxy#5630)

Updates the way panic mode is calculated to treat degraded hosts as
available. This ensures that panic mode is entered when there are
insufficient available hosts.

Also updates the panic mode documentation to use more generic language.

Signed-off-by: Snow Pettersen [email protected]

Risk Level: Medium
Testing: UTs for mixed healthy/degraded hosts
Docs Changes: Updated panic mode docs
Release Notes: n/a
envoyproxy#5063

Signed-off-by: Snow Pettersen <[email protected]>
Signed-off-by: Fred Douglas <[email protected]>
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 19, 2026
…49411)

- `envoy_toolshed` -> 0.5.26.envoy

Signed-off-by: dependency-envoy[bot] <148525496+dependency-envoy[bot]@users.noreply.github.com>
Backport note (release/v1.40): from 64519bb / `envoy_toolshed` 0.5.24.envoy, for
toolshed's release date updater and its fix (envoyproxy/toolshed#5626, envoyproxy#5630).
Only the registry and the `envoy_toolshed` version are taken: the other module
versions in these files are this branch's, and the lockfiles are regenerated
for it (`./ci/do_ci.sh lockfiles`) rather than picked.

(cherry picked from commit a592b93)
phlax pushed a commit to phlax/envoy that referenced this pull request Nov 19, 2026
…49411)

- `envoy_toolshed` -> 0.5.26.envoy

Signed-off-by: dependency-envoy[bot] <148525496+dependency-envoy[bot]@users.noreply.github.com>
Backport note (release/v1.40): one jump from the branch's f7ab605 /
`envoy_toolshed` 0.5.22.envoy, in place of the bumps in between (envoyproxy#49368, envoyproxy#49389).
It has toolshed's `tap2pcap` rule (envoyproxy/toolshed#5622) and release date
updater (envoyproxy/toolshed#5626, envoyproxy#5630). Only the registry and the
`envoy_toolshed` version are taken: the other module versions in these files
are this branch's, and the lockfiles are regenerated for it
(`./ci/do_ci.sh lockfiles`) rather than picked.

(cherry picked from commit a592b93)
phlax pushed a commit that referenced this pull request Nov 19, 2026
- `envoy_toolshed` -> 0.5.26.envoy

Signed-off-by: dependency-envoy[bot] <148525496+dependency-envoy[bot]@users.noreply.github.com>
Backport note (release/v1.40): one jump from the branch's f7ab605 /
`envoy_toolshed` 0.5.22.envoy, in place of the bumps in between (#49368, #49389).
It has toolshed's `tap2pcap` rule (envoyproxy/toolshed#5622) and release date
updater (envoyproxy/toolshed#5626, #5630). Only the registry and the
`envoy_toolshed` version are taken: the other module versions in these files
are this branch's, and the lockfiles are regenerated for it
(`./ci/do_ci.sh lockfiles`) rather than picked.

(cherry picked from commit a592b93)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants