3 ms·
So Lambda & (L@Edge) is a general purpose computing system. They run a normal process in a programming language of your choice, then feed it event data, take th
by sudhirj 6y ago
So Lambda & (L@Edge) is a general purpose computing system. They run a normal process in a programming language of your choice, then feed it event data, take the response out and continue the pipeline. They might keep the process running for reuse sometimes. If your process is being reused, it’s “warm” and works as fast your code. If it’s “cold”, your process start time, Lambda finding an execution slot, downloading your code there etc all add up. Good news is that if you’re doing multi core stuff or specialized code it’ll work fine (now including special Intel AV-something instructions).
Cloudflare workers took a different approach - they run V8 node-ish processes on all their edges, and you submit your code as JS or WASM that fits their interface (which is based on the service worker standard). They then execute it as a V8 isolate, which is blazing fast because the V8 process is already up and running, it’s just running JS/WASM code, which it knows how to do pretty well. Even the cold start is pretty small, because the JS/WASM tends to be pretty small and Cloudflare knows how to cache stuff.
They’re both very different systems, but both have their uses.
- skifunkster 6y agoHave run the same size campaign on lambda and cloudflare now, so can probably speak from experience. Cloudflare definitely has a place, but is definitely nowhere near as feature rich as the AWS ecosystem. For this use case it was perfect. Lack of warm up and responsiveness on cloudflare is a strong draw. Here is my previous article on our AWS donation system. https://read.iopipe.com/the-journey-to-90-serverless-at-comic-relief-a13b9245fa3c https://read.iopipe.com/the-journey-to-90-serverless-at-comi...
- mwcampbell 6y agoIs your front-end still a React app served entirely out of static storage? If I were doing a serverless project with a web front-end, I'd look into some kind of server-side rendering, so I don't have to degrade the user experience to get the type of infrastructure I want.