Skip to content

[Containers] Document scheduling policies and snapshots - #33531

Open
thomasgauvin wants to merge 20 commits into
productionfrom
codex/containers-scheduling-policy
Open

thomasgauvin wants to merge 20 commits into
productionfrom
codex/containers-scheduling-policy

Conversation

@thomasgauvin

Copy link
Copy Markdown
Contributor

Summary

  • Builds on Add docs and changelog for containers snapshots #31946 and preserves the original snapshot commit and authorship.
  • Documents the new durable_object scheduling policy alongside the existing default policy.
  • Covers named images, runtime instance sizing, scheduling-policy immutability, snapshot restore constraints, and rollout behavior.
  • Updates the Containers architecture and configuration pages, Durable Object Container API, and Wrangler configuration reference.
  • Adds a Containers changelog entry for the scheduling-policy public beta.

Validation

  • pnpm run check (Astro: 0 errors, warnings, or hints; Worker TypeScript passed)
  • git diff --check
  • Reviewed against the Cloudflare documentation style guide and adjacent Containers docs
  • Full local build reached the bundling stage, then stopped because the local disk filled; GitHub CI will run the full build.

Documentation checklist

  • Includes a changelog entry.
  • Adheres to the documentation style guide.

@github-actions github-actions Bot added product:workers Related to Workers product product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ product:changelog product:containers size/l labels Sep 18, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://codex-containers-scheduling-policy.previews.developers.cloudflare.com (commit 1915d40)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Failed ❌

View logs ↗
2ab181b 2026-09-25T01:01:26.606Z View logs ↗
  • Build: In progress 🔵

View logs ↗
df9fcae 2026-09-25T00:54:34.498Z View logs ↗
  • Build: Failed ❌

View logs ↗
a7727d8 2026-09-25T00:36:49.781Z View logs ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://da913038.previews.developers.cloudflare.com 1915d40 2026-09-23T15:33:36.530Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://2ff72325.previews.developers.cloudflare.com dd81c5a 2026-09-23T13:56:58.264Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://7365c204.previews.developers.cloudflare.com c994c6a 2026-09-21T15:56:24.283Z Visit the dashboard ↗
  • Build: Failed ❌

View logs ↗
a730273 2026-09-18T15:54:59.341Z View logs ↗

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

AI Review

✅ Reviewed 2ab181b · 3 findings · incremental

👉 Fix in your agent 👈
Fix the following review findings in PR #33531 (https://github.com/cloudflare/cloudflare-docs/pull/33531).

Before making changes, review each finding and present a brief summary table:
- For each finding, state whether you agree, disagree, or need clarification.
- If you disagree, explain why.
- If you need clarification before deciding, ask those questions.
- Then share your plan for which issues to tackle and in what order.

After triaging, follow this order:
1. Post a comment on this PR for any findings you are skipping, with the finding ID and your reasoning.
2. Then commit the fixes for the legitimate findings.

The comment must come before the commit because the next review reads PR comments.

## Style Guide
- S-1527e939 | src/content/docs/containers/configuration/rollouts.mdx:14 | Semicolon joining two independent clauses
  The prose joins two independent clauses with a semicolon: "do not participate in application-wide rollouts; application code selects their image". Per the style guide, break into two sentences.
- S-0cd4cd70 | src/content/docs/workers/wrangler/configuration.mdx:1288 | Use "refer to" instead of "see the" before a link
  The prose uses "see the [instance types documentation]" before a link. The links rule requires replacing "see the [link]" with "refer to [link]".
- S-12045311 | src/content/docs/workers/wrangler/configuration.mdx:1289 | Use "refer to" instead of "see" before a link
  The prose uses "see [Custom instance types]" before a link. The links rule requires replacing "see [link]" with "refer to [link]".

Style Guide

  • src/content/docs/containers/configuration/rollouts.mdx:14 · Semicolon joining two independent clauses

    The prose joins two independent clauses with a semicolon: "do not participate in application-wide rollouts; application code selects their image". Per the style guide, break into two sentences.

  • src/content/docs/workers/wrangler/configuration.mdx:1288 · Use "refer to" instead of "see the" before a link

    The prose uses "see the [instance types documentation]" before a link. The links rule requires replacing "see the [link]" with "refer to [link]".

  • src/content/docs/workers/wrangler/configuration.mdx:1289 · Use "refer to" instead of "see" before a link

    The prose uses "see [Custom instance types]" before a link. The links rule requires replacing "see [link]" with "refer to [link]".

Commands
  • /review Run a review now.
  • /full-review Review the entire PR diff.
  • /disable-auto-review Stop automatic reviews.
  • /rebase Rebase against production.

@cloudflare-docs-bot

cloudflare-docs-bot Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Review coverage

🟡 4 ownership areas need approval.

Suggested reviewers: @dinasaur404 @irvinebroque @th0m @joshthoward @vy-ton

Needs approval Eligible approvers Suggested
workers @irvinebroque, @MattieTK, @vy-ton, @cloudflare/wrangler, @cloudflare/product-owners dinasaur404, irvinebroque
containers
/src/content/docs/containers/
@mikenomitch, @th0m, @cloudflare/cloudchamber, @cloudflare/product-owners irvinebroque, th0m
containers
/src/content/changelog/containers/
@mikenomitch, @th0m, @cloudflare/cloudchamber, @cloudflare/pm-changelogs, @cloudflare/product-owners th0m
durable-objects @danlapid, @iglesiasbrandon, @irvinebroque, @joshthoward, @lambrospetrou, @mikenomitch, @rita3ko, @vy-ton, @cloudflare/product-owners irvinebroque, joshthoward, vy-ton
CODEOWNERS mappings for displayed areas (4)
Pattern Owners
/src/content/docs/workers/wrangler/ @irvinebroque, @MattieTK, @vy-ton, @cloudflare/wrangler, @cloudflare/product-owners
/src/content/docs/containers/ @mikenomitch, @th0m, @cloudflare/cloudchamber, @cloudflare/product-owners
/src/content/changelog/containers/ @mikenomitch, @th0m, @cloudflare/cloudchamber, @cloudflare/pm-changelogs, @cloudflare/product-owners
/src/content/docs/durable-objects/ @danlapid, @iglesiasbrandon, @irvinebroque, @joshthoward, @lambrospetrou, @mikenomitch, @rita3ko, @vy-ton, @cloudflare/product-owners

Comment thread src/content/docs/containers/guides/image-management.mdx
@github-actions

github-actions Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Preview URL: https://2ab181b4.preview.developers.cloudflare.com
Preview Branch URL: https://codex-containers-scheduling-policy.preview.developers.cloudflare.com

Files with changes (up to 15)

Original Link Updated Link
https://developers.cloudflare.com/containers/configuration/scheduling-policy/move-from-default/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/configuration/scheduling-policy/move-from-default/
https://developers.cloudflare.com/containers/configuration/scheduling-policy/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/configuration/scheduling-policy/
https://developers.cloudflare.com/containers/guides/image-management/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/guides/image-management/
https://developers.cloudflare.com/workers/wrangler/configuration/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/workers/wrangler/configuration/
https://developers.cloudflare.com/containers/guides/snapshots/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/guides/snapshots/
https://developers.cloudflare.com/durable-objects/api/container/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/durable-objects/api/container/
https://developers.cloudflare.com/changelog/post/2026-09-30-snapshots/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/changelog/post/2026-09-30-snapshots/
https://developers.cloudflare.com/changelog/post/2026-09-30-durable-object-scheduling-policy/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/changelog/post/2026-09-30-durable-object-scheduling-policy/
https://developers.cloudflare.com/containers/concepts/architecture/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/concepts/architecture/
https://developers.cloudflare.com/containers/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/
https://developers.cloudflare.com/containers/faq/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/faq/
https://developers.cloudflare.com/containers/configuration/rollouts/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/configuration/rollouts/
https://developers.cloudflare.com/containers/platform/limits/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/platform/limits/
https://developers.cloudflare.com/containers/configuration/environment-variables/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/configuration/environment-variables/
https://developers.cloudflare.com/containers/configuration/ https://codex-containers-scheduling-policy.preview.developers.cloudflare.com/containers/configuration/


### Choose an instance size at runtime

Set `instance` in `ctx.container.start()` to one of the following named instance types:

@skepticfx skepticfx Sep 23, 2026 •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah nvm I see this below as " Refer to".

Could also just link to them when mentioning instance types for the first time.

To update a named image, change its Dockerfile or set `image` to a new digest-pinned reference. Then, deploy the Worker. The corresponding value in `ctx.container.images` now refers to the updated image.

Deploying an updated image map does not restart running Containers. A running Container continues to use its startup image. Durable Object code decides when to stop that Container and start it with the updated reference. This application-controlled restart is how you roll out image changes with the `durable_object` policy.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about we also add something like this?

Keep the existing Container running and use the configured image on its next start:

if (!this.ctx.container.running) {
  this.ctx.container.start({
    image: this.ctx.container.images.base,
    instance: "standard-2",
  });
}

For an explicit upgrade, stop the existing Container and start with the configured image:

if ((await this.ctx.container.inspect())?.image !== this.ctx.container.images.base) {
  if (this.ctx.container.running) {
    await this.ctx.container.destroy();
  }
  this.ctx.container.start({
    image: this.ctx.container.images.base,
    instance: "standard-2",
  });
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:changelog product:containers product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ product:workers Related to Workers product size/l

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants