Skip to content

rubberduck docs

Scales to zero · 25× faster groupbys · stay on Cloudflare

Scaling

rubberduck’s default is quick and easy: DuckDB-WASM on Workers, Parquet on R2, metadata in D1. Scale to zero, deploy with wrangler. This page is only for when a query outgrows the Worker envelope.

Default tier: Worker duckling

ComputeWorkers + @ducklings/workers
StorageR2 Parquet under org_*/
ControlD1 (orgs, ducklings, metrics)
Idle cost~$5/mo Workers Paid floor + R2
Working set~48 MB Parquet gate, 64 MB DuckDB RAM

Most embedded analytics fits here: bursty queries, mostly-idle tenants, SF0.1–1M-row facts. You pay CPU-ms when someone actually queries — not rows-read on every full scan.

When to graduate

Move compute, not data, when:

  • Parquet working set exceeds the ~48 MB gate
  • High-cardinality aggs spill past 64 MB (pnpm memory-boundary in the repo)
  • You need sustained multi-GB hot scans or hard low-latency SLOs

The lake stays on R2. Only the duckling placement changes.

Placement without copy

     org_acme

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

Placement is metadata. Moving an org Worker → native must not require copying Parquet.

Local lab (pnpm demo) flips placement and checks content hashes are unchanged. On the hosted Cloudflare path, native graduation is still P1 (HTTP 501 today) — the invariant is proven; the wiring is not.

Native duckling (graduation target)

Same contract, bigger envelope:

WorkerNative
RAM~64 MBGiB-scale
Threads1many
Idlescales to zeropool / on-demand
Same R2 prefixyesyes

Options on Cloudflare: Containers, larger Workers limits over time, or an external native DuckDB pool (Fly, celld) with scoped R2 credentials.

What not to do

  • Don’t stuff analytical tables in D1 and hope it scales — row-store full scans are the wrong economics. See Numbers.
  • Don’t copy Parquet when you graduate — update placement in D1, point the duckling at the same prefix.
  • Don’t run a always-on warehouse for tenants that query once a week.

Scales to zero. 25× faster than D1 on groupbys. No need to go to another provider.