Skip to content

Scaling ​

Default: Container DuckDB over files in R2. WASM only when the working set is tiny.

Options ​

Small (WASM)Normal (Container)Huge (R2 SQL)
EngineDuckDB in a WorkerDuckDB in a ContainerCloudflare scan SQL
DataSame R2 filesSame R2 filesSame R2 files
Fits~48 MB Parquet / 64 MB RAMMulti-GB interactiveWarehouse-scale scans
Idlescales to zerosleeps (cache clears)pay per scan

Move compute, not files ​

Switch when touched Parquet exceeds ~48 MB, queries spill past 64 MB, or you need full extensions / Iceberg.

     org_acme
        │
        ├── worker (WASM)     ──┐
        │                       ├──▶  r2://…/org_acme/**   (unchanged)
        └── container (native)──┘

Placement is metadata in D1. No lake copy.

R2 SQL ​

One-off monster scans: "engine":"r2sql". Needs R2_SQL_TOKEN. Dashboards stay on DuckDB.

After Container sleep ​

Local cache is gone. Next query re-reads from R2. See Limits.

Don’t ​

  • Put analytical tables in D1
  • Copy Parquet when changing placement
  • Run an always-on warehouse for weekly queries
  • Treat WASM and Containers as the same size box