Live data from Hacker News

Cloudflare Workers: Run JavaScript Service Workers at the Edge

blog.cloudflare.com

11–20 of 134 posts

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#11
post #10
post #7

So 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…

So, more like https://aws.amazon.com/lambda/edge/ ?

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#12
post #10
post #7

So 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…

[deleted]

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#13
post #2

Hey 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 there be any limits on memory/execution time etc like with AWS Lambda?

Yes. Currently you get at most 50ms CPU time per request, and memory usage of your Javascript VM is limited to 128MB. These numbers may change before launch.

In practice, though, a typical script probably uses much less than 1ms of CPU time per request and probably needs only a couple megs of RAM. Because we're applying limits on the level of a V8 Isolate, not on an OS process, the limits go a lot further.

Keep in mind that Cloudflare Workers are not intended to be a place where you do "bulk compute", but rather where you run little bits of code that benefit from being close to users.

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#14
post #11
post #10

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…

So, more like https://aws.amazon.com/lambda/edge/ ?

That is correct. However, the design is very different. Lambda@Edge is, from what I can tell, based on running a full Node.js process in a process-level sandbox for each customer, whereas we are embedding V8 directly.

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#15
post #2

Hey 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!

Would Cloudflare endorse VPN services over Service Workers? Sounds like a great option to help people in censored country.

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#16
post #2

Hey 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!

Are you able to talk about the pricing structure? Is this going to be per request, total cpu time, etc?

edit. In another reply you said that pricing hasn't been finalised which is understandable. We've got a few use cases which CF Workers would be ideal for but we'd be looking at 10-15k requests per minutes which could get expensive if pricing is per request.

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#17
post #15
post #2

Hey 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!

Would Cloudflare endorse VPN services over Service Workers? Sounds like a great option to help people in censored country.

Policy is not my department, but technically speaking... I think a VPN service would probably be more effective running on AWS or Digital Ocean or whatnot.

Re: Cloudflare Workers: Run JavaScript Service Workers at the Edge

#18
post #2

Hey 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!

Are you able to talk about the pricing structure? Is this going to be per request, total cpu time, etc? edit. In another reply you said that pricing hasn't been finalised which is understandable. We've got a few use cases which CF Workers would be ideal for but we'd be looking at 10-15k requests per minutes which could get expensive if pricing is per request.

We are taking input on what the use cases are in order to come up with a pricing model that makes sense. Definitely reach out with what you're trying to do and we'll take it into account as we're designing how it's priced.
Post reply on HN