denoland/celldPublic

self-hosted, distributed Durable Objects

v0.5.1

Upgrading from v0.5.0 can use a rolling update. Stop one node, wait for its
replacement to report healthy, then continue to the next node.

Highlights:

- Dynamic Workers can enforce CPU time and subrequest limits from
  `WorkerCode.limits` or a `getEntrypoint()` call.
- Dynamic Workers can send Tail Workers an invocation report with the request,
  response, console logs, exception, and outcome.
- The new `celld r2` CLI tool can put, get, list, inspect, and delete objects
  behind an `r2_buckets` binding without a running node. It preserves the
  binding's object metadata.
- `celld deploy` accepts Wrangler `define` values and `rules` for Text, Data,
  and CompiledWasm modules when it bundles a Worker.
- KV accepts a `ReadableStream` value in `put()`. It checks the value-size
  limit while reading the stream.
- The node caps its LTX writer and read-lock SQLite page caches, and returns
  freed C allocator pages before it measures memory pressure.
- Compaction can read retained LTX bundles after their segments leave the
  in-memory index, so a slow cell can continue draining its history.
- The `/evict/<cell>` operator route reports a refusal, cancellation, or
  failure instead of returning success before the eviction completes.
- `/state` reports isolate counts and V8 and allocator memory counters.
- Node.js compatibility improves for mutable built-in modules and the
  `process` fields that dependencies read during module loading.

Issues fixed:

- #204: `KeyObject.toCryptoKey()` honors the requested algorithm, key usages,
  and extractability, so valid RSA keys can sign with `jose`.
- #209: R2 writes work with Azure Blob Storage metadata-name rules.

Co-authored-by: Josh Collinsworth <joshuajcollinsworth@gmail.com>
Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
Co-authored-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
Co-authored-by: Yusuke Tanaka <yusuktan@maguro.dev>
YTRDNWKKJCBIBartek Iwańczuk and 5 others authored
42269c1Patch
Parent12d5b63
80 files changed+7294-1162
StackedSplit
Cargo.lock+1 −1
README.md+32 −18
crates/celld/Cargo.toml+1 −1
crates/celld/actor.rs+82 −148
crates/celld/assets.rs+8 −2
crates/celld/bucket.rs+73 −25
crates/celld/cli_output.rs+21 −0
crates/celld/deploy.rs+267 −47
crates/celld/generation.rs+29 −0
crates/celld/js.rs+1195 −73
crates/celld/js/bootstrap.rs+1 −1
crates/celld/js/crypto.js+6 −4
crates/celld/js/harness.js+169 −42
crates/celld/js/node_crypto.js+74 −14
crates/celld/js/node_stream.js+10 −0
crates/celld/js/r2_ops.rs+191 −132
crates/celld/js/tcp.rs+4 −4
crates/celld/js/websocket.rs+2 −2
crates/celld/lib.rs+16 −1
crates/celld/local_store.rs+4 −4
crates/celld/ltx_repl.rs+143 −57
crates/celld/machine.rs+2 −2
crates/celld/main.rs+55 −20
crates/celld/main/cli.rs+3 −0
crates/celld/memory.rs+140 −0
crates/celld/node_log.rs+129 −46
crates/celld/ownership_store.rs+4 −10
crates/celld/pool.rs+77 −0
crates/celld/r2_cli.rs+592 −0
crates/celld/runtime.rs+12 −6
crates/celld/storage.rs+15 −9
crates/celld/telemetry.rs+1 −1
crates/celld/wake.rs+36 −22
crates/logic/lib.rs+250 −65
crates/logic/log_evict.rs+3 −3
crates/logic/pressure.rs+1 −1
crates/logic/types.rs+125 −13
crates/ltx/src/db.rs+32 −1
docs/README.md+107 −26
docs/cloudflare-compat.md+43 −278
docs/guarantees.md+17 −12
docs/security.md+65 −1
docs/services/containers-flow.svg+97 −0
docs/services/containers.md+215 −0
docs/services/cron-triggers-flow.svg+148 −0
docs/services/cron-triggers.md+140 −0
docs/services/d1-flow.svg+111 −0
docs/services/d1.md+148 −0
docs/services/durable-object-facets-flow.svg+127 −0
docs/services/durable-object-facets.md+108 −0
docs/services/durable-objects-flow.svg+127 −0
docs/services/durable-objects.md+159 −0
docs/services/dynamic-workers-flow.svg+106 −0
docs/services/dynamic-workers.md+151 −0
docs/services/kv-flow.svg+102 −0
docs/services/kv.md+107 −0
docs/services/queues-flow.svg+127 −0
docs/services/queues.md+123 −0
docs/services/r2-flow.svg+64 −0
docs/services/r2.md+121 −0
docs/services/static-assets-flow.svg+183 −0
docs/services/static-assets.md+147 −0
docs/services/workers-flow.svg+111 −0
docs/services/workers.md+83 −0
docs/services/workflows-flow.svg+125 −0
docs/services/workflows.md+123 −0
docs/telemetry.md+3 −1
docs/testing.md+54 −68
docs/wasm.md+7 −0
examples/README.md+3 −0
examples/dynamic-worker-tails/README.md+23 −0
examples/dynamic-worker-tails/index.js+40 −0
examples/dynamic-worker-tails/wrangler.jsonc+6 −0
examples/queues/index.js+29 −0
examples/queues/wrangler.jsonc+18 −0
examples/sandbox/README.md+1 −1
examples/static-assets/public/_headers+2 −0
examples/static-assets/public/_redirects+1 −0
examples/static-assets/public/index.html+11 −0
examples/static-assets/wrangler.jsonc+5 −0