- Joined
- Mar 3, 2018
- Messages
- 1,713
Containers and Virtual Machines are the foundation of the world's cloud infrastructure today, as they allow clients to isolate their environments from neighbors running on the same machine. But in a blog post, Cloudflare, one of the largest cloud providers in the world, argued that they aren't necessarily the future. Instead of walling off instances totally, Cloudflare runs their clients' JavaScript code in "isolates" that are based on one of the most popular pieces of software on Earth: Google Chrome. Chrome's V8 JavaScript engine is explicitly designed to run multiple instances of code with as little overhead as possible, and they say leveraging it has a number of advantages. All the work is done in a single process, which means no context switching is needed, and memory usage can be lowered by "an order of magnitude." Running all that code simultaneously without the isolation of a VM may seem insecure, but Cloudflare points out that Chome's JavaScript engine is "perhaps the most well security tested piece of software on earth," and that they add some security measures on top of it. Obviously, Cloudflare has an interest in pushing their own cloud instance technology, and they do tout massive economic advantages over Amazon's Lambda instances. But they're quick to point out weaknesses (namely, their implementation can only run Javascript right now), and the bigger implication seems to be that other companies could eventually move away from VMs too.
We pay the overhead of a Javascript runtime once, and then are able to run essentially limitless scripts with almost no individual overhead. Any given Isolate can start around a hundred times faster than I can get a Node process to start on my machine. Even more importantly, they consume an order of magnitude less memory than that process. They have all the lovely function-as-a-service ergonomics of getting to just write code and not worry how it runs or scales. Simultaneously, they don't use a virtual machine or a container, which means you are actually running closer to the metal than any other form of cloud computing I'm aware of. I believe it's possible with this model to get close to the economics of running code on bare metal, but in an entirely Serverless environment.
We pay the overhead of a Javascript runtime once, and then are able to run essentially limitless scripts with almost no individual overhead. Any given Isolate can start around a hundred times faster than I can get a Node process to start on my machine. Even more importantly, they consume an order of magnitude less memory than that process. They have all the lovely function-as-a-service ergonomics of getting to just write code and not worry how it runs or scales. Simultaneously, they don't use a virtual machine or a container, which means you are actually running closer to the metal than any other form of cloud computing I'm aware of. I believe it's possible with this model to get close to the economics of running code on bare metal, but in an entirely Serverless environment.