Deploy to Cloudflare
A Ferroseek deployment is an ordinary Worker plus static assets: the compiled engine is bundled into the Worker script, and the index parts are uploaded as assets. The repository has no deploy script; you deploy with Wrangler directly.
Before you deploy
Section titled “Before you deploy”You need a Cloudflare account that Wrangler is logged in to (npx wrangler login), and:
-
The engine built for WebAssembly:
npm run wasm:build -
An index in the Worker’s assets directory. For the standalone Worker that is
worker/assets/index/:npm run index:build:100k -
Secrets, if the Worker should require authentication (standalone Worker only; see Run a standalone search Worker).
Deploy the standalone Worker
Section titled “Deploy the standalone Worker”npx wrangler deploy --config worker/wrangler.jsoncWrangler uploads the Worker and the contents of worker/assets/. Because the configuration sets run_worker_first: true, the index files are reachable only through the ASSETS binding, not at a public URL. Observability is turned on in the same file, so request logs and CPU-time analytics appear in the Cloudflare dashboard.
Check it:
curl -s https://<your-worker>.workers.dev/Deploy an embedded Worker
Section titled “Deploy an embedded Worker”Deploy your own Worker the same way, from its directory or with --config pointing at its Wrangler file. Make sure the index is inside its assets directory at the path its assetsIndexSource reads, and that run_worker_first covers that path.
What to expect after a deploy
Section titled “What to expect after a deploy”- The first request in each new isolate loads the index. In the production measurement, loading took 226 to 313 ms and the first request 0.84 to 1.35 s in total.
- The first request after uploading new index files was slower still: 4.5 s in the one measurement.
- Memory after loading the 100k-product index was about 62 MB of the 128 MB isolate limit.
These are measurements of the proof of concept; see Performance for the conditions. If cold starts matter, send a request to new deployments before they take traffic.
Limits to keep in mind
Section titled “Limits to keep in mind”| Limit | Value | Why it matters |
|---|---|---|
| Static asset file size | 25 MiB | Index parts are at most 20 MiB |
| Isolate memory | 128 MB | Index plus your application plus per-request working memory must fit |
| Startup time of the Worker’s global scope | about 1 s | The index is therefore loaded on the first request, not at module load |
Check Cloudflare’s current Workers limits for your plan.