Skip to content

docs: add guidance for high-concurrency prebuilt workspace claims - #31991

Merged
nickvigilante merged 1 commit into
mainfrom
docs/prebuilds-high-concurrency-claims
Nov 12, 2026
Merged

nickvigilante merged 1 commit into
mainfrom
docs/prebuilds-high-concurrency-claims

Conversation

@nickvigilante

Copy link
Copy Markdown
Collaborator

Adds a Prepare for high-concurrency claims section to the prebuilt workspaces page. It covers what admins should do when many developers create workspaces from the same preset at once, such as a training session or onboarding day:

  • Before the event: size the pool with headroom, give it time to fill, confirm eligible matches desired, and raise CODER_PG_CONN_MAX_OPEN.
  • During the event: don't publish template versions, invalidate presets, or lower instances; retry 409 Conflict from API clients with jitter; watch the claim metrics.

Also adds a short note to Template updates and the prebuilt workspace lifecycle: until the new version's prebuilds are eligible, new workspaces are built from scratch.

Verified against code

  • Pool exhaustion falls back to a normal build (coderd/workspaces.go, ErrNoClaimablePrebuiltWorkspaces).
  • 409 comes from wsbuilder (http.StatusConflict, "A workspace build is already active.").
  • CODER_PG_CONN_MAX_OPEN default is 10 (server CLI reference).
  • Prebuild metrics carry template_name, preset_name, and organization_name labels (enterprise/coderd/prebuilds/metricscollector.go).

Needs engineering confirmation before merge

  • The 20 to 30 percent headroom recommendation
  • Retry delay of 1 to 2 seconds with jitter
  • Whether to publish a recommended CODER_PG_CONN_MAX_OPEN range (field guidance was about 50 to 100 per replica; left out of the page until confirmed)
  • The line that a claim in progress can fail if its prebuild is deleted (known limitation noted in fix(coderd/database): lock the workspaces row when claiming a prebuild #31518; included as configure-around guidance per the content guidelines' bug exception)

Intentionally left out

Linear: DOCS-1729

Supersedes #31944, reopened under a human author for attribution.

@nickvigilante nickvigilante added the community Pull Requests and issues created by the community. label Nov 10, 2026
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:55 — with GitHub Actions Inactive
@nickvigilante nickvigilante self-assigned this Nov 10, 2026
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:55 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:55 — with GitHub Actions Inactive
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 15:55 — with GitHub Actions Inactive
@nickvigilante
nickvigilante marked this pull request as ready for review November 10, 2026 23:05
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 23:05 — with GitHub Actions Inactive
@nickvigilante
nickvigilante force-pushed the docs/prebuilds-high-concurrency-claims branch from 3a6c672 to 754d1bc Compare November 10, 2026 23:26
@nickvigilante
nickvigilante temporarily deployed to main November 10, 2026 23:26 — with GitHub Actions Inactive
@nickvigilante nickvigilante added cherry-pick/v2.39 Cherry-pick PR targeting release/2.39 and removed community Pull Requests and issues created by the community. labels Nov 12, 2026
@nickvigilante
nickvigilante merged commit 7340da6 into main Nov 12, 2026
33 of 35 checks passed
@nickvigilante
nickvigilante deleted the docs/prebuilds-high-concurrency-claims branch November 12, 2026 18:31
@github-actions

Copy link
Copy Markdown
Contributor


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@nickvigilante
nickvigilante temporarily deployed to main November 12, 2026 18:31 — with GitHub Actions Inactive
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 12, 2026

This branch was previously deployed

1 inactive deployment
main — 754d1bc6 Deployed Nov 12, 2026 by nickvigilante via cla #255192
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

cherry-pick/v2.39 Cherry-pick PR targeting release/2.39

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants