3 ms·
> CloudFlare markets its Edge Workers as running in separate "containers" — these are Node.js execution-context sandboxes. This is inaccurate: - Cloudflare Wo
by kentonv 6y ago
> CloudFlare markets its Edge Workers as running in separate "containers" — these are Node.js execution-context sandboxes.
This is inaccurate:
- Cloudflare Workers does not use Node.js at all. It is a new custom runtime build on V8.
- Cloudflare absolutely does not market Workers as using "containers", in fact we market them explicitly as not "containers": https://blog.cloudflare.com/cloud-computing-without-containers/ https://blog.cloudflare.com/cloud-computing-without-containe...
(Disclosure: I am the lead engineer for Workers.)
----
In the industry today, the term "container" refers to a hosting environment where:
- The guest is intended to be a single application, not a full operating system.
- The guest can run arbitrary native-code (usually, Linux) binaries, using the OS's standard ABI. That is, existing, off-the-shelf programs are likely to be able to run.
- The guest runs in a private "namespace" where it cannot see anything belonging to other containers. It gets its own private filesystem, private PID numbers, private network interfaces, etc.
The first point distinguishes containers from classic VMs. The latter two points distinguish them from things like isolates as used by Cloudflare Workers.
Usually, containers are implemented using Linux namespaces+cgroups+seccomp. Yes, sometimes, a lightweight virtual machine layer is wrapped around the container as well, for added security. However, these lightweight VMs are specialized for running a single Linux application (not an arbitrary OS), and generally virtualize at a higher level than a classic hardware VM.