warm pools: token exchange costs 2 API calls per bootstrap, and a leader crash recreates and re-exchanges every warm worker
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Refactor
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- go, kubernetes
- Domain
- authentication, backend, performance
Research direction
The token exchange path is in internal/kubeexchange/kubeexchange.go (the TokenReview create near line 60 and the pod GET near line 181), called from internal/agentrpc/exchange.go, and the dispatch client's QPS and burst limits are set in main.go around lines 1692-1705. Start by reading those three spots and tracing one bootstrap to see the two API calls it makes. Done means the proposed changes are settled in the thread (caching, informer lookup, JWT reuse, separate QPS setting), with tests showing fewer API calls per exchange.
Written by the indexing model from the issue text.
Description
Found in the 2026-10-09 performance and reliability re-audit (R-19, confirmed by two reviewers, inferred from cited code). Exchange transport is opt-in but required by warm pools.
Problem
Each exchange makes a TokenReview create (internal/kubeexchange/kubeexchange.go:60) and a pod GET (:181), with no cache (internal/agentrpc/exchange.go:87-109), on a client built with the dispatch limits (default 5 QPS, burst 10, main.go:1692-1705). That caps bootstraps at about 2.5 per second per replica. On a leader crash or rollout, idle warm workers exit and the reconciler recreates them: W pod creates plus at least W exchanges, about 400 s at W=1000 on defaults, while the requests queue, time out at 10 s and retry.
Proposal
- Cache TokenReview results by token hash for the token lifetime.
- Resolve the pod from the informer instead of a live GET.
- Skip re-exchange while the worker JWT is still valid.
- A dedicated QPS setting for exchange (both
DEXAFLOW_*andLEOFLOW_*).
- Dominant language
- Go
- Stars
- 46
- Forks
- 1
- Avg merge
- 10h 26m
- Merged PRs (30d)
- 606
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from dexadata/dexaflow
-
area/docs documentation priority/p3
Difficulty 1/5 1-3 hours Newbie friendliness 82/100
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 58/100
Maintainers usually reply within 1 day
-
CI is red on mainOpenci-red
Difficulty 4/5 3-5 days Newbie friendliness 38/100
Maintainers usually reply within 1 day
-
area/storage enhancement priority/p3
Difficulty 4/5 3-5 days Newbie friendliness 43/100
Maintainers usually reply within 1 day
-
area/api area/storage enhancement priority/p3
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
All issues in dexadata/dexaflow
Similar issues
-
desktop v3 windows
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
esengine/DeepSeek-Reasonix#15016 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
OneBusAway/vehicle-positions#260 ·
Maintainers usually reply within 1 day
-
Panic on startup when the GitHub releases API returns no `tag_name` (rate limit / network failure)Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
blurfx/KakaoTalkAdBlock#113 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
discobox-ai/discobox#860 ·
Maintainers usually reply within 1 day
-
A WebTransport session reaped after its client leaves says "idle: WebRTC transport lost"Possibly taken A pull request linked to this issue is open or already merged. Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
Maintainers usually reply within 1 day