Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Offload large files (4 MB+) to R2

Aperta
#217 4 commenti 1 reazione 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

@aron-cf ci sta già lavorando.

Dal 8/10/2026.

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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?
Lingua principale
TypeScript
Stelle
9.5k
Fork
552
Merge medio
2g 4h
PR unite (30g)
49

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di cloudflare/computer

Tutte le issue di cloudflare/computer

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.