Earlier quoted context omitted.
It's actually somewhat different. AWS Lambda is intended to act as your origin server. Generally your Lambda functions run in a small number of locations, not necessarily close to users. Cloudflare Workers will run in all of Cloudflare's 117 (and growing) locations. The idea is that you'd put code in a worker if you need the code to run close to the user . You might want that to improve page load speed, or to reduce…
We haven't nailed down pricing yet One of the things I like about AWS is the price doesn't jump from $0/year directly to $240/year the way cloudflare does.
Cloudflare Workers: Run JavaScript Service Workers at the Edge
31–40 of 134 posts
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#32Hey all! This is my project at Cloudflare. (You may remember me as the tech lead of Sandstorm.io and Cap'n Proto.) Happy to answer questions!
Will Cloudflare be curating a list of useful worker scripts? I imagine there will be certain usecases that get a lot of attention (e.g. ESI)
Do requests made from the API go through Cloudflare's usual pipeline, or do they go straight to the backend? In short, will we need to manage the cache ourselves?
And finally, does this change Cloudflare's role as a "dumb" intermediary?
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#33Any time you commit to someone else's API -- whether it's an actual industry standard, or simply some de facto widely used paradigm -- you incur risks; conversely, now that you're a vested participant, consider being involved in the future of the spec so it can evolve where it needs to meeting emerging needs around its new uses.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#34This is really cool...but why ?
A more granular way to block requests than what cloudflare provides (IP, BGP AS, country)
Tokenizing credit cards at the edge if you have a payment provider that supports that, and are using CF's PCI compliant environment.
Injecting a unique ID into requests for log correlation. You get collisions if you do this via browser javascript for various reasons. I'm assuming v8 has a better Math.random(), or that you would at least be able to find a workaround since it's in one stack.
I'm sure there's more.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#35Hey all! This is my project at Cloudflare. (You may remember me as the tech lead of Sandstorm.io and Cap'n Proto.) Happy to answer questions!
Congratulations on the announce - it seems like a game changer of a feature, and one I look forward to testing. Will Cloudflare be curating a list of useful worker scripts? I imagine there will be certain usecases that get a lot of attention (e.g. ESI) Do requests made from the API go through Cloudflare's usual pipeline, or do they go straight to the backend? In short, will we need to manage the cache ourselves? And…
Better than that, we plan to unify this with Cloudflare Apps, so people can publish a reusable script as an app, and other people can then "install" that app onto their site with a click.
> Do requests made from the API go through Cloudflare's usual pipeline, or do they go straight to the backend? In short, will we need to manage the cache ourselves?
The worker sits in front of the cache, so subrequests made by calling fetch() will go through the usual caching logic.
Eventually we also plan to expose the "Cache" API from standard Service Workers to allow you to manipulate the cache directly for advanced use cases, but this shouldn't be necessary for most people.
> And finally, does this change Cloudflare's role as a "dumb" intermediary?
That sounds like a policy question, which isn't my department. ;)
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#36So in a way this is similar to for example AWS Lambda ? It can process incoming http requests in many ways ? Fascinating idea. Is there any indication on price level ? And what about runtime duration ?
It's actually somewhat different. AWS Lambda is intended to act as your origin server. Generally your Lambda functions run in a small number of locations, not necessarily close to users. Cloudflare Workers will run in all of Cloudflare's 117 (and growing) locations. The idea is that you'd put code in a worker if you need the code to run close to the user . You might want that to improve page load speed, or to reduce…
To give regular end-user the rights to e.g. 'record one video of up to X seconds and Y mbps under ID "some-uuid"'
I've been waiting for a proper Content Ingestion Network for ages by now... if the CloudFlare video team ever wants to talk to someone who hand-rolled their own single-node version of this I'd be more than willing to share my experiences.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#37This is really cool...but why ?
So yeah, if you care about milliseconds :)
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#38Kudos for re-using an existing API when one was already available in the same language for a very similar usecase. Any time you commit to someone else's API -- whether it's an actual industry standard, or simply some de facto widely used paradigm -- you incur risks; conversely, now that you're a vested participant, consider being involved in the future of the spec so it can evolve where it needs to meeting emerging n…
That said, I am amazed by how well the spec fits as-is. I don't usually like other people's API designs but in this case I think they did a really good job, and I've been pleased not to have to think about API design myself.
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#39Earlier quoted context omitted.
It's actually somewhat different. AWS Lambda is intended to act as your origin server. Generally your Lambda functions run in a small number of locations, not necessarily close to users. Cloudflare Workers will run in all of Cloudflare's 117 (and growing) locations. The idea is that you'd put code in a worker if you need the code to run close to the user . You might want that to improve page load speed, or to reduce…
Can I use this together with CloudFlare streaming to open up stream ingestion based on some HMAC signed parameters? To give regular end-user the rights to e.g. 'record one video of up to X seconds and Y mbps under ID "some-uuid"' I've been waiting for a proper Content Ingestion Network for ages by now... if the CloudFlare video team ever wants to talk to someone who hand-rolled their own single-node version of this I…
Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge
#40Earlier quoted context omitted.
It's actually somewhat different. AWS Lambda is intended to act as your origin server. Generally your Lambda functions run in a small number of locations, not necessarily close to users. Cloudflare Workers will run in all of Cloudflare's 117 (and growing) locations. The idea is that you'd put code in a worker if you need the code to run close to the user . You might want that to improve page load speed, or to reduce…
We haven't nailed down pricing yet One of the things I like about AWS is the price doesn't jump from $0/year directly to $240/year the way cloudflare does.