feat(loadgen): zainod gRPC concurrency/load generator + multi-RPC driver - #1
Draft
nachog00 wants to merge 2 commits into
Draft
feat(loadgen): zainod gRPC concurrency/load generator + multi-RPC driver#1nachog00 wants to merge 2 commits into
nachog00 wants to merge 2 commits into
Conversation
LoadDriver's hot loop hardcoded client.block_range(); the histogram/report layer was already OpKind-keyed. Add Scenario::op() returning an Op the loop matches on, plus LatestBlockPoll and BlockPoll scenarios. The oracle runs only for block-bearing ops (single block for GetBlock, skipped for GetLatestBlock). DiffLoadDriver is left block-range-only.
A runnable front-end over ztest::loadtest: attaches to a running zainod's CompactTxStreamer endpoint, fans out N per-task connections driving a chosen RPC, and reports hdrhistogram percentiles, throughput, errors, and chain-link oracle violations. Ships a Containerfile, an in-cluster k8s Job manifest, a sequential connection-sweep script, and a README with an architecture diagram.
Author
|
@elicbarbieri I bet this use mode doesn't converge with the ergonomic cli based interaction for ztest that you have been crafting, i just needed a one off bin to run on tekau that would let me drive zaino with these clients... how do you feel about it? did I miss a cleaner approach? |
nachog00
marked this pull request as draft
August 12, 2026 15:06
elicbarbieri
force-pushed
the
master
branch
9 times, most recently
from
August 21, 2026 19:49
f42ba1e to
fec8bc6
Compare
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.
What
Adds
loadgen— a concurrency/load generator for a running zainod — and extends ztest's load-test driver to drive more than one RPC.crates/loadgen— a runnable front-end overztest::loadtest. Attaches to a zainod gRPC endpoint (--target), fans out N per-task connections driving a chosen RPC (--rpc block-range|latest-block|block), and reports hdrhistogram percentiles, throughput, errors, and chain-link oracle violations. Runs locally or as an in-cluster k8s Job. Ships aContainerfile,k8s/job.yaml,scripts/sweep.sh, and a README with an architecture diagram.src/loadtest/{scenario,driver}.rs—LoadDrivernow dispatches per-op from the scenario (Scenario::op()→Op) instead of hardcodingGetBlockRange. AddsLatestBlockPollandBlockPollscenarios; the oracle runs only for block-bearing ops (single block forGetBlock, skipped forGetLatestBlock).DiffLoadDriveris left block-range-only.How to audit / run
See
crates/loadgen/README.md(architecture diagram + flags + output format). In-cluster:Connection sweep:
crates/loadgen/scripts/sweep.sh <zaino-ns> "1 4 8 16 32 64 128" 20Findings so far
Against 0.7.0-rc.1 (
fetchbackend, mainnet, non-ephemeral — real finalised state), in-cluster:GetLatestBlock~265k ops/s (p99 0.6ms),GetBlock~6.4k,GetBlockRange~122 ops/s (p99 ~3s). The fetch backend's single upstream client to zebra is the entireGetBlockRangebottleneck.GetBlockRangesaturates by ~64 clients and collapses at 128 (throughput drops below its 4-client level). 0 correctness violations throughout, including the collapse.ZAINO_EPHEMERAL_FINALISED_STATEinflates read numbers ~3×/~50× — not representative; the numbers above are from a non-ephemeral node.Report (Markdown + Mermaid): https://gist.github.com/nachog00/fe8d4f9b0ad00716113976d2d17ffeef
Notes / follow-ups
DiffLoadDrivermulti-op + parity;GetTreeState/GetMempoolStream(need the block-listObservedgeneralized); aloadgen sweep/reportsubcommand emitting a versioned JSON schema for GitHub reporting; afetchvsstatebackend A/B.