6 ms·
What do you guys use Cloudflare Workers for ?
by z3t4 5y ago
What do you guys use Cloudflare Workers for ?
- tyingq 5y agoIt's almost perfect for a url shortener, even with custom urls if paired with the kv store. Trivial, I know, but go look at what some people pay for these services.
- paulgb 5y agoSimilar to URL shorteners, I've had cases where I wanted to allow users to create a “share link” that persists data in an app that otherwise didn't have persistence. Typically I've used a Lambda job that uploads to a public S3 bucket, but next time it comes up I plan to try Workers.
- chocolatkey 5y agoI've actually used it to bypass inherent (imo) shortcomings in Firebase dynamic links. And add custom functionality, such as allowing for single-letter query strings to append utm parameters (?t -> utm_source twitter). I also didn't want the smart detection it tries to use for mobile devices with its JS-enabled page, so the worker scrapes the correct URL from the page as well
- latchkey 5y agoI run multiple physical data centers with thousands of individual machines that operate autonomously. I proxy/cache API hits to the Github API so that each machine can download a small binary app that runs on each of them that works to ensure each machine is operating as it should. It is a whole self-upgrade process that involves using Github CI to do the binary build on commit (and run the unit tests, of course) to produce a new version. The app (running on each box) periodically queries a versions file stored in git (also proxied through a worker) so they know which build to download. I can segment versions of the app across CIDR so that I can do channel (alpha/beta/stable) based releases for testing. It is a pretty epic solution since the workers only cost $5/month and totally saves my bacon with just a small bit of simple code.
- dexwiz 5y agoThe $5/month makes me suspicious. Is it really that cheap forever, or just until they capture enough of the market they can up that cost without people jumping ship.
- kjksf 5y agoThe pricing is actually $0.15/million requests per month. $5 is minimum monthly payment. They also have a free plan with 100,000 requests per day.
- picardo 5y agoI built an API proxy using a CF Worker today. The deploy takes only 2 seconds. Its speed is its killer feature.
- ignoramous 5y agoSee: https://workers.cloudflare.com/built-with https://workers.cloudflare.com/built-with
- systemvoltage 5y agoI wish it wasn't based on a JS backend. For example, if you write Python, it gets translated to JS using Transcrypt. That just feels wrong to me.
- ignoramous 5y agoWorkers can run WASM (as can deno). So, you're right at home with c, cpp, and rust (and any other language that can compile to wasm)
- IshKebab 5y agoIs that actually any slower? Python is so slow compared to JavaScript I wouldn't be surprised if transpiling it sped it up!