Cloudflare Pages builds get a faster, more flexible foundation

Cloudflare Pages is rolling out a rebuilt build pipeline that cuts initialization from minutes to seconds, adds live log streaming, and gives developers finer control over which commits trigger deployments. The new infrastructure, previously available as an opt-in beta, is now generally available and enabled by default for all projects.

Warm machines replace cold VM boots

The core change targets the largest source of build delay: environment initialization. Previously, every Pages build spun up a fresh virtual machine, which took more than two minutes to boot and load the build image. The new approach keeps a pool of warm VMs ready, so a build can start in roughly two to three seconds.

The speedup does not come at the cost of isolation. Rather than reusing VMs directly or falling back to containers that share the host kernel, Cloudflare now runs each build inside a gVisor sandbox. gVisor gives each container its own application-level kernel, limiting the attack surface while allowing the warm VM pool to deliver near-native performance.

Fast initialization also means quick feedback on obvious configuration mistakes. Previously, an incorrect build command or a missing environment variable would only surface after the entire build finished. Logs to diagnose the failure were available only at the end of the run. Pages now streams build logs in real time, showing events within a second of them occurring, so developers can react without waiting for the pipeline to complete.

Choosing what to build

Build control now extends beyond the build itself. Developers can specify which branches trigger automatic deployments, with independent switches for the production environment, the entire preview environment, or individual preview branches. Wildcard syntax allows rules to cover existing branches as well as any new preview branches created later, and a global pause option stops all deployment-triggered builds.

For ad hoc situations, a CI Skip command in the commit message tells Pages to ignore a particular update. This is useful when a commit contains only copy changes or a batch of small edits that do not justify a site rebuild, and these builds can be excluded without affecting the deployment history.

Toward faster framework builds and better diagnostics

Feedback from the beta period revealed that the infrastructure gains are less pronounced for larger projects built with heavy frameworks like Gatsby. The next work item is incremental builds, which would allow Pages to identify changes between commits and rebuild only the affected files. Caching external dependencies is also on the roadmap to speed up subsequent builds.

The Pages build image installs a language and tooling stack that has not seen a major revision since the product launched in 2021. Cloudflare plans to update the image to keep pace with newly released language versions, with users able to opt in to updated images to preserve compatibility with existing projects.

Finally, error messaging is slated for improvement. Streaming logs help spot config mistakes, but the occasional "Internal error occurred" remains hard to interpret. A debugging guide was recently published, with more actionable error feedback planned for later releases.