#I am geeking out about Cloudflare workers

1 messages · Page 1 of 1 (latest)

bright bay
#

Hey everyone! Recently I have been exploring workers in Cloudflare and am really impressed. I know I'm a bit late on it. Does anyone have any cool things they have done with them? The HTMLRewriter is what really peaked my interest.
I watched https://www.youtube.com/watch?v=NGk2HxV0Xkg yesterday and 🤯

Cloudflare workers are like serverless functions that always run at the edge, making them incredibly fast. Not only that, but the tooling around them is really nice. They can run at particular routes on your own website, removing any awkward CORS troubles, and helping you craft clean APIs. But they also have special superpowers, like access to K...

▶ Play video
odd solstice
#

I have 2 things that have worked well. First I had a small app with ability to sign up that I put up as a proof of concept, and someone found it and started spamming sign ups. I put a worker in front of it to log request data, and found that all the requests were coming out of Europe. I'm in the US and built the app for myself, so I changed the worker to not respond unless the request originated in North America. From Europe it would look like the app was taken down.

Second was an endpoint that acts as a webhook from a running application and receives metric and tracing data. All it does is receive the data and send a 200 back, and then stores the log data in MongoDB Atlas after the fact. From the perspective of the production app it's really fast. Now I have a way to ingest telemetry data from a running app in a way that doesn't slow the app down.

Cloudflare workers are awesome.