5 ms·
I wonder if this is an independent effort or if it's built on top of AWS Lambda. Also, anyone know why all these serverless environments that are coming out fo
by pw 9y ago
I wonder if this is an independent effort or if it's built on top of AWS Lambda.
Also, anyone know why all these serverless environments that are coming out focus on Node.js?
- dested 9y agoI would guess it's related to the prevalence of javascript combined with the low barrier to entry to build javascript app and the relatively low startup time of a nodejs app.
- keithwhor 9y agoFastest growing runtime, largest module ecosystem. That's it. The goal is to encourage adoption and validate a product quickly, so you ride the biggest wave. AWS has the resources to grow teams around different languages / runtimes, smaller players (or recent IPOs) do not in the same capacity. Targeting anything other than Node would be "the largest" disservice to your customer base in the case of Twilio, and would artificially slow any other player.
- PKop 9y agoIn addition, Node seems to have beneficial performance characteristics when it comes to cold startup time, compared to say Java, which probably helps when it comes to pay-only-for-requests functions as a service that aren't always running. https://forums.aws.amazon.com/thread.jspa?messageID=679050 https://forums.aws.amazon.com/thread.jspa?messageID=679050
- derefr 9y agoMy own hypothesis is that the teams building these FaaSes wanted to choose a runtime that has a good story for internal multitenant partitionability, so that they didn't have to either just-in-time spawn, or prefork, a new (containerized) copy of the runtime for each user, with all the overhead that implies. Node.js is such an internally-partitionable runtime. (So is Lua†, but like the parent says, Node.js is bigger and more people want it.) For a visible-to-the-public-eye example of what I mean, look at how CouchDB uses Node.js for its view functions: the CouchDB daemon process spawn an unprivileged Node.js slave process, which uses Node's ability to drop or virtualize syscall-making APIs, along with Node "VM"s (https://nodejs.org/api/vm.html https://nodejs.org/api/vm.html) —essentially the same kind of isolation as you get from distinct-origin browser tabs—to allow for the execution of arbitrary Javascript by multiple tenants. That's not too far off from a FaaS already. It's a good model to copy and extend. I'm betting AWS Lambda, and Twilio's offering as well, are mostly built around such a model. Mind you, Lambda now also offers a "prefork" container-based stack for function execution, but it didn't at first, and for good reason: it's harder to build, harder to operate, and has much higher overhead than a cluster of regular processes with internal sandboxing. This is much the same reason that Heroku started with their Alpine stack—an cluster of internally-partitioned Ruby processes, and boy was that a feat—before building their container service. --- † Given that you could pretty easily multitenant-sandbox Lua evaluation... it'd be quite easy to extend OpenResty (https://openresty.org/ https://openresty.org/) into being a FaaS, wouldn't it? Anyone hacking on this?
- tonylucas 9y agoWe do exactly this with Lua inside our platform to drive workflow modules in a multitenant environment. It's not using OpenResty though (although OpenResty is very cool) We are going to be adding Node as well though, for the reasons you mention above around Ecosystem.
- idbehold 9y agoIt is built on Lambda. I just created a function and logged process.env and it's got all the same Lambda-specific environment variables.