feat: improve API-driven standalone update reliability - #13904
Open
bzp2010 wants to merge 7 commits into
Open
Conversation
bzp2010
marked this pull request as ready for review
September 1, 2026 17:06
bzp2010
requested review from
AlinsRan,
membphis,
nic-6443 and
shreemaan-abhishek
September 2, 2026 00:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR aims to improve the reliability of configuration updates in API-driven standalone mode by implementing the following measures:
A new "standalone-status" reporting mechanism has been added. Now, each subsystem on every worker will report the digest of its loaded configuration, down to the level of each entity type (
worker:<id>:<subsystem>:<entity_type> = <digest>). This information will indicate whether the new configuration has taken effect on each worker (e.g., the router tree will be reset; the consumer lrucache will be flushed), and so on.conf_versionvalue for each request; therefore, as long asconf_versionhas been updated, we can assume that the router has been rebuilt.The
PUT /apisix/admin/configsrequest now supports awaitparameter. It allows you to specify a value in milliseconds; APISIX will collect if configuration applied status during this wait period and report it to the client. It is based on the report on "standalone-status" mentioned above.200or202. A200status code indicates that the configuration has been accepted and loaded on each worker, while a202status code indicates that the configuration has been accepted but its loading status is not guaranteed.Refactor the configuration loading from
shdictto improve the configuration loading latency window for new workers (which may be restarted viareload). Configuration is now always loaded synchronously duringinit_workerand consumed immediately duringcore.config.new.All of the above changes are backward-compatible, and existing clients can work with them. Older clients do not send the
waitparameter, so they will not trigger the new waiting behavior. The other changes are internal refactoring improvements that do not break compatibility.Checklist