feat(nexus): HTTP/1.1 keep-alive (~2× throughput)

Reuse TCP connections for multiple requests, honor Connection close,
and raise wrk health RPS from ~45k to ~80k+ on the same machine.

- Loop HandleConnection up to 1000 reqs/fd with Connection keep-alive
- RawRequest_WantsKeepAlive (HTTP/1.1 default; HTTP/1.0 needs keep-alive)
- Nexus 0.3.0 banner; benches note before/after RPS
This commit is contained in:
2026-07-19 22:53:59 +03:00
parent abb2b54dce
commit e30d8a5eb9
6 changed files with 134 additions and 42 deletions
+3 -1
View File
@@ -52,5 +52,7 @@ Server-side (any nexus run):
## Notes
- Numbers vary by machine; use them relatively (same host, same day).
- Nexus currently closes connections (`Connection: close`) — RPS is honest for that model, not keep-alive maxed.
- Nexus **v0.3** uses HTTP/1.1 keep-alive (default). Sample RPS on one machine:
- close-only era: ~45k req/s
- keep-alive: ~80k+ req/s (`wrk -t4 -c64 -d5s /api/health`)
- Requires `wrk` for `bench-nexus` (`apt install wrk` on Debian/Ubuntu).