How ChabuLab runs on Cloudflare: Workers, routes, checks and deploys
By ChabuLab. Published , updated . 4 min read. Đọc bằng tiếng Việt
TL;DR
chabulab.com is one Cloudflare zone with one Worker per product. Hubs own a hostname; each game and tool claims a path on it, and a path route always wins. Pages are prerendered and served as Static Assets. D1, Rate Limiting, Email Routing, Analytics Engine and Workers Logs are used only where a product needs them. Every deploy runs checks, builds, deploys a new version with Wrangler and is verified against the live page.
Why one platform?
ChabuLab is a small studio with many small products: a Mac app's website, a games hub with three games, a tools hub with several browser tools, a vocabulary app, a blog. Running them on one platform keeps the moving parts few. The domain, its DNS, the certificates, the code and the logs all live in one Cloudflare account.
The rule that shapes everything: one Worker per product. Each product deploys on its own and answers only its own addresses, so shipping one can never take another down.
Which Cloudflare services does ChabuLab use?
| Service | What it does here |
|---|---|
| Registrar and DNS | The domain at cost, with DNS on the same network |
| Workers | Every site and API, each deployed on its own |
| Static Assets | Prerendered pages, scripts and images, served from the edge |
| D1 | SQL where a product keeps data: licences, sign-in codes for LexiLoop |
| Rate Limiting | A cap on every public API |
| Email Routing | hello@chabulab.com and the other addresses, forwarded to one inbox |
| Analytics Engine | Cookieless visit counts, people and bots kept apart |
| Workers Logs | Logs and errors for every Worker, switched on in its config |
There is no server to patch and no container to keep alive. A Worker starts in a few milliseconds in the data centre nearest to the visitor.
How does a request find the right Worker?
A visit to games.chabulab.com/sudoku/ goes like this:
- DNS and TLS. The nearest Cloudflare data centre answers the DNS query and holds the certificate, so the secure connection ends close to you.
- The route table. Cloudflare looks for a Worker that claims this address. The games hub owns the whole hostname as a custom domain; the Sudoku Worker claims only
games.chabulab.com/sudoku/*. A path route always wins over the Worker that owns the host, so the request goes to Sudoku. - The Worker. Sudoku's Worker serves its prerendered page and scripts from Static Assets. A Worker that needs data reads D1; one that counts visits writes a data point to Analytics Engine.
This is how each game lives inside the games hub, each tool inside the tools hub and the blog inside chabulab.com, while every one of them is deployed on its own.
What runs before a deploy?
Each project has the same short list, run from its own scripts:
- Check. Types with tsrs, lint with oxlint, then the tests. The site tests read the built HTML: one
h1, a canonical URL, valid JSON-LD, a working language switch, no Back link that depends on browser history. - Build. Vite builds the app and prerenders every page to static HTML, so a page is complete before any script runs.
- Postbuild. Open Graph images, the sitemap, feeds,
llms.txt, the Markdown twin of each page and the icons are written next to the pages. - Deploy.
wrangler deployuploads only the files that changed and publishes a new version of that one Worker. The other Workers are not touched. - Verify. The live page is fetched with
curland checked for the change itself, not just a200. New URLs are announced to search engines through IndexNow.
What happens when something goes wrong?
Every deploy is a version. If a version misbehaves, wrangler rollback puts the previous one back in seconds, for that Worker only. Workers Logs show the errors and the requests that led to them, so the cause can be found after the rollback, not during it.
Because each product has its own Worker, a mistake in one tool's deploy stays inside that tool. The studio's pages, the other tools and every game keep answering as before.
What does it cost?
Most of it sits inside Cloudflare's free and low-cost plans: Workers, Static Assets, DNS and Email Routing cost little or nothing at ChabuLab's size, and the domain is renewed at cost. Money goes into making the products, not into keeping servers running.