4 ms·
Has anyone here used Cloudflare workers yet? I know they just launched recently. - Where you using new or existing code (coming from Lambda for example)? - How
by eberkund 8y ago
Has anyone here used Cloudflare workers yet? I know they just launched recently.
- Where you using new or existing code (coming from Lambda for example)?
- How did the performance compare?
- Did you run into any difficulties?
- manigandham 8y agoYes, we've run billions of requests through them. They have the best performance and the lowest-latency, along with running globally instead of a single datacenter. It's just javascript so you can use npm packages and compile the final script to deploy.
- rat9988 8y agoDoes it guarantee some sort of high availability? Like if two of your datacenters are struck by a meteor would a third one serve my audience? (same question for you workers KV)
- manigandham 8y agoCloudflare is a CDN so they're designed for high-availability with over 100+ datacenters. CDNs are designed to forward requests to a origin server and cache the results, but you can serve your site completely from Workers if you embed all the code and data into the deployed script or store content in KV.
- physcab 8y agoDoes have to fit in their 1MB limit though (i think)
- rmoaiandin 8y agoIt's the CPU time that you should really worry about mainly. But the limits are here: https://developers.cloudflare.com/workers/writing-workers/resource-limits/ https://developers.cloudflare.com/workers/writing-workers/re...
- panarky 8y agoI signed up for a subdomain with the https://workers.dev https://workers.dev launch, but since then I've heard nothing from Cloudflare about when they'll actually turn it on.
- zackbloom 8y agoIf your goal is to augment an existing domain on Cloudflare (as in the post), you can actually use Workers today. Login to your Cloudflare dashboard and click the "Workers" tab.
- alexbecker 8y agoWe use them to restrict access to some static assets (beta documentation) by checking an authorization endpoint. Haven't had any problems--but we're also doing this at a very small scale.
- kmf 8y agoYes, it's a super rad product. Using it for a few things, so far: 1) Working on a project right now that provides edge-level analytics for your sites w/ a focus on privacy: more accurate than Google Analytics (JS blockers remove ~1/3 of your traffic stats) and less icky for your users. Funny this comes up, I'm putting together a list for people who are interested in beta testing, if that sounds appealing: https://xyz.us16.list-manage.com/subscribe?u=0b8a0e873d096aad47c111571&id=5f56b6cabd https://xyz.us16.list-manage.com/subscribe?u=0b8a0e873d096aa... 2) Extreme caching on a Wordpress site – using Cloudflare's edge cache WP plugin[1] and the worker from the workers-example repo[2] – currently at a 97% cache hit rate across the site. update: just double-checked the cache hit stat on Cloudflare, after writing this comment - actually have a 99.95% cache rate as of today (!) [1] https://wordpress.org/plugins/cloudflare-page-cache/ https://wordpress.org/plugins/cloudflare-page-cache/ [2] https://github.com/cloudflare/worker-examples/tree/master/examples/edge-cache-html https://github.com/cloudflare/worker-examples/tree/master/ex...
- reinder 8y ago> JS blockers remove ~1/3 of your traffic stats I'd love to hear more about this – could you elaborate? Any resources you can share to back it up? Thx!
- tatersolid 8y agoBasically anyone who uses Firefox, or anyone who has uBlock, AdBlock, uMatrix, Purify, etc. the installed is invisible to JS-based analytics. They simply never load the GOogle Analytics, NewRelic, or whatever code as part of their “tracking protection”. In financial services, we see about 15% higher unique users per day when analyzing HTTP logs versus Google Analytics. In fact, I’ve heard but not verified that GA now applies a “correction factor” to their stats to account for this.
- johnxie 8y agoThanks, just signed up for the beta test mailing list. I'm interested to give it a try on Taskade. https://taskade.com https://taskade.com
- 8y ago
- mtrimpe 8y agoUnless you go for Enterprise you can only have a single worker per site making QA and staging hell. Their JavaScript environment/APIs are not standard and there’s no proper spec that I could find. The debugging environment/IDE is decent for an in-browser one but we had some horrible issues with a stale version being loaded from local storage and accidentally applied to the entire site effectively bringing us down for several minutes. On every change I also saw several error pages myself during warmup period which made me wonder how many customers were getting them. This was all ~6 months ago though so things might have improved since then. Performance wise we’re very happy with it though as it beats the Apache reverse proxy it replaces hands down.
- manigandham 8y agoThey're using the Service Worker API: https://developer.mozilla.org/en-US/docs/Web/API/Service_Worker_API https://developer.mozilla.org/en-US/docs/Web/API/Service_Wor... It's not running in a browser so they reimplemented some things but the overall API surface is the same. They also have some extra APIs for CF only features. Debugging is a problem though, but there's another project called Cloudworker that emulates a local instance: https://blog.cloudflare.com/cloudworker-a-local-cloudflare-worker-runner/ https://blog.cloudflare.com/cloudworker-a-local-cloudflare-w...
- mrkurt 8y ago(shameless, but possibly helpful plug) You can run CF worker code locally, write tests, etc using our edge app runtime: https://github.com/superfly/fly https://github.com/superfly/fly
- Elof 8y agoAlso check out: https://www.stackpath.com/products/edgeengine/ https://www.stackpath.com/products/edgeengine/