Consolidate --workers flag with auto mode, resilient barrier DNS, and docs#53
Merged
Conversation
…ad division Replace two overlapping flags (--sync JSON and --num-workers) with a single --workers N flag. When N > 1, barrier sync is enabled automatically and concurrency/rate are divided across workers so config files always express total desired load. Breaking changes: - --sync flag removed (barrier sync now implicit when --workers > 1) - --num-workers renamed to --workers - concurrency/rate in configs now mean total, not per-worker Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Resolve conflict in InsertImplicitBarrier comment (keep new comment from main that reflects the moved barrier position). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
In Kubernetes, headless service DNS records take a few seconds to propagate after pod creation. NXDOMAIN is expected early on and should be retried with backoff (like connection errors), not treated as a permanent failure after 3 attempts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
tlrmchlsmth
commented
May 19, 2026
Member
Author
tlrmchlsmth
left a comment
There was a problem hiding this comment.
needs documentation on how to use it
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
Update README and CLAUDE.md to replace old --sync '{"workers":N}'
references with the new --workers flag, and document automatic load
division behavior.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
--workers auto sets workers = ceil(max_concurrency / 1024) so each worker handles at most 1024 concurrent streams. Config is parsed before the kube branch so auto-resolution works for both local and Kubernetes deploys. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
- Rename `max` variable in MaxConcurrency to avoid shadowing Go builtin - Add rationale for the 1024 streams-per-worker threshold - Document that --workers auto sizes for peak stage, which may leave workers idle during low-concurrency staircase stages Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Signed-off-by: Tyler Michael Smith <tlrmchlsmth@gmail.com>
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.
Summary
--sync '{"workers":N}'and--num-workers Nwith a single--workersflag--workers autocomputes worker count asceil(max_concurrency / 1024)so each worker handles at most 1024 concurrent streams--workers > 1: barrier sync is enabled automatically, concurrency and rate are divided across workers so config files always express total desired loadconcurrency=10, workers=3→ 4, 3, 3)--workersflag, auto mode, and load divisionBreaking changes
--syncflag removed — barrier sync is now implicit when--workers > 1--num-workersrenamed to--workers--workersis now a string flag (accepts integer or"auto", default"1")Test plan
go build ./cmd/nyann-bench/go test ./... -count=1— all passTestResolveWorkers— covers auto resolution, edge cases, invalid inputsTestMaxConcurrency— verifies max concurrency across stagesjust smoke-test-multi— two workers coordinate with--workers 2--workers 1)--workers autoresolves correctly with a multi-stage config🤖 Generated with Claude Code