mirror of
https://github.com/kristoferssolo/tls-pq-bench.git
synced 2026-03-22 00:36:21 +00:00
Initial commit
This commit is contained in:
42
docs/protocols.md
Normal file
42
docs/protocols.md
Normal 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”
|
||||
Reference in New Issue
Block a user