{"file":"server/scale/README.md","version":318,"total":53,"from":1,"to":53,"lines":[{"n":1,"text":"# Scale harness","atom":"a1524","author":"speed","version":152},{"n":2,"text":"","atom":"a1524","author":"speed","version":152},{"n":3,"text":"`scale.mjs` plays many agents across many projects against an abso open server (`server/`). It talks HTTP directly, as","atom":"a1524","author":"speed","version":152},{"n":4,"text":"the client does, so one machine can stand in for thousands of agents. Each project is its own Durable Object and its","atom":"a1524","author":"speed","version":152},{"n":5,"text":"own Artifacts repo, so total pushes a second should grow with the number of projects while each project's own latency","atom":"a1524","author":"speed","version":152},{"n":6,"text":"stays flat.","atom":"a1524","author":"speed","version":152},{"n":7,"text":"","atom":"a1524","author":"speed","version":152},{"n":8,"text":"## Run it","atom":"a1524","author":"speed","version":152},{"n":9,"text":"","atom":"a1524","author":"speed","version":152},{"n":10,"text":"```sh","atom":"a1524","author":"speed","version":152},{"n":11,"text":"# The token: ABSO_TOKEN, or a file. It is never printed.","atom":"a1524","author":"speed","version":152},{"n":12,"text":"ABSO_TOKEN=... node server/scale/scale.mjs --server https://abso.<you>.workers.dev --projects 10 --agents 5","atom":"a1524","author":"speed","version":152},{"n":13,"text":"node server/scale/scale.mjs --server https://abso.<you>.workers.dev --token-file ~/.abso-open/token --ramp","atom":"a1524","author":"speed","version":152},{"n":14,"text":"```","atom":"a1524","author":"speed","version":152},{"n":15,"text":"","atom":"a1524","author":"speed","version":152},{"n":16,"text":"Locally: `cd server && npm run dev` (`wrangler dev --local`, with `ABSO_TOKEN` in `.dev.vars`), then","atom":"a1524","author":"speed","version":152},{"n":17,"text":"`--server http://127.0.0.1:8787`.","atom":"a1524","author":"speed","version":152},{"n":18,"text":"","atom":"a1524","author":"speed","version":152},{"n":19,"text":"| Option | Default | What it does |","atom":"a1524","author":"speed","version":152},{"n":20,"text":"|---|---|---|","atom":"a1524","author":"speed","version":152},{"n":21,"text":"| `--server` | (required) | The server's URL. |","atom":"a1524","author":"speed","version":152},{"n":22,"text":"| `--projects` | 10 | Projects in the stage. |","atom":"a1524","author":"speed","version":152},{"n":23,"text":"| `--agents` | 5 | Agents per project. |","atom":"a1524","author":"speed","version":152},{"n":24,"text":"| `--rounds` | 3 | Edit, record and push rounds per agent. |","atom":"a1524","author":"speed","version":152},{"n":25,"text":"| `--overlap` | 0.2 | The share of rounds that edit one of the first lines of a shared file, `hot.txt`, instead of the agent's own file, so some pushes are held. |","atom":"a1524","author":"speed","version":152},{"n":26,"text":"| `--prefix` | `scale-<run id>` | Project names: `<prefix>-<stage>-p<n>`. |","atom":"a1524","author":"speed","version":152},{"n":27,"text":"| `--ramp` | off | Runs 1×1, 10×5, 50×10, 100×10 and 200×20 in order, one results file per stage, and stops early when errors pass 2%. |","atom":"a1524","author":"speed","version":152},{"n":28,"text":"| `--concurrency` | 256 | Requests in flight at once, across every agent. When requests a second come near this divided by the latency, the harness is the limit, not the server: raise it (the first ramp used 800). |","atom":"a1533","author":"speed","version":152},{"n":29,"text":"| `--max-seconds` | 240 | No new rounds start after this many seconds in a stage. |","atom":"a1524","author":"speed","version":152},{"n":30,"text":"| `--artifacts-sample` | 5 | Projects whose push out to Artifacts is timed. |","atom":"a1524","author":"speed","version":152},{"n":31,"text":"| `--artifacts-wait` | 180 | Seconds to wait for that push out. |","atom":"a1524","author":"speed","version":152},{"n":32,"text":"| `--token-file` | | Read the token from this file instead of `ABSO_TOKEN`. |","atom":"a1524","author":"speed","version":152},{"n":33,"text":"| `--out` | `server/scale/results` | Where the results files go. |","atom":"a1524","author":"speed","version":152},{"n":34,"text":"","atom":"a1524","author":"speed","version":152},{"n":35,"text":"## What each agent does","atom":"a1524","author":"speed","version":152},{"n":36,"text":"","atom":"a1524","author":"speed","version":152},{"n":37,"text":"1. Joins (`POST a/<agent>/sync`) and says what it is starting on (`a/<agent>/starting`).","atom":"a1524","author":"speed","version":152},{"n":38,"text":"2. Each round, edits its own file `agents/<agent>.txt`. With the overlap chance, it pulls and changes a line of `hot.txt`","atom":"a1524","author":"speed","version":152},{"n":39,"text":"   instead. It records the file (`a/<agent>/record`), pushes (`a/<agent>/publish`) and reads its news (`a/<agent>/news`).","atom":"a1524","author":"speed","version":152},{"n":40,"text":"3. A held push pulls and pushes again once with both sides kept, as `abso push --as-is` does after a pull.","atom":"a1524","author":"speed","version":152},{"n":41,"text":"","atom":"a1524","author":"speed","version":152},{"n":42,"text":"Each project starts with `init` and one binary file uploaded to `blobs/<sha256>`.","atom":"a1524","author":"speed","version":152},{"n":43,"text":"","atom":"a1524","author":"speed","version":152},{"n":44,"text":"## What it measures","atom":"a1524","author":"speed","version":152},{"n":45,"text":"","atom":"a1524","author":"speed","version":152},{"n":46,"text":"- Each operation's latency: p50, p95, p99 and max, in milliseconds.","atom":"a1524","author":"speed","version":152},{"n":47,"text":"- Pushes a second, overall and per project.","atom":"a1524","author":"speed","version":152},{"n":48,"text":"- Held pushes, and how many were still held after the retry.","atom":"a1524","author":"speed","version":152},{"n":49,"text":"- Errors by operation and status code.","atom":"a1524","author":"speed","version":152},{"n":50,"text":"- Time to Artifacts: for a sample of projects, it polls `GET /p/<project>/out` until `pushed.version` reaches shared's","atom":"a1524","author":"speed","version":152},{"n":51,"text":"  version. The server pushes out at most once a minute per project, so expect up to about a minute.","atom":"a1524","author":"speed","version":152},{"n":52,"text":"","atom":"a1524","author":"speed","version":152},{"n":53,"text":"The results are JSON in `results/` (summaries, not per-request logs), and a Markdown summary is printed.","atom":"a1524","author":"speed","version":152}],"atoms":[{"atom":"a1524","author":"speed","message":"","time":1791908261357,"timeIso":"2026-10-13T16:17:41.357Z","publish":{"draft":null,"version":152,"agent":"speed","message":"Scale harness for the open server, and its first ramp on abso-open","time":1791908902587,"timeIso":"2026-10-13T16:28:22.587Z"}},{"atom":"a1533","author":"speed","message":"","time":1791908901121,"timeIso":"2026-10-13T16:28:21.121Z","publish":{"draft":null,"version":152,"agent":"speed","message":"Scale harness for the open server, and its first ramp on abso-open","time":1791908902587,"timeIso":"2026-10-13T16:28:22.587Z"}}]}