Skip to content

[DO] Document Durable Object shutdown hook - #32877

Draft
iglesiasbrandon wants to merge 6 commits into
productionfrom
docs/durable-objects-pre-shutdown-hook
Draft

iglesiasbrandon wants to merge 6 commits into
productionfrom
docs/durable-objects-pre-shutdown-hook

Conversation

@iglesiasbrandon

@iglesiasbrandon iglesiasbrandon commented Aug 20, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Documents the Beta Durable Objects [shutdown](info) hook using the shutdown well-known symbol exported from cloudflare:workers.

Adds the API contract, lifecycle behavior, best-practice checkpointing guidance, RPC behavior, and tracing span attributes for shutdown invocations.

Documentation checklist

@github-actions github-actions Bot added product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ size/m labels Aug 20, 2026
@github-actions

github-actions Bot commented Aug 20, 2026 •

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/docs/durable-objects/ @danlapid, @iglesiasbrandon, @irvinebroque, @joshthoward, @lambrospetrou, @mikenomitch, @rita3ko, @vy-ton, @cloudflare/product-owners
/src/content/docs/workers/observability/ @irvinebroque, @mikenomitch, @nevikashah, @vy-ton, @cloudflare/product-owners
/src/content/partials/durable-objects/ @danlapid, @iglesiasbrandon, @irvinebroque, @joshthoward, @lambrospetrou, @mikenomitch, @rita3ko, @vy-ton, @cloudflare/product-owners

@iglesiasbrandon iglesiasbrandon changed the title [Workers] Document Durable Objects preShutdown hook (WIP) WIP [DO] Durable Objects preShutdown hook Aug 20, 2026
@bogdanchodkowski308-lab

Copy link
Copy Markdown

@vy-ton vy-ton left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@iglesiasbrandon We should also think about how new handler is reflected in observability like tracing. Same as a span for DO constructor I would want a span if preShutdown runs

Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
| --- | --- |
| Lack of requests to an object (eviction due to inactivity) | Yes |
| New Worker deployment with a code update | Yes |
| Cloudflare updates to the Workers runtime system | No |

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Do we ever plan to support this? Or longer runtime drain period is the answer here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

its something we are considering

@cloudflare-workers-and-pages

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

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://docs-durable-objects-pre-shutdown-hook.previews.developers.cloudflare.com (commit b999bf9)

This URL reflects your latest Preview deployment

Preview Deployments by commit

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

View logs ↗
https://d961baf6.previews.developers.cloudflare.com b999bf9 2026-09-23T21:13:20.391Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://03cead4f.previews.developers.cloudflare.com 48adb5c 2026-09-21T21:16:16.747Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://962ad2a0.previews.developers.cloudflare.com 1206784 2026-09-14T14:25:33.039Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://5e813071.previews.developers.cloudflare.com ae2a389 2026-09-14T14:00:35.109Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://5c03ed1a.previews.developers.cloudflare.com 3eaa479 2026-09-11T14:09:15.240Z Visit the dashboard ↗

@iglesiasbrandon iglesiasbrandon changed the title WIP [DO] Durable Objects preShutdown hook [DO] Document Durable Object shutdown hook Sep 14, 2026
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
Comment thread src/content/docs/durable-objects/concepts/durable-object-lifecycle.mdx Outdated
@cloudflare-docs-bot

Copy link
Copy Markdown
Contributor

@iglesiasbrandon This draft pull request has had no activity for 3 days. It will close after 7 days of inactivity. Transition to ready for review if ready. A codeowner can comment /draft-never-stale to keep it open.

@github-actions github-actions Bot added the product:workers Related to Workers product label Sep 23, 2026
@iglesiasbrandon

Copy link
Copy Markdown
Collaborator Author

/draft-never-stale

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

Labels

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants