Hi folks! This is my project at Cloudflare -- which, entirely by coincidence, I joined exactly one year ago today: item?id=13860027
Happy to answer any questions.
> Due to the immense amount of work that has gone into optimizing V8, it outperforms just about any popular server programming language with the possible exceptions of C/C++, Rust, and Go.
Odd statement and it’s not true.
As a matter of fact the JVM beats the shit out of V8 in everything but startup time.
And this is not an educated guess, I have the same code, some cross-compiled via a compiler that can target both (plenty of such compilers these days, including Scala, Clojure and Kotlin) and some code hand optimized for each specific platform and the difference is huge in both cases. And let’s be clear, this is not code that handles numeric calculations, for which JS would be at a big disadvantage.
Imagine that I’m not running the same unit tests, for JS I have to do much less interations in property based testing, because Travis-ci chokes on the JS tests. So it’s a constant pain that I feel weekly.
And actually anybody that ever worked with both can attest to that. The performance of V8 is rather poor, except for startup time where the situation is reversed, V8 being amongst the best and the JVM amongst the worst if startup time matters.
$0.50/million requests, but it’s a minimum of $5/month (giving you 10million requests essentially.)
Not a criticism, this it looks like an excellent product for those who can benefit from it, just calling it out for others that read the comments here before the original content.
Looks like a little bit cheaper than AWS Lambda@Edge which is $0.6/mln, but more than regular AWS Lambda $0.2/mln. On Lambda you pay extra for resources, but you can get more RAM or CPU there (e.g. running Chrome Headless is an option there).
On the other hand CloudFlare Workers looks more distributed, but suitable just for 50ms CPU time, 15s wall time and 128 MB. This is enough for redirects, A/B testing, but often not enough for writing serverless applications or any kind of rendering.
I wonder whether CloudFlare wants to get into serverless business and this is first iteration or if it's just a CDN which is more customisable by allowing code to run there.
And they typically run in under 1ms and global deploys take less than 30s and it's native V8.
Wasn't running code on edge nodes how Cloudflare man in the middle attacked millions of encrypted websites for a year?
What I find missing here and in aws lambda or google function is the notion of "state".
I believe it would really be a game changer if we could open and maintain an open connection with a database.
FWIW kentonv posting in this thread, who did this project, is the guy who invented protocol buffers :o
Not really into this space. What would be some usecases for this? Call an api, do a thing? Or more like, process some data and post the results?
Exciting times! Seems it's all about making a product that sells the features of serverless in the right way. Technically I would like websockets on these platforms, but I don't know how to sell that as a feature.
These numbers 50 ms of compute time and 15 s idle are interesting in the serverless space. Now I'm waiting for sane performance suites to figure out what suites you, I'm guessin this solution will kill in these strange latency test for AWS lambda from the other day: item?id=16542286
Do those workers have to complete a captcha ?
Will you be able to share how you sandbox these scripts?
How does this compare with running AWS Lambda's on CloudFront?
Looks very nice! Is the minimum cost ($5/m) per site or per account?
Can a Cloudflare app install a worker into a Cloudflare customer’s zone?
Now this is indeed quite interesting.
Though 0.50 per million is only true if you have more than 10 million requests per month, otherwise the price will be higher since there is 5$ minimum.
In what case should this be preferred over plain old Service Workers running on the user's browser? Latter is even lower latency and for free.
this looks like something that could be used to host an entire web app (sans database). Pretty cool!
Is it possible to just change/rewrite the request origin like on AWS Edge?
Can the playground show the resource limits info?
Before using a Cloudflare product, please consider if you want to contribute to the Internet's largest man-in-the-middle attack. They have a poor track record when it comes to security, privacy, and censorship. We're at the point where it's our responsibility to protect the Internet and keep these companies in check. Cloudflare is among the worst existential threats to the Internet.
Would it be possible to have the worker cache api results from the origin and serve those from the edge? Would the best way be programmatically updating the worker code, or caching it via global memory?