Skip to content

docs: average ate.workerpool.workers across replicas before summing - #3193

Merged
Jeff Luo (JeffLuoo) merged 2 commits into
agent-substrate:mainfrom
cloudonly:docs-workerpool-workers-avg
Oct 29, 2026
Merged

Jeff Luo (JeffLuoo) merged 2 commits into
agent-substrate:mainfrom
cloudonly:docs-workerpool-workers-avg

Conversation

@cloudonly

@cloudonly Luomu (cloudonly) commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

The aggregation note from #3056 tells readers to take the max across ate-api-server replicas and then sum. As #3162 shows, the replicas read separate worker caches and can disagree for a few seconds: one reports {ate_worker_state="partial"} 3 while the other still reports {ate_worker_state="idle"} 3, so max by (ate_worker_state) keeps both series and the pool sums to 6 workers.

Take the average across replicas instead. It keeps the sum across the states equal to the pool size; the counts can be fractional for those few seconds. Updates the registry note and the observability guide. No code change: the locust collector already reads a single process's series, and nothing else aggregates this instrument.

Fixes #3162

AI use: Claude Code analyzed the issue and wrote the change and this description. I reviewed the diff. Codex rebased the branch onto main and resolved the documentation conflicts.

@cloudonly

Copy link
Copy Markdown
Contributor Author

The only failing check is e2e-test (envoy, preview). It failed during install, before any test ran: waiting for deployment/atenet-router in ate-system timed out with 1 old replicas pending termination, and Envoy logged SDS initial fetch timeouts. This PR only changes docs/observability.md and the metrics registry, so it doesn't touch that path. run-tests and e2e-test pass.

Could a maintainer re-run the failed job and merge?

Each replica reads its own worker cache, and the caches can disagree for
a few seconds. A worker that changed state then sits under its old state
on one replica and its new state on the other, so max by state counts it
twice and a summed pool outgrows its real size. avg keeps the sum across
states equal to the pool size.

Signed-off-by: cloudonly <enrondg@gmail.com>
Shorten the metrics table row back to a pointer at the example query,
and wrap the long line in the registry note.

Signed-off-by: cloudonly <enrondg@gmail.com>
auto-merge was automatically disabled October 29, 2026 05:04

Head branch was pushed to by a user without write access

@cloudonly
Luomu (cloudonly) force-pushed the docs-workerpool-workers-avg branch from 59a4989 to 373e884 Compare October 29, 2026 05:04
@JeffLuoo
Jeff Luo (JeffLuoo) added this pull request to the merge queue Oct 29, 2026
Merged via the queue into agent-substrate:main with commit 6949841 Oct 29, 2026
7 checks passed
Dmitry Berkovich (dberkov) pushed a commit that referenced this pull request Nov 2, 2026
…3193)

The aggregation note from #3056 tells readers to take the `max` across
ate-api-server replicas and then `sum`. As #3162 shows, the replicas
read separate worker caches and can disagree for a few seconds: one
reports `{ate_worker_state="partial"} 3` while the other still reports
`{ate_worker_state="idle"} 3`, so `max by (ate_worker_state)` keeps both
series and the pool sums to 6 workers.

Take the average across replicas instead. It keeps the sum across the
states equal to the pool size; the counts can be fractional for those
few seconds. Updates the registry note and the observability guide. No
code change: the locust collector already reads a single process's
series, and nothing else aggregates this instrument.

Fixes #3162

AI use: Claude Code analyzed the issue and wrote the change and this
description. I reviewed the diff. Codex rebased the branch onto main and
resolved the documentation conflicts.

---------

Signed-off-by: cloudonly <enrondg@gmail.com>
(cherry picked from commit 6949841)
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/observability kind/docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: ate.workerpool.workers differs between ate-api-server replicas

4 participants