Repository navigation
docs: add guidance for high-concurrency prebuilt workspace claims - #31944
Closed
coder[bot] wants to merge 1 commit into
Closed
coder[bot] wants to merge 1 commit into
coder[bot] wants to merge 1 commit into
Conversation
| - Coder will automatically create new prebuilt workspaces with the updated dependencies. | ||
|
|
||
| The system always maintains the desired number of prebuilt workspaces for the active template version. | ||
| Until the new prebuilt workspaces are eligible, workspaces created from the new version's presets are built from scratch. |
Collaborator
There was a problem hiding this comment.
Can we use something less idiomatic than "from scratch" here?
|
|
||
| During the event: | ||
|
|
||
| - Don't publish a new template version, invalidate presets, or lower `instances`. |
Collaborator
There was a problem hiding this comment.
Suggested change
| - Don't publish a new template version, invalidate presets, or lower `instances`. | |
| - Do not publish a new template version, invalidate presets, or lower `instances`. |
| Each of these actions deletes unclaimed prebuilt workspaces, so developers get full builds until the replacements are eligible. | ||
| A claim that is in progress when its prebuilt workspace is deleted can also fail. | ||
|
|
||
| - If you create workspaces through the [API](../../reference/api/workspaces.md#create-user-workspace) or other automation, retry requests that return `409 Conflict` after a short, randomized delay of 1 to 2 seconds. |
Collaborator
There was a problem hiding this comment.
Suggested change
| - If you create workspaces through the [API](../../reference/api/workspaces.md#create-user-workspace) or other automation, retry requests that return `409 Conflict` after a short, randomized delay of 1 to 2 seconds. | |
| - If you create workspaces through the [API](../../reference/api/workspaces.md#create-user-workspace) or other automation, retry requests that return `409 Conflict` after a short, randomized delay of a few (1 to 2) seconds. |
Collaborator
|
Closing and reopening under a human author, as required for this repository. |
4 tasks
This branch was previously deployed
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
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:
eligiblematchesdesired, and raiseCODER_PG_CONN_MAX_OPEN.instances; retry409 Conflictfrom 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
coderd/workspaces.go,ErrNoClaimablePrebuiltWorkspaces).409comes fromwsbuilder(http.StatusConflict, "A workspace build is already active.").CODER_PG_CONN_MAX_OPENdefault is10(server CLI reference).template_name,preset_name, andorganization_namelabels (enterprise/coderd/prebuilds/metricscollector.go).Needs engineering confirmation before merge
CODER_PG_CONN_MAX_OPENrange (field guidance was about 50 to 100 per replica; left out of the page until confirmed)Intentionally left out
Linear: DOCS-1729