Skip to content
Cockpit0.29.0
A snapshot: read at commit 707a04c7ce8 on 2026-10-18T00:06:01Z by majordomus 0.29.0. Nothing on this page is read again. See it live

I2488

The HTTP stack is chosen by measurement: the same routes and several hundred open streams on tiny_http and on axum

Where it stands

devtask.issue
Readiness
ready no dependency and no gate holds it; nobody has started it
Status
READY
Can start
startable
Milestone
Milestone status
ACTIVE
Wave
2
Waiting on
none
Holds back
none
Behind it in all
0
Evidence
0 of 2
A move writes the repository: it stamps one field of this issue's record and appends one event to the ledger, and a commit will carry both.
The same moves from a terminal

majordomus plan start I2488

majordomus plan verify I2488

majordomus plan done I2488

What it is

Objective
Decide which HTTP stack the shared server keeps, from a measurement of the two candidates on the same routes, a streamed route and long-lived subscribers, and record the decision so that the repository has one stack and knows why.
Why
ADR 0142, part 3, and step U6 of the owner's UI-performance pack, which the caching work deferred because a cached capability already answers in under 6 ms at p95. That measurement did not include what a streamed UI adds: a connection held open per page. The server runs each request on a thread of its own, at most 64 at once (http/server.rs MAX_HANDLERS), writes a response whole, and has no compression. The owner asked on 2026-10-12 for a top-notch architecture; the pack says the choice is made on same-route benchmarks and that two stacks are not kept.
Now
tiny_http 0.12, synchronous, four accept threads, a thread per request, 64 handlers at most, WebSocket upgrades on threads of their own, no compression, Content-Length always.
Wanted
The bench harness runs one system target on both stacks behind the same router and executor: a cached JSON route, a server-rendered screen, a streamed response, and N idle WebSocket subscribers (N in 64, 256, 1024) while the first three are timed; p50, p95, p99, memory and threads, on a release build on an idle host. The numbers and the cost of the move (the adapter over Context::execute, blocking handlers on a bounded pool, the deadline and admission rules of I2156 and the remote-caller guard carried over) are written as a decision record. If the decision is to move, the move is its own issue and removes tiny_http in the same change.
Done when
unknown: the record declares no `completion`
Risk
unknown: the record declares no `risk`

Acceptance

  • One bench target times the same three routes on both stacks, with and without N idle subscribers, and its results are recorded with the commit, the host and the build profile
  • The decision record states the numbers it was decided from and what the move costs, and proposes one stack
  • No second HTTP stack is left in the default build
Validation
bin/majordomus plan validatemajordomus bench system.http --profile quick --no-write
Evidence required
http_stack_benchmark_resultshttp_stack_decision_record
Evidence present
unknown: the record carries no `evidence` entries

Scope

Touches
apps/majordomus-cli/src/benchapps/majordomus-cli/src/httpapps/majordomus-cli/Cargo.toml.ai/repo/adrsdocs/PERFORMANCE.mdtest/cases.ai/repo/project/issues/I2488.yaml
Not
unknown: the record declares no `non_scope`
Depends on
Priority
p1
Profile
deep-work
Parallel safe
true
Owner
unknown: the record declares no `owner`

The work so far

Branches
none
Merged
none
Commits
0
Trunk
master
Sessions
none
Created
2026-10-12
Updated
2026-10-12
Started
unknown: the record declares no `started_at`
Verified
unknown: the record declares no `verified_at`
Completed
unknown: the record declares no `completed_at`

Synchronisation

Adapter
scripts/github-sync
Repository
unknown: the derived plan's header carries no repository
External issue
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it
State there
unknown: a live GitHub state; this executable makes no network call, so only `scripts/github-sync --check` can answer it

Findings

LevelCodeMessageReproduce
WARNscope_conflictshares test/cases with I2652; they may not run concurrentlymajordomus plan validate