Skip to content

feat: add a global switch to disable upstream health check#12407

Merged
Revolyssup merged 7 commits into
apache:masterfrom
Revolyssup:revolyssup/disable_upstream_healthcheck
Jul 11, 2025
Merged

feat: add a global switch to disable upstream health check#12407
Revolyssup merged 7 commits into
apache:masterfrom
Revolyssup:revolyssup/disable_upstream_healthcheck

Conversation

@Revolyssup

@Revolyssup Revolyssup commented Jul 7, 2025

Copy link
Copy Markdown
Contributor

Description

When the user's production service is unavailable, users urgently need a way to quickly start the emergency APISIX service by turning off all health check functions with a single click.

Solution

Add a new field apisix.disable_upstream_healthcheck to globally disable the healthchecks

Checklist

  • I have explained the need for this PR and the problem it solves
  • I have explained the changes or the new features added to this PR
  • I have added tests corresponding to this change
  • I have updated the documentation to reflect this change
  • I have verified that this change is backward compatible (If not, please discuss on the APISIX mailing list first)

@dosubot dosubot Bot added size:L This PR changes 100-499 lines, ignoring generated files. enhancement New feature or request labels Jul 7, 2025
Comment thread apisix/cli/schema.lua
nic-6443
nic-6443 previously approved these changes Jul 8, 2025
Comment thread apisix/upstream.lua Outdated


local function create_checker(upstream)
local local_conf = require("apisix.core.config_local").local_conf()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

performance:

cache the require("apisix.core.config_local") at top level

membphis
membphis previously approved these changes Jul 10, 2025

@membphis membphis left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, only one minor issue

@Revolyssup
Revolyssup dismissed stale reviews from membphis and nic-6443 via 184c1b3 July 10, 2025 05:27
@nic-6443
nic-6443 requested a review from nic-chen July 11, 2025 05:26

@bzp2010 bzp2010 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.

Maybe you could fill out the checklist in the PR description. 🫡

@Revolyssup
Revolyssup merged commit 35a7bc3 into apache:master Jul 11, 2025
24 of 26 checks passed
@Revolyssup
Revolyssup deleted the revolyssup/disable_upstream_healthcheck branch July 11, 2025 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants