5x faster Edge Functions: V8 isolates to Firecracker MicroVMs
Thread
Unofficial Hacker News client; not affiliated with Y Combinator.
5x faster Edge Functions: V8 isolates to Firecracker MicroVMs
Unofficial Hacker News client; not affiliated with Y Combinator.
Normal_gaussian · · focus · HN ↗
Honestly, while I see firecracker replacing docker on the horizon I don't see firecracker replacing v8 isolates for most edge function execution. Firstly, this article's scenario is a bit unusual in that they were using someone else's isolates - so adding on a few hops; secondly isolates running JS/TS can be statically analyzed quite well, and at scale looking historically for issues and exploits, in many edge compute scenarios this is quite desirable. MicroVMs can have an awful lot more flexibility so to get the same benefit you have to really lock down what is available - the trade-offs for mid-size companies seems to benefit isolates. Obviously netlify is more than big enough and relies heavily on this that it leans in their favour.
jst1fthsdys · · focus · HN ↗
binsquare · · focus · HN ↗
Fwiw, you can run this instead free and open source: <a href="https://github.com/smol-machines/smolvm" rel="nofollow">https://github.com/smol-machines/smolvm
Disclaimer: Am author.
QGQBGdeZREunxLe · · focus · HN ↗
Cyph0n · · focus · HN ↗
chrisweekly · · focus · HN ↗
binsquare · · focus · HN ↗
dprkh · · focus · HN ↗
binsquare · · focus · HN ↗
Functionality of criu built in so you can get rewind, pause, in an accessible manner.
Embeddable (you can write JavaScript to programmatically use an isolated environment)
Native performance on multiplatform + consistent experience across platforms.
stavros · · focus · HN ↗
EDIT: Ah, looks like it means "runs its own kernel", not "isolates at the kernel" like Docker does.
binsquare · · focus · HN ↗
containers are built on linux primitives & so shares the kernel.
stavros · · focus · HN ↗
zmmmmm · · focus · HN ↗
any point of comparison with microsandbox? [0]
[0] <a href="https://github.com/superradcompany/microsandbox" rel="nofollow">https://github.com/superradcompany/microsandbox
binsquare · · focus · HN ↗
Good sandboxing is a feature of a good VM.
Outside of that I support GPU and enables something called branchable computing.
Normal_gaussian · · focus · HN ↗
<a href="https://github.com/libkrun/libkrun" rel="nofollow">https://github.com/libkrun/libkrun
binsquare · · focus · HN ↗
Firecracker has a long track record but has a lot of knobs and tunings to get the security right.
smolvm's serve mode confines each VMM by default with a seccomp allowlist, Landlock, a per-VM uid and no_new_privs, much like Firecracker's jailer.
For dangerous workloads, people can do the same things such as skip host mounts and use virtio-net.
It's not a different security class just because it's libkrun vs firecracker
tomjen3 · · focus · HN ↗
binsquare · · focus · HN ↗
QGQBGdeZREunxLe · · focus · HN ↗
alexellisuk · · focus · HN ↗
Also: it has to be free.
So yes you're right, people confuse VC backed companies, and vibe-coded pet-projects for sustainable software.
SlicerVM was started in 2022 and internal only, plenty of YouTube videos and such about it - written completely manually from our Actuated work.
There's a free trial for anyone who wants to play about on their Mac or Linux computer, the comment here is from a real user (unprompted) that knew and used free alternatives previously.
innocent_name · · focus · HN ↗
dwroberts · · focus · HN ↗
I don’t think this is going to happen because they serve different purposes. Having to boot an entire OS inside a VM is a step backwards compared to containerisation. There are definitely use cases for isolating containers by running them inside a VM (see: Kata) but it generally ‘replacing’ docker, I don’t think that is on the horizon at all
(Also: you need KVM available, you need a rootfs to boot which will be larger than a container, it has no built in support for mounts or really any kind of communication with the host unless you explicitly set up networking etc for it)
jeroenhd · · focus · HN ↗
The whole point of Firecracker over normal VM solutions is that "booting an OS" takes milliseconds.
Still, I don't think Docker is at risk of being replaced just yet because of the resource management benefits you get from sharing a kernel.
Normal_gaussian · · focus · HN ↗
There's definitely a tradeoff, but IME it's not as drastic as you first think.
dwroberts · · focus · HN ↗
troupo · · focus · HN ↗
Define "OS". A barebones OS will indeed start in microseconds. But then your app/service won't. Because it will likely need a gazillion things that a barebones OS doesn't provide. Suddenly the startup time isn't microseconds or even milliseconds.
Sadly, we never got the promise of unikernels, and everything requires the full-blown OS to run anything
jeroenhd · · focus · HN ↗
I don't have any recent measurements myself, but the startup time for a full Linux kernel using Firecracker's snapshotting feature seems to be around 30ms if you optimise calls for latency: <a href="https://dev.to/adwitiya/how-i-built-sandboxes-that-boot-in-28ms-using-firecracker-snapshots-i0k" rel="nofollow">https://dev.to/adwitiya/how-i-built-sandboxes-that-boot-in-2...
The measurements in that blog post place Firecracker above Docker in terms of startup performance. Most of that delay is probably the Docker daemon rather than Linux namespace APIs, but that's beside the point.
Huggingface places Firecracker startup time between 100-300ms while Docker is at 50-200ms, based on Kata: <a href="https://huggingface.co/blog/agentbox-master/firecracker-vs-docker-tech-boundary" rel="nofollow">https://huggingface.co/blog/agentbox-master/firecracker-vs-d...
Either way, latency is in the same ballpark of "low enough that it only matters in edge cases".
pjmlp · · focus · HN ↗
The gazillion things that the OS doesn't provide is taken care by language runtimes, which can perfectly run directly on top of type 1 hypervisors.
In similar way how some of those languages have bare metal implementations for embedded development, where the runtime takes the OS role.
Naturally on languages with thin runtimes and heavy reliance on POSIX like C and C++, this isn't as straightforward.
chrisweekly · · focus · HN ↗
These days I'm looking at microvms (esp. smolvm from smolmachines.com) by default, for anything where I'd previously have reached for docker (via colima or more recently orbstack).
spwa4 · · focus · HN ↗
If it boots faster than a container ...
Also containers don't work well with remote filesystems, or filesystems in general, because the admin always limits you.
tietjens · · focus · HN ↗