coder / coder/internal

Investigate prebuild create vs claim build times in dogfood

Open
#992 0 comments 0 reactions 0 assignees View on GitHub
project/prebuilds
Dominant language
No language data
Stars
3
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Description

In our dogfood environment, the “Write Coder on Coder” template has prebuilds enabled for certain presets. We recently introduced new metrics for prebuild creation time (building into the pool) and prebuild claim time https://github.com/coder/coder/pull/19503, and added them to our observability stack.

These metrics show that claim durations sometimes exceed creation by about 1–2 seconds. Because prebuilds maintain a ready-to-use pool to reduce workspace start time, claims should be consistently faster than creations.

We already use a Terraform `lifecycle` block with `ignore_changes` as recommended in the [docs](https://coder.com/docs/admin/templates/extending-templates/prebuilt-workspaces#preventing-resource-replacement), yet this pattern suggests Terraform may still be replacing or re-provisioning resources during claim, or the claim path is performing extra work.

For reference, see the attached screenshot comparing average build times for a prebuild creation versus a claim on the Falkenstein preset in our dogfood instance.

Image

Image

## Investigation scope

Investigate the source of the additional claim-path latency relative to the create path.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the prebuild creation and claim metrics in the observability stack, comparing the Falkenstein dogfood data and the Terraform lifecycle block with ignore_changes described in the linked documentation. Trace the create and claim paths to identify the source of the extra 1–2 seconds; done means the additional claim latency is explained and any Terraform replacement or reprovisioning is confirmed or ruled out.

Written by the indexing model from the issue text.

Assessment

Tech stack
terraform
Domain
infrastructure, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.