[Rust] Add tokio-uring - HTTP/1.1#821
Merged
Merged
Conversation
Minimal HTTP/1.1 server on tokio-uring (the io_uring-backed runtime with a completion/owned-buffer API) for the H1-isolated profiles (baseline, pipelined, limited-conn). No HTTP framework: a hand-rolled request parser (Content-Length + chunked bodies, keep-alive, pipelining, fragmented-read reassembly) on tokio-uring's owned-buffer TcpStream, one runtime per core with SO_REUSEPORT. Endpoints: /baseline11?a=&b= -> a+b(+body) text/plain; /pipeline -> ok. Validated against the baseline/pipelined contract natively and via the Docker build.
Owner
Author
|
/benchmark -f tokio-uring --save |
Contributor
|
👋 |
Contributor
Benchmark ResultsFramework:
Full log |
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.
Description
A minimal HTTP/1.1 server on tokio-uring — the io_uring-backed Rust runtime with a completion/owned-buffer API — for the H1-isolated profiles (
baseline,pipelined,limited-conn). No HTTP framework. Added as anengine-tier entry.Serving model
One
tokio_uring::startper core, each with its ownSO_REUSEPORTlistener (socket2 +from_std). Reads/writes use tokio-uring's owned-buffer model: aVec<u8>is passed by value intoread/write_alland handed back, reused across iterations. Responses are batched per read.Hand-rolled HTTP/1.1
Request line + headers,
Content-LengthandTransfer-Encoding: chunkedbodies, keep-alive, request pipelining, and fragmented-read reassembly. Shares the same parser as thetokioentry; only the I/O layer differs.GET/POST /baseline11?a=&b=text/plain—a + b(+ POST body as an integer)GET /pipelinetext/plain—okTests
Subscribes to
baseline,pipelined,limited-conn. Verified against the full contract —GET→55, Content-LengthPOST→75, chunkedPOST→75,/pipeline→ok, 16× pipelining, keep-alive, and fragmented reads — natively and via the Docker build.