fix(distributed): aggregate prefix cache pressure - #11229
Open
localai-org-maint-bot wants to merge 1 commit into
Open
fix(distributed): aggregate prefix cache pressure#11229localai-org-maint-bot wants to merge 1 commit into
localai-org-maint-bot wants to merge 1 commit into
Conversation
Broadcast forced-disturb events and successful scale-up resets so every frontend shares the same rolling autoscale signal. Deduplicate NATS echoes, expose an origin-only Prometheus counter, and document cluster behavior. Closes #10083 Assisted-by: Codex:gpt-5
localai-org-maint-bot
force-pushed
the
bot/issue-10083-cluster-pressure
branch
from
July 31, 2026 12:04
8e0c5e7 to
ace2a29
Compare
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
Fixes #10083.
Forced-disturb events are now broadcast across frontend replicas and deduplicated by event ID, including each publisher's own NATS echo. A successful pressure-triggered scale-up also broadcasts its reset so peers consume the same signal. The change adds
localai_prefix_cache_forced_disturb_total{model="..."}for operator visibility and documents the cluster-wide behavior.Notes for Reviewers
go test -race ./core/services/messaging ./core/services/nodes/prefixcachego test -count=1 ./core/services/messaging ./core/services/nodes/prefixcache ./pkg/natsauth ./core/applicationgo vet ./core/services/messaging ./core/services/nodes/prefixcache ./pkg/natsauth ./core/applicationgo test ./core/services/nodes/...suite could not run in this environment because its Postgres test setup requires rootless Docker; 200 specs failed inBeforeEachwithrootless Docker not found, while 254 specs passed.Signed commits