Initial commit

This commit is contained in:
2026-01-25 15:51:35 +02:00
commit bb0a195e73
11 changed files with 410 additions and 0 deletions

42
docs/protocols.md Normal file
View File

@@ -0,0 +1,42 @@
# Protocol modes
The benchmark supports two application-layer modes over TLS:
## 1) `raw` (custom protocol) -- primary
Goal: minimal overhead and full control over request/response sizes.
### Wire format
Client -> Server:
- 8 bytes unsigned LE: requested response size `N`
Server -> Client:
- `N` bytes payload (deterministic pattern)
Properties:
- easy TTLB measurement (client reads exactly `N`)
- minimal parsing and allocation noise (can pre-allocate)
- stable across HTTP stacks
## 2) `http1` (hyper) -- secondary
Goal: realistic request/response behavior.
Client sends:
- `GET /bytes/N` (or `GET /?n=N`)
Server replies:
- HTTP/1.1 200 with Content-Length = N
- body = N bytes payload (deterministic)
Properties:
- closer to real-world web traffic
- introduces HTTP parsing/headers overhead (acceptable for realism tests)
- TTLB becomes “time to full response body”