0165: Sequential HTTP
v1; poll later
Status: Accepted by maintainer 2026-11-07
Context
The first users are local APIs and dev servers. The runtime has
no event loop. par workers reject non-Fs
capabilities (ADR-0103), the M12 runner is single-threaded
(ADR-0107), and M13 agents are deterministic ticks (ADR-0122), so
none of them gives connection concurrency.
Decision
v1 serves one connection at a time and closes it after one
response. A per-connection deadline (ADR-0163) bounds slow
clients. Keep-alive, concurrent connections and SIGTERM drain
arrive together later through one native
Net.wait(listener, conns, ms) over
poll(2), with per-connection parser state in Harness.
That step needs its own ADR and a bench/http/
measurement first.
Consequences
Simple, deterministic and identical in both backends. One slow client can block others for up to the deadline. No keep-alive costs a TCP handshake per request, which is acceptable on loopback.
Alternatives
- epoll/kqueue: two code paths with no measured
need; can sit behind
waitlater. - Thread pool via
hrt_par: conflicts with ADR-0103 and arena ownership. - One M13 agent per connection: no OS concurrency.
- libuv: an external dependency for a need not yet measured.