Skip to content

SYSTEM Cited by 1 source

dictionary-worker

dictionary-worker is Patrick Meenan's open-source reference implementation of RFC 9842: Compression Dictionary Transport, running the full dictionary lifecycle inside a single Cloudflare Worker using WASM-compiled Zstandard. Meenan is the author of RFC 9842; the Worker is an existence proof that origin-side RFC 9842 implementation is possible today, without waiting for Cloudflare's managed rollout.

What it does

  • Serves Use-As-Dictionary response headers on configured resource paths.
  • Accepts Available-Dictionary request headers on subsequent requests and delta-compresses the response against the cached dictionary using WASM-Zstandard.
  • Emits Content-Encoding: dcz (delta-compressed Zstandard) response bodies.
  • Falls back to standard compression when the client doesn't advertise dcb/dcz support or doesn't have a dictionary.
  • Manages dictionary bytes + cache-variant keys inside the Worker runtime.

Why it matters as a systems-design exemplar

The Worker shows two things:

  1. RFC 9842 is implementable today without CDN-tier managed support — any origin running a Cloudflare Worker (or any compute layer with WASM-Zstandard + cache access) can ship shared-dictionary compression now.
  2. But the origin-side cost is high enough to motivate moving it to the CDN. Cloudflare's shared-dictionaries launch post names the complexity explicitly — generate, serve, match, compress, fall back, manage cache variants, handle mid-deploy client-population splits — and argues "this is a coordination problem that belongs at the edge." The existence of dictionary-worker doesn't invalidate the claim; it's precisely the thing most customers won't build for themselves.

dictionary-worker is therefore the canonical what Phase 2 of systems/cloudflare-shared-dictionaries absorbs: advanced customers today run something like this; Phase 2 managed dictionaries turn it into a CDN-native feature that the long tail of zones can use without touching the implementation.

See also

Seen in

Last updated · 200 distilled / 1,178 read