Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Offload large files (4 MB+) to R2

Đang mở
#217 4 bình luận 1 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@aron-cf đang làm issue này rồi.

Từ ngày 8/10/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

enhancement

vfs_* tables in Durable Object SQLite hold all file content today, so a workspace is capped at the Durable Object storage limit (about 10 GB). R2 mounts are read-only, which means a writable file can't live outside that cap.

@cloudflare/shell in cloudflare/agents had a hybrid model. It kept small files inline in SQLite and moved files over a size threshold to R2. We're deprecating Shell in favour of Computer, and some agents (media, datasets, build outputs) will need large writable files.

Proposal
  • Add an optional R2 bucket to WorkspaceOptions, along with a size threshold. The default would be 4 MB.
  • When a write reaches the threshold, the content goes to R2. vfs_nodes keeps the metadata and a pointer to the R2 key. The key is scoped by workspace, using the session id or DO id.
  • Reads through workspace.fs, the worker backends, and the container sync path resolve the pointer without the caller knowing about it. A read of an R2-backed file returns a stream, so the bytes never pass through SQLite.
  • rm, overwrite, and gc() delete the R2 object they replace.
  • Without a bucket, behaviour stays as it is today.
Open questions
  • Should content-addressed blob dedup extend to R2 objects, or should R2 hold one object per file?
  • Container sync could pull large R2-backed files on demand instead of copying them into the container's in-memory VFS. Is that in scope here?
Ngôn ngữ chính
TypeScript
Star
9.5k
Fork
552
Merge trung bình
2 ngày 6 giờ
Pull request đã merge (30 ngày)
47

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của cloudflare/computer

Tất cả issue của cloudflare/computer

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.