Cloudflare Workers is a way of running code without a server to manage. Instead of installing an application on a machine somewhere and keeping that machine patched and running, you write a small piece of code and it runs automatically, on demand, at whichever the edge location is closest to the person who triggered it.

On a typical business site, most pages need no code at all. They are files, served as-is. The exception is anything that has to do work: a contact form that needs to save a submission, a booking button that needs to check something, a redirect that depends on where the visitor is coming from. That is what a Worker handles. It is small, it does one job, and it only runs when called.

This is different from a plugin sitting on a shared server, which runs all the time whether anyone needs it or not, and which is one more thing that can be out of date or exploited.

Why it matters to you

The old way of adding “smart” behaviour to a website meant a server, a database connection open around the clock, and a piece of software that needed updates forever. Every one of those is a maintenance job and a security surface. A Worker replaces that with code that exists only for the moment it is needed, with nothing sitting idle waiting to be attacked.

It also scales without you thinking about it. If your contact form suddenly gets ten times the normal traffic because of a mention somewhere, the Worker handling it just runs ten times as often. There is no server to run out of capacity.

How I set it up

I write the specific piece of logic a site needs, most often form handling that validates a submission, checks it is not spam with a bot check, and writes it to a private database before sending a notification email. That code is deployed alongside the site itself, versioned the same way, and reviewed the same way. There is no separate server to provision and no separate bill for idle capacity.

I keep each Worker narrow on purpose. One does form intake. Another might handle a redirect rule. I do not build one large piece of code that tries to do everything, because a small, single-purpose Worker is easier to reason about and easier to fix if something ever needs fixing.

What it looks like in practice

You will not interact with a Worker directly. What you will notice is that your contact form works, that a lead lands in your inbox and in a private record at the same time, and that none of it depends on a server that might be down, slow, or overdue for an update. If I ever change how the form behaves, I change the Worker’s code and deploy it. The site keeps running the entire time.

Questions I get about this

Do I need to know what a Cloudflare Worker is to have one?
No. It runs behind the scenes whenever your site needs to do something beyond serving a page, such as processing a contact form. You will never open it or configure it day to day. It is part of how the site is built, not a tool handed to you.
Is this the same as the "Workers" you hear about for building whole apps?
Same technology, smaller job. Some businesses run entire applications on Workers. On the sites I build, they typically do one focused thing well, like accepting a form and writing it to a database, rather than running a full application.
What happens if a Worker fails?
It fails small. Because each one does one job, a problem in the form-handling code does not take down the rest of the site, which is just files served from the network. That separation is deliberate.

Where this fits in our work

Want this set up properly for your business?

This is the kind of thing I build every week. Grab a time and we will talk through what fits.