Skip to content

How is filesystem persistence handled? Are we billed for "idle" sandboxes? #102

@Macil

Description

@Macil

I'm currently using Cloudflare Containers for a task where filesystem persistence would be useful. (I'm currently handling this by making the process in the container have export and restore data endpoints which stream in/out a compressed tar stream of files, and then the durable object streams that in/out of R2.)

The Cloudflare Sandbox SDK caught my eye because the docs say at https://developers.cloudflare.com/sandbox/concepts/sandboxes/#idle:

After inactivity, the sandbox may enter idle state. Filesystem state is preserved, but the container may be paused. Next request triggers a warm start.

When a sandbox is in idle state, is it the case that the container is still active (and still incurring billing costs), or is it shutting down with its filesystem persisting somehow? Is the Cloudflare Sandbox SDK persisting the filesystem in userspace similar to my strategy, or is it using some Containers API feature that I'm overlooking?

I've skimmed this repo's code, both in the main and v03 branches, and not found an answer to this. So far it seems to me like the container is still active, merely shutting down user processes in it when entering idle state. If correct, it would be good if the docs were more clear on this especially since it would mean users are still billed for idle sandboxes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions