Skip to content

perf: zero-copy inbound TCP transport + test infrastructure consolidation#76

Merged
st0o0 merged 11 commits into
mainfrom
perf/zero-copy-inbound-tcp
Jul 7, 2026
Merged

perf: zero-copy inbound TCP transport + test infrastructure consolidation#76
st0o0 merged 11 commits into
mainfrom
perf/zero-copy-inbound-tcp

Conversation

@st0o0

@st0o0 st0o0 commented Jul 7, 2026

Copy link
Copy Markdown
Member

Summary

  • Bump servus.akka submodule to the unified rent-and-receive transport with zero-copy inbound TCP path, migrating all protocol layers from raw ReadOnlyMemory<byte> to WireBuffer
  • Remove obsolete buffer size options (MaxRequestBufferSize, client-side ReceiveBufferSize) that are now transport-managed
  • Consolidate ~10 duplicated test option factories into shared helpers (ServerOptionDefaults, TestClientOptions, DecoderEncoderDefaults, WireBufferTestExtensions), then migrate all H1.0/H1.1/H2/H3 server and client specs to use ServerTestContext and StreamTestBase

Changes

Transport (servus.akka submodule)

  • Zero-copy inbound: transport rents buffers and hands ownership to the protocol layer via WireBuffer, eliminating defensive copies on the receive path

Protocol layer

  • FrameDecoder, all state machines (H1.0/H1.1/H2/H3 client + server), body readers/pumps updated to consume WireBuffer instead of ReadOnlyMemory<byte>
  • BufferedBodyReader and QueuedBodyReader adapted for new buffer lifecycle

Options cleanup

  • Removed GaudiClientOptions.ReceiveBufferSize and GaudiServerLimits.MaxRequestBufferSize — buffer sizing now lives in the transport layer
  • Simplified TransportBufferOptions and EndpointResolver

Test infrastructure (246 files, net -675 lines)

  • New shared helpers: ServerOptionDefaults, TestClientOptions, DecoderEncoderDefaults, WireBufferTestExtensions
  • Migrated all protocol specs to shared infrastructure, eliminating per-file boilerplate

Test plan

  • Full unit + stage suite passes (dotnet run --project GaudiHTTP.Tests)
  • Integration suites pass (Client, Server, End2End)
  • Verify no public API surface regressions (acceptance tests)

@st0o0 st0o0 merged commit c4a6863 into main Jul 7, 2026
5 checks passed
@st0o0 st0o0 deleted the perf/zero-copy-inbound-tcp branch July 7, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant