Skip to content

fix(distributed): aggregate prefix cache pressure - #11229

Open
localai-org-maint-bot wants to merge 1 commit into
masterfrom
bot/issue-10083-cluster-pressure
Open

fix(distributed): aggregate prefix cache pressure#11229
localai-org-maint-bot wants to merge 1 commit into
masterfrom
bot/issue-10083-cluster-pressure

Conversation

@localai-org-maint-bot

Copy link
Copy Markdown
Collaborator

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/prefixcache
  • go test -count=1 ./core/services/messaging ./core/services/nodes/prefixcache ./pkg/natsauth ./core/application
  • go vet ./core/services/messaging ./core/services/nodes/prefixcache ./pkg/natsauth ./core/application
  • The broad go test ./core/services/nodes/... suite could not run in this environment because its Postgres test setup requires rootless Docker; 200 specs failed in BeforeEach with rootless Docker not found, while 254 specs passed.

Signed commits

  • Yes, I signed my commits.
  • Documentation updated (docs/content/) for user-facing changes, or not applicable

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
localai-org-maint-bot force-pushed the bot/issue-10083-cluster-pressure branch from 8e0c5e7 to ace2a29 Compare July 31, 2026 12:04
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.

Distributed routing: cluster-wide forced-disturb pressure (per-frontend today)

1 participant