‹ BackHN Continuity

Thread

5x faster Edge Functions: V8 isolates to Firecracker MicroVMs

229 points · 106 comments · jbott

  1. Normal_gaussian · · focus · HN ↗
    I've been using SlicerVM extensively - which is Firecracker MicroVMs for the regular person (and for the irregular with their platform offering) - to run local 'edge' style workloads locally and securly. Agents, local dev CI, etc. It slotted in and replaced my proxmox vm orchestrator, and now I have secure and and fast vms on my laptop wherever I go. It also supports dockerfile style builds if you're wanting a security upgrade from containers (which, you should if you're using agents).

    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.

    1. jst1fthsdys · · focus · HN ↗
      25 USD/m to run a daemon on my own hardware. Yikes.
      1. binsquare · · focus · HN ↗
        That seems off to me as well.

        Fwiw, you can run this instead free and open source: <a href="https:&#x2F;&#x2F;github.com&#x2F;smol-machines&#x2F;smolvm" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;smol-machines&#x2F;smolvm

        Disclaimer: Am author.

        1. QGQBGdeZREunxLe · · focus · HN ↗
          Brew tap: <a href="https:&#x2F;&#x2F;github.com&#x2F;smol-machines&#x2F;homebrew-tap" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;smol-machines&#x2F;homebrew-tap
        2. Cyph0n · · focus · HN ↗
          This looks amazing! The credential injection trick is particularly cool :)
        3. chrisweekly · · focus · HN ↗
          you beat me to it (I&#x27;m singing the praises of smolmachines.com &quot;smolvm&quot; microvms all over the place)
          1. binsquare · · focus · HN ↗
            Appreciate your support!
        4. dprkh · · focus · HN ↗
          Why is this better than just using Docker?
          1. binsquare · · focus · HN ↗
            Kernel level isolation.

            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.

            1. stavros · · focus · HN ↗
              This sounds great. By the way, does &quot;kernel-level isolation&quot; mean &quot;you have to allocate a chunk of RAM to this&quot;? Or is that CPU-level?

              EDIT: Ah, looks like it means &quot;runs its own kernel&quot;, not &quot;isolates at the kernel&quot; like Docker does.

              1. binsquare · · focus · HN ↗
                yes, separate kernels + virtualized hardware via hypervisor.

                containers are built on linux primitives &amp; so shares the kernel.

                1. stavros · · focus · HN ↗
                  Excellent, thank you. This is definitely useful to me.
        5. zmmmmm · · focus · HN ↗
          amazing!

          any point of comparison with microsandbox? [0]

          [0] <a href="https:&#x2F;&#x2F;github.com&#x2F;superradcompany&#x2F;microsandbox" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;superradcompany&#x2F;microsandbox

          1. binsquare · · focus · HN ↗
            I focus on building the best VM tech.

            Good sandboxing is a feature of a good VM.

            Outside of that I support GPU and enables something called branchable computing.

        6. Normal_gaussian · · focus · HN ↗
          Smolvm with it&#x27;s libkrun vmm provides significantly worse security positioning than slicervms use of firecracker, which leads to slicervm for any dangerous or secure workload.

          <a href="https:&#x2F;&#x2F;github.com&#x2F;libkrun&#x2F;libkrun" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;libkrun&#x2F;libkrun

          1. binsquare · · focus · HN ↗
            Libkrun and firecracker had similar foundations (Rust, KVM, rust-vmm).

            Firecracker has a long track record but has a lot of knobs and tunings to get the security right.

            smolvm&#x27;s serve mode confines each VMM by default with a seccomp allowlist, Landlock, a per-VM uid and no_new_privs, much like Firecracker&#x27;s jailer.

            For dangerous workloads, people can do the same things such as skip host mounts and use virtio-net.

            It&#x27;s not a different security class just because it&#x27;s libkrun vs firecracker

        7. tomjen3 · · focus · HN ↗
          That is so effing cool — my only fear with it is whether you could turn it into a sustainable business, because I want that project to be around for a long time.
          1. binsquare · · focus · HN ↗
            I&#x27;ll keep it going just for you
      2. QGQBGdeZREunxLe · · focus · HN ↗
        I think Alex learned his lesson offering a free version running OpenFaaS.
        1. alexellisuk · · focus · HN ↗
          The world: &quot;build a secure, enterprise-ready microVM automation solution - work on it full time, and pay salaries for the staff that work on it&quot;

          Also: it has to be free.

          So yes you&#x27;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&#x27;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.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.