Documentation
¶
Overview ¶
Package loadtest pkg/loadtest/sink.go c4-app-proxy
The bench sink: the far end of `skywire cli proxy loadtest serve`, and the same handler the in-process mux benches run against. It lives in its own package so a test can mount it on an httptest server without pulling in the CLI.
- GET / endless chunked octet-stream at the reader's line rate
- GET /?bytes=N N bytes of a deterministic pattern, byte ranges (206 + Content-Range) and X-Sha256 over the whole object
- POST|PUT /upload whole-body or acked, offset-addressed chunked uploads
See the chunked-upload contract below.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // UploadWindow bounds the bytes ONE session may buffer: chunks held // ahead of the frontier plus the chunks being read. A frontier chunk is // always admitted (held chunks are evicted for it if need be, and re-sent by // the client, which got 202 and not 200 for them), so the window can never // deadlock a session. // // 64 MiB is headroom, not an appetite: the striped client sizes its live // chunk buffers as min(its own 16 MiB memory cap / 4 MiB chunk, window/chunk // - 2), so a 16 MiB window left it two live chunks — one per tunnel, with an // ack round trip between them — and cost ~20% of single-upload throughput. // At 64 MiB the client's memory cap (4 chunks) binds again, and inflight // plus held never comes near the window. UploadWindow int64 = 64 << 20 // UploadSessions caps concurrent sessions, so the sink's ceiling is // window x sessions (256 MiB by default) on an exit that has been OOM-killed // for less (#4252). UploadSessions = 4 // UploadIdle expires a session that stopped making progress; its // buffers go with it. UploadIdle = 2 * time.Minute )
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.