Skip to content
Tech News
← Back to articles

How we run Firecracker VMs inside EC2 and start browsers in less than 1s

read original more articles
Why This Matters

This article highlights how leveraging Firecracker microVMs within EC2 instances enables cloud browsers to start in under a second, maintain strong isolation, and reduce costs significantly. This advancement is crucial for the tech industry as it demonstrates a scalable, secure, and cost-effective approach to deploying large numbers of ephemeral browsers, enhancing both user experience and operational efficiency.

Key Takeaways

Our cloud browsers need to do three things at once: start quickly, remain isolated, and be cheap. That is why we rebuilt Browser Use Cloud, so a new session starts in under a second and costs $ 0.02 per browser hour, down from $ 0.06.

This is harder than it sounds. A browser has Chromium, a filesystem, cookies, cache, proxy settings, downloads, and sometimes a logged-in customer session. If one browser can read another browser's state, it creates a security problem.

The normal answer is a virtual machine, or VM. A VM is a computer inside a computer: it gets its own CPU, memory, disk, and network devices. It is separate from everything else on its host, and if the browser breaks, leaks information, or gets attacked, the damage stays within the VM.

Normal VMs, however, are too heavy for cloud browsers. We need to create them constantly, sometimes thousands at a time, and throw them away as soon as sessions end. If each browser needs a slow, expensive VM, the product becomes slow and expensive, too.

The question for us is whether we could give every browser its own VM without making users wait or pay for it. We now do that with Firecracker, a lightweight VM system.

Every Browser Use Cloud session runs in its own, tiny VM. These VMs run on EC2, Amazon's rented cloud servers.

That is the unusual part. Firecracker is normally run on bare-metal servers, where you rent the whole physical machine. To reduce customers' cost, we run it on regular EC2, where AWS has already put your server inside a VM.

This should be slow. Nested VMs make memory and CPU operations more expensive, and Chromium takes time to start. This post is about how we made this setup fast and efficient.

But first, why did we rebuild our infrastructure?

It is difficult to be fast, isolated, and cheap all at once.

... continue reading