Repository navigation
prototype(tier2): execution-service spike on ECS Fargate with workerd and Neon - #379
Closed
allisonmahmood wants to merge 8 commits into
Closed
allisonmahmood wants to merge 8 commits into
allisonmahmood wants to merge 8 commits into
Conversation
… host stub PROTOTYPE for #311. Runs locally against Neon; ECS wiring next. Co-Authored-By: Claude Fable 5.1 <[email protected]>
PROTOTYPE for #311. Adds crane build, ECS deploy/destroy, the thirteen measurement scripts, and the measured tables with the awkward list. Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
…adds README Co-Authored-By: Claude Fable 5.1 <[email protected]>
Co-Authored-By: Claude Fable 5.1 <[email protected]>
… mutation keys, epoch fence, authz checks PROTOTYPE for #311 round 2. Bench scripts and results follow. Co-Authored-By: Claude Fable 5.1 <[email protected]>
PROTOTYPE for #311 round 2. Co-Authored-By: Claude Fable 5.1 <[email protected]>
…eded-host guard PROTOTYPE for #311 round 2. RESULTS.md gains the Round 2 section: process modes, deadline cleanup, mutation keys, ownership transitions, the authorisation table and the Neon autosuspend probe run alone. Co-Authored-By: Claude Fable 5.1 <[email protected]>
This was referenced Sep 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prototype, not for merge. Part of #311.
The self-hosted execution service on the Tier 2 map had only been argued from research: open-source workerd's Worker Loader in a credential-free task, callbacks through a loopback carrying a capability the guest never holds, one SERIALIZABLE transaction per mutation on Neon, and a pool of pre-started Fargate tasks as the wake path. This throwaway spike builds exactly that on ECS Fargate in
us-east-1against the Neon spike project so every number on the ticket could be measured instead of guessed.What is here, all under
prototypes/tier2-exec/and outside the pnpm workspace:handlers/: a patch repo'sserver/as an agent would write it (contacts,abuse,probe), esbuild-bundled into one guest module per version.exec/: the execution container: a Node supervisor (watchdog, RSS bound, kill and respawn) in front of workerd 1.20260925.1 with a loader Worker on the realworkerLoaderbinding, one cached dynamic Worker per company/patch@version,globalOutboundbound to a refusing loopback, callbacks overctx.exportsprops with the invocation id only.host/: a stub of Patchy's runtime host: capabilities per attempt,/invokewith the four-slot cap,/callbackopening the mutation's transaction,/streamSSE, three-way attribution, and the pool manager.neon-bench/: the raw Neon measurements run from a one-off Fargate task in a scratch database.infra/andbench/: crane image builds (no docker), deploy and destroy, one script per measurement.Measured from the host task in
us-east-1(full tables and the awkward list inRESULTS.mdandneon-bench/RESULTS.md):40001re-invokes and commits on the second attempt with a correct total; the fifth concurrent invoke getsbusy; a replayed capability getsinvocation_ended.busyuntil the respawn. A 200 MB allocation was only caught by the RSS bound on the third try.SET-only role grant after eachCREATE ROLEandDROP DATABASEunderSET ROLE.Round 2 (2026-09-25, same branch)
Astra's closure conditions from round 1, measured; tables under
## Round 2inRESULTS.md:PROCESS_MODE=company|patchin the supervisor. Under a tight loop in patch A, a sibling patch B in the same task committed 58 of 179 requests in company mode (121 errors, p99 5.0 s) and 177 of 179 in patch mode (2 busy, p99 329 ms, degraded but never stalled); the kill restarts only the offending process. The price is memory: about 45 MB per loaded patch process, 1006 MB aggregate for 20 loaded versions against 193 MB in company mode; processes are reaped after 60 s idle and respawn in 40 ms.handler_timeoutwith confirmed rollback, late callbacks refused by name, slot released; a lost commit reply isunknown_outcomeand landed its rows five of five.Run round 2 with
./bench/r2-run.shafterdeploy.sh.Try it
The Neon bench alone:
cd neon-bench && ./build.sh && ./run-on-fargate.sh(or./run-local.shfor the cross-region contrast). A local loop without ECS is in the README.Not breaking: nothing outside
prototypes/tier2-exec/changes.Built by Claude Fable 5.1 via Claude Code (two subagents)
🤖 Generated with Claude Code