ZBSearch

Cost calculator

Estimate the monthly Cloudflare bill for a ZBSearch Edge deployment - Workers requests and CPU, R2 storage and operations, and Durable Objects, from measured baselines.

ZBSearch Edge runs entirely on Cloudflare Workers, R2, and Durable Objects (a write coordinator per index, a search node per shard), so the monthly bill is a function of three workload dimensions: documents, searches, and writes. Drag the sliders to match your workload:

ZBSearch Edge is unoptimized right now. Real-world costs are higher than they should be, and we're actively working to make it way cheaper.

Estimated monthly cost
$12.35/mo
$1.24 per 1M searches
Workers base plan$5.00includes 10M req + 30M CPU-ms
Workers requests$0.0010.0M req
Workers CPU$0.0030.0M CPU-ms
R2 storage$0.009 MB
R2 Class A (writes)$0.00120 ops
R2 Class B (reads)$0.002.6M ops
Durable Objects$7.3550.0M req

Requires Workers Paid ($5/mo base, included above). The free plan caps CPU at 10ms per invocation, which search workloads exceed.

Warm search ~2.0ms CPU; cold isolate adds ~25ms for snapshot load.

How the estimate works

The calculator applies Cloudflare's published pricing (verified July 2026) to resource usage measured with the load-testing harness:

InputValueSource
Index size~1.39 KB/doc13.87 MB snapshot per 10k docs, measured on R2
Warm search CPU~0.4ms per 1k docs~1.1ms @10k, ~40ms @89k docs measured
Cold-isolate search+~5µs/doc (snapshot load)~0.5s at 100k docs, assumed 2% of searches
Writesbatched 100/request, ~30ms CPU75 docs/s via API measured on a deployed Worker
Rebuildsevery 500 ops/shard, ~62µs CPU/doc96k docs rebuilt in ~6s CPU, measured
R2 meta readsshards+1 GETs per searchmeta.json is re-read per shard per search (uncached)
Search fan-out1 ShardSearch DO request per shard per searchDistributed search: each shard query runs in its own DO isolate

Pricing dimensions: Workers Paid $5/mo (includes 10M requests + 30M CPU-ms, then $0.30/M requests and $0.02/M CPU-ms), R2 $0.015/GB-month with Class A at $4.50/M and Class B at $0.36/M (10 GB + 1M A + 10M B included, egress free), Durable Objects $0.15/M requests (1M included; DO duration and storage are negligible at these snapshot sizes).

Rules of thumb

  • Below ~1M searches/month, everything fits in the $5 base plan. R2 storage and Durable Objects stay rounding errors at any scale on this page.
  • The Workers Free plan is not viable for search. It caps CPU at 10ms per invocation - measured 97.8% of searches failing with error 1102 on a 10k-doc index. Writes do fit.
  • Enable the meta cache in the calculator to see the single biggest cost lever at high QPS: per-shard meta.json reads currently hit R2 on every search, and at 30M searches/month they cost more than compute.
  • Sharded searches multiply DO requests. A search on an N-shard index makes N ShardSearch DO requests - at 5 shards and 30M searches/month that's 150M DO requests (~$22). Still cheaper than the R2 reads the meta cache removes.
  • CPU scales with corpus × QPS. Each shard DO searches its full snapshot, so past ~100k docs per shard the compute line dominates. Beyond that, route queries to relevant shards/tenants instead of scatter-gathering over everything.

On this page