Repository navigation
perf(http): share native request ingress across bindings - #338
Merged
MisterVVP merged 10 commits intoNov 20, 2026
Merged
Conversation
MisterVVP
marked this pull request as ready for review
November 20, 2026 22:26
MisterVVP
added a commit
that referenced
this pull request
Nov 25, 2026
## Changes - Optimize async gRPC client streaming and HTTP/JSON + JSON-RPC request handling. - Improve async dispatcher scheduling, cancellation, streaming and response lifecycle handling. - Include the native HTTP ingress improvements already reviewed in #337 and #338. - Add targeted tests and performance benchmarks; fix related protocol compatibility issues. ## Verification The identical head commit (`355db351f7e1161fdffad55e2f2baf33d8e5fe8a`) passed the CI, TCK Conformance, CodeQL, Docs, Tutorials and Commit messages workflows on #334: [CI #1571](https://github.com/MisterVVP/a2a-cpp/actions/runs/44828943977). **Policy note:** the diff includes the contributor TCK-gate change from #338 (100% mandatory compliance → no regression), which should be reviewed independently of performance improvements.
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.
Changes
AsyncRuntime. REST, JSON-RPC, discovery, and SSE share the same ingress choice.Measured performance
Native HTTP ingress compared with
5202055These percentages use
(candidate / baseline − 1) × 100on the reported medians. For example,(8,263 / 7,552 − 1) × 100 = 9.4%. The C64 throughput gain came with higher p99.In a separate sync-versus-async test on the starting branch, a simulated 1 ms HTTP wait at C256 went from 9,899 to 14,111 req/s (+42.5%) and from 120.40 to 30.07 ms p99 (−75.0%). The server thread count went from 265 to 21 (−92.1%). This test measures the effect of suspending the request, independently of the ingress change above.
Topology and serialization follow-up
The corrected one-core topology sweep completed 684 samples with zero errors across C1, C16, C64, and C256. Four shared dispatcher workers at C64 moved real JSON-RPC median throughput from 18,064 to 19,299 req/s, and real gRPC from 46,696 to 41,110 req/s. The median changes calculated within each interleaved pair were +7.5% and −12.6%, respectively. Real JSON-RPC at C256 lost 4.0% throughput and gained 15.1% p99 by the same paired calculation. The local CPU quota supported one dedicated server core and one client core.
The direct JSON-RPC envelope experiment reduced isolated serialization from 14.59 to 7.54 µs (−48.3%, or 1.94× as many serializations per unit time). Real async JSON-RPC C1 throughput improved 7.3% by the paired calculation. At C256 the real sync server lost throughput and p99 increased 9.0% with the sync load driver and 13.0% with the async load driver. Those C256 results ruled out the candidate.
The C64 native trace measured 390.52 µs p99 waiting to start posted JSON-RPC serialization, 390.41 µs returning the reply to the network loop, and 31.17 µs for the socket write callback. Each interval is measured separately. Their percentiles cannot be added.
Local validation
verify_changes.shbuild, test, and full lint checks passed, along with HTTP and gRPC interoperability and the 54-row performance smoke. The signing-enabled test run reproduced the same signing-corpus failure onmain. The OSV service returned HTTP 403 for the vendored component scan.Authorship
The proposed changes were generated by an AI agent.