Title: fleet-proxy: pool sized for the fleet's work — default 50 + bounded wait in pool_get · Issue #5563 · developing-today/code · GitHub
Open Graph Title: fleet-proxy: pool sized for the fleet's work — default 50 + bounded wait in pool_get · Issue #5563 · developing-today/code
X Title: fleet-proxy: pool sized for the fleet's work — default 50 + bounded wait in pool_get · Issue #5563 · developing-today/code
Description: Order Drew, 2026-11-04: "build something that supports all our work — that was always the goal — fix it." Both arms approved: the env raise now, and the code fix behind it. Evidence The concurrency report on #5412 (comment 6634809392) is...
Open Graph Description: Order Drew, 2026-11-04: "build something that supports all our work — that was always the goal — fix it." Both arms approved: the env raise now, and the code fix behind it. Evidence The concurrency...
X Description: Order Drew, 2026-11-04: "build something that supports all our work — that was always the goal — fix it." Both arms approved: the env raise now, and the code fix behind it. Evidence The c...
Opengraph URL: https://github.com/developing-today/code/issues/5563
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fleet-proxy: pool sized for the fleet's work — default 50 + bounded wait in pool_get","articleBody":"## Order\n\nDrew, 2026-11-04: \"build something that supports all our work — that was always the goal — fix it.\" Both arms approved: the env raise now, and the code fix behind it.\n\n## Evidence\n\nThe concurrency report on #5412 (comment 6634809392) isolated the defect in `crates/fleet-proxy/src/serve.rs`:\n\n- The per-port tunnel pool is an idle cache capped by `LAPTOP_AGENT_POOL`, default **12**.\n- `pool_get` never waits: no idle tunnel ⇒ open a brand-new tunnel immediately, which costs seconds under burst; only 12 are retained, so the next burst pays again.\n- Benchmark (32 concurrent, production): queue-broker p50 **1001.7 ms** through the proxy vs 213.0 ms direct, ~1/6 the throughput; the cliff starts exactly at the cap (at 16 concurrent, p95 already 851 ms). The identical binary with the pool at 32 (scratch control) restored direct-class performance (p50 137.8 ms). Backends are exonerated; the cap + no-wait overflow is the cause.\n\n## Scope\n\n1. **Default idle cap 12 → 50.** Brokers are auto-spawned by `fleet proxy connect` (`ensure_broker`) from arbitrary consumers whose environments do not carry the knob — a production broker was observed respawned by a random consumer with no `LAPTOP_AGENT_POOL` in its environment, silently reverting an env-only raise. The right size must be the compiled default; the env var remains an override. (The immediate arm — `LAPTOP_AGENT_POOL=50` at the sandbox broker's owning launch surface, `init-ensure.sh` — lands with this issue and stays as an explicit override.)\n2. **Bounded wait in `pool_get`.** When no idle tunnel exists and opening another would exceed the pool size in live tunnels, wait (condvar signalled by `pool_put`) up to a bounded budget (250–500 ms, justified from the benchmark's tunnel-return times) for a returned tunnel before opening a new one. Hard requirements: a request must never hard-fail because of the pool (timeout ⇒ open a new tunnel, as today); the existing failure path (discard dead pooled connection, retry once on a fresh tunnel, then 502) is preserved; the pool mutex is never held during network I/O; keepalive behavior unchanged (never resets idle-exit).\n3. **Legibility.** Named constants, the overflow policy (idle → wait-bounded → grow) commented at `pool_get`, and the effective pool size rendered in the broker's startup line.\n4. **Tests/smoke.** Unit coverage for the wait (a waiter is woken by `pool_put`; a waiter times out into a fresh tunnel; live-count accounting). The workspace smoke gains a 32-concurrent hermetic burst against a scratch broker on default config asserting no request hangs or fails, plus the startup-line pool rendering.\n\n## Acceptance\n\n- Workspace tests + full smoke suite green.\n- Merged, and the production sandbox broker redeployed onto the merged build: health on all three ports, `repo-queue health`, framed secrets request, and a 32-concurrent burst spot-check at direct-class p50.\n- A broker auto-spawned with no `LAPTOP_AGENT_POOL` in its environment verifiably runs the 50 default (startup line).\n","author":{"url":"https://github.com/apps/developing-today","@type":"Person","name":"developing-today"},"datePublished":"2026-11-04T15:46:15Z","url":"https://github.com/developing-today/code/issues/5563"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:e2902f63-c5c8-2471-0a52-298b036e7883 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9100:17C530:D26B36:10FA1F7:6B06417B |
| html-safe-nonce | 632e2cac2ea0593083bf09381946be7f11be35df979649b3de9219e6eaf0ff7c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MTAwOjE3QzUzMDpEMjZCMzY6MTBGQTFGNzo2QjA2NDE3QiIsInZpc2l0b3JfaWQiOiI1NjA4OTI0MDAxMjU1OTY1MDUxIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d5311ebf01e32ad60f41f0f91d4b14a4caf655399895a1f9f59a4c73c97324b9 |
| hovercard-subject-tag | issue:6206185420 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/5563/issue_layout |
| twitter:image | https://opengraph.githubassets.com/4be0285ef2133ea0779c1ae1a062a7622334a7f1c642acd657df6958e0c9dc8f/developing-today/code/issues/5563 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/4be0285ef2133ea0779c1ae1a062a7622334a7f1c642acd657df6958e0c9dc8f/developing-today/code/issues/5563 |
| og:image:alt | Order Drew, 2026-11-04: "build something that supports all our work — that was always the goal — fix it." Both arms approved: the env raise now, and the code fix behind it. Evidence The concurrency... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | developing-today[bot] |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1bff4f6bfaa96dc9c42cacf315424c24ebb548b06142ced5e3aaccb2a42dd652 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac613d3698d3d8565651455086e1f74da07bf277 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width