Menu

1 / 2

Running Caddy on Cloudflare Workers via WebAssembly

DEV Community·Roman Bondarenko·6 months ago
#ZUxktaRC
#caddy#cloudflare#webassembly#go#memory
Reading 0:00
15s threshold

Hi folks. This is my first post. Happy to join you here :)

I’ve been running Caddy in production long enough to know two things: the Caddyfile is a joy to work with, and everything around it tends to get way more complicated than it should.

For over a decade, the software engineering industry has been captivated by the containerization paradigm. You start with a clean Caddyfile on your laptop, then you add Docker for a $5 Virtual Private Server (VPS), then Helm charts, Terraform, or custom CI glue to get things into a Kubernetes cluster or edge platform. Suddenly, that elegant routing config is buried under YAML and infrastructure that mostly exists just to move the same HTTP rules between environments.

So, I asked a simple question: What if one Caddyfile could run on my laptop, on a cheap VPS, and on the infinitely scalable Cloudflare edge - without Docker, and without rewriting configs?

That question led to a profound architectural shift: compiling the Caddy web server directly to WebAssembly (WASM)…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.