Repository navigation
Enforce resource limits and qualify connector capacity #984
Description
Parent: #970
Deliverable
Enforced resource limits plus a repeatable benchmark report establishing supported connector counts and throughput for each transport.
Dependencies
Galactic Edge integration (#992)
Implement this milestone as a consumer of the Galactic Edge provider contract. #992 owns provider authorization, host attachment lifecycle, shared-state fencing and maintenance, independently enforced forwarding expiry, prefix conflict arbitration/publication, and gVPC traffic policy. MASQUE owns client authentication, connector /96 assignment and retention, session packet checks, transport behavior and its provider adapter. Use the foundation's versioned contract and existing provider helpers; do not introduce a second host-networking controller, lease store or BGP publisher. Any required foundation change must be tracked and qualified under #992 before this milestone claims integrated acceptance.
Work
- Implement or complete the design's connection/request, buffer, queue and resource limits, including admission and overload behavior.
- Build a repeatable load harness with documented hardware, versions, packet sizes, active connector counts and traffic mix.
- Measure HTTP/3 and HTTP/2 separately, including slow readers, packet loss, request churn and overload while existing connectors carry traffic.
- Check that expiry, revocation, routing and tenant isolation remain correct under load; tune the implementation to meet the agreed targets.
Acceptance criteria
- The report includes throughput, latency, CPU/memory use, accepted/rejected work and the tested supported connector count for each transport.
- Overload causes bounded, documented rejection/backpressure rather than unbounded memory growth or stalled authority expiry.
- Resources recover after clients disconnect or requests fail; a slow connector cannot consume unbounded shared capacity.
- The capacity benchmark against the agreed targets runs on staging and is tracked in MASQUE: Run the capacity benchmark on staging #1242; this issue closes on the loopback harness, the enforced limits and the 6.25 s slow-client bound.
Additional integration acceptance
- Budget provider instances, attachments, EdgeRoutes, map capacity/headroom, API operations and lease-renewal work alongside transport sessions/buffers. Account for one renewed lease per instance and multiple connector routes.
- Preserve renewal/expiry progress under request floods, stalled admission/API calls, reconnect storms and slow packet devices; one connector cannot monopolize shared locks or queues.
- Verify CONNECT-IP server lacks overload limits and tenant isolation checks #991 limits before client admission and queued-byte limits for both transports. Saturation must reject bounded work without reviving expired sessions or dropping unrelated tenants.
- Reconcile results with the foundation capacity/admission limits and the Define connector admission, addressing and ownership contracts #972 workload; report packet, API and foundation resource budgets as well as protocol throughput. Measured on staging under MASQUE: Run the capacity benchmark on staging #1242.
Scope follows #970: CONNECT-IP with HTTP/2 fallback; no public API development, plugin/portal integration, product-client development or production rollout.
Metadata
Metadata
Assignees
Labels
Type
Fields
Priority
Activity
[-]MASQUE: enforce resource limits and qualify connector capacity[/-][+]Enforce resource limits and qualify connector capacity[/+]fix(connectip): Bound CONNECT-IP work before admission
privateip commentedon Oct 28, 2026
Verdict: valid. Checked against
66eb2bb3, the top of the open CONNECT-IP stack (#1205, through #1208), since #982 and #991 land there.Most of the contract's pre-admission and session limits are in place: the connection, per-source, stream, header, handshake, admission, per-credential and session caps from #991 and #1202, the 128-packet / 256 KiB per-session queue toward the client, the bounded capsule reader, and EAGAIN on the device counted as a drop. Three gaps remain against the resource table in
docs/designs/masque/contract.md:SendDatagramonce the QUIC datagram queue fills (32 frames). The session ends only when the QUIC idle timeout fires, 30 s later. HTTP/2 already ends a session whose capsule write is blocked for 5 s.TUNBackend.readLoopignores the result ofenqueue. The contract says a queue drop is a counted packet drop.The physical two-node benchmark the contract specifies cannot run from code changes alone. A loopback harness can still measure each transport, exercise overload and recovery, and give the target-environment run a repeatable tool.
privateip commentedon Oct 28, 2026
Approved plan. Two PRs appended to stack #1205 on top of #1208. Both say "Related to #984", and this issue stays open for the two-node benchmark the contract specifies.
fix/issue-984-limitsproxySessionends a session when one write toward the client stays blocked for 5 s, on both transports. It counts the end ingalactic_connectip_packets_denied_totalwith reasonslow_client. Only that session ends.TUNBackend.readLoopcounts a packet dropped on a full session queue with reasonqueue_full.test/issue-984-loadtask test:connectip-load, that runs the real server for HTTP/3 and HTTP/2 separately. It covers 1, 8 and 32 connectors, 1280-byte and 64-byte packets, an overload flood while connectors carry traffic, a slow reader, request churn, HTTP/3 packet loss, and lease expiry under load.docs/edge/masque-capacity.mdgives the method and the loopback results, marked as not the contract's target environment.Risk: a client that cannot take traffic for 5 s now loses its session over HTTP/3 instead of holding it for up to 30 s. That is the contract's stated behavior, and HTTP/2 already does it.
fix(connectip): Time a run of slow writes toward a stalled client
fix(connectip): Keep a slow-write run across probe-freed writes
test(connectip): Pin the prompt streak that ends a slow-write run
docs(edge): Mark the blocked-delivery timeout as missed on both trans…
docs(edge): Mark the 5 s delivery timeout missed on both transports
privateip commentedon Oct 28, 2026
Two PRs in stack #1205 cover the code side of this issue. Both say "Related to", so this issue stays open.
task test:connectip-loadanddocs/edge/masque-capacity.mdwith the first loopback run, 3 runs of every scenario, all passing. At 32 connectors, HTTP/3 reached 2403 Mbit/s and HTTP/2 2971 Mbit/s, and peak memory was 136 MiB. A stalled client ended after 5.5 s on HTTP/2 and 6.8 to 8.0 s on HTTP/3, so neither meets the 5 s target exactly. The report leaves that choice to the target review.Closing this issue still needs the two-node benchmark the contract specifies, and review of any target change.
fix(connectip): End a session whose client stops receiving for 5 s
fix(connectip): Time a run of slow writes toward a stalled client
fix(connectip): Keep a slow-write run across probe-freed writes
test(connectip): Pin the prompt streak that ends a slow-write run
test(connectip): Add a CONNECT-IP load harness and capacity report
docs(edge): Mark the 5 s delivery timeout missed on both transports
docs(masque): Keep the isolation floor and name the pending capacity run
privateip commentedon Oct 29, 2026
Closing this on the loopback harness, the enforced limits and the 6.25 s slow-client bound. The capacity benchmark on staging, and the budget reconciliation it measures, continue in #1242. The limits and the stalled-client end merged in #1210. The load harness and its report merged in #1220. The 6.25 s HTTP/3 fix merged in #1230. The results are in the MASQUE capacity guide.
These numbers come from one host, with the clients sharing the server's CPUs. They show the limits hold. They don't show the capacity of an edge node, which is what #1242 measures.