Repository navigation
cluster-mode: report endpoint count and connection fan-out (2.4 backport) - #490
Merged
Merged
Conversation
…ort) Backport of #489 to the 2.4 branch, re-implemented against 2.4's primary-only cluster model (m_slot_to_shard[16384] + m_connections; 2.4 predates the --read-preference/shard_group infrastructure #489 was built on, so a straight cherry-pick was not possible). In --cluster-mode, report the discovered topology at benchmark start and in the results summary: - Startup (stderr, once per run; reprints on mid-run shape change): "[RUN #N] Cluster topology: K endpoints discovered (K primaries)", one compact line per node (slot count + range count), then the total opened-connection fan-out (threads x conns x endpoints) and, when --rate-limiting is set, the aggregate target. - Results summary (text + JSON): Cluster endpoints, Total connections, Aggregate rate-limit target. Counts are derived by coalescing the slot map by distinct host:port, so the endpoint count equals the per-client connection fan-out. The startup block and the run-end summary share the same snapshot source. Primary only (2.4 has no replica routing). Co-Authored-By: Claude Opus 4.8 <[email protected]>
🛡️ Jit Security Scan Results✅ No security findings were detected in this PR
Security scan by Jit
|
Add "2.4" to the push/pull_request branch filters across all workflows so PRs targeting and pushes to the 2.4 branch trigger the full CI matrix (build/test/ASAN/TSAN/UBSan/code-style), not just the external app checks. Quoted to keep YAML from parsing 2.4 as a float. Co-Authored-By: Claude Opus 4.8 <[email protected]>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 45468ae. Configure here.
…#490) - Hold the print-gate mutex across the whole topology emit so two workers can't interleave blocks or print a superseded topology after a newer one. - With the --clients-start staircase ramp, label Total connections / rate-limit target as 'at full ramp' (cfg.clients is the peak value), so the figure isn't read as the count already opened. Co-Authored-By: Claude Opus 4.8 <[email protected]>
Merged
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.

Backport of #489 to the 2.4 branch.
Why a re-implementation (not a cherry-pick)
2.4 predates the
--read-preference/shard_groupinfrastructure (#456) that #489 was built on. The 2.4 cluster client is primary-only and usesm_slot_to_shard[16384]+m_connections, with noshard_group/endpoint_snapshot/replica routing. A straight cherry-pick conflicts in 4 files on missing types, so this re-implements the same user-facing feature against 2.4's model.What
In
--cluster-mode:Cluster endpoints,Total connections,Aggregate rate-limit target.Notes
Total connectionsis the real opened-connection count.🤖 Generated with Claude Code
Note
Low Risk
Changes are mostly logging and summary output on the cluster path; routing and request handling are unchanged, and non-cluster runs are unaffected.
Overview
Cluster-mode observability (2.4 backport) adds reporting of discovered distinct host:port endpoints, total connection fan-out (
threads × conns/thread × endpoints), and optional aggregate rate-limit targets, using the primary-onlym_slot_to_shard+m_connectionsmodel.After CLUSTER SLOTS commits,
cluster_clientbuilds a topology snapshot and prints a gated[RUN #N] Cluster topologyblock on stderr (once per run/signature, reprints on mid-run topology changes). At run end, the same snapshot is captured intorun_statsso the text/JSON run information section matches the startup lines.benchmark_config::current_run_idlabels those messages.CI workflows now also run on push/PR to the
2.4branch alongsidemaster/main.Reviewed by Cursor Bugbot for commit 76dd1e2. Bugbot is set up for automated code reviews on this repo. Configure here.