You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[MOCA SBX] Per-VM connection cap and per-session request cap (429) #1485
Priority: P2 · Part of the Cortex × MOCA SBX epic · Not in #905's breakdown · MOCA contract: MI1 §8.5 item 2
Problem
One sandbox, whether buggy or hostile, must not be able to exhaust the shared host's egress or descriptors.
What Cortex does today
No per-connection or per-listener cap was found.
session-budget enforces budgets keyed on pctx.Session.ID (sessionbudget/plugin.go:782), which comes from client headers today. It becomes usable once issue 1 fills pctx.Session from the connection.
What MOCA needs
A per-VM concurrent-connection cap (MOCA_EGRESS_MAX_CONNS_PER_VM) → 429 conn_cap, decided before any request is read.
A hard per-session request cap (MOCA_EGRESS_MAX_REQUESTS_PER_SESSION) → 429 request_cap.
Design questions
Can session-budget carry the request cap once identity is trusted, or is the cap a listener concern? The connection cap has to be a listener concern.
Done when
Conformance cases per_vm_conn_cap_429 and per_session_request_cap_429 pass.
Activity
fix: File pre-hydration refusals under the VM's own session (#1477)
Feat: Per-VM socket handover and control channel for MOCA SBX (#1569)