<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Firecracker on ICE-ICE-BEAR-BLOG</title><link>https://ice-ice-bear.github.io/tags/firecracker/</link><description>Recent content in Firecracker on ICE-ICE-BEAR-BLOG</description><generator>Hugo -- gohugo.io</generator><language>en</language><lastBuildDate>Thu, 07 May 2026 00:00:00 +0900</lastBuildDate><atom:link href="https://ice-ice-bear.github.io/tags/firecracker/index.xml" rel="self" type="application/rss+xml"/><item><title>Why Fly.io's Machines Are Actually the Building Block for Everything</title><link>https://ice-ice-bear.github.io/posts/2026-05-07-fly-io-machines-primitive/</link><pubDate>Thu, 07 May 2026 00:00:00 +0900</pubDate><guid>https://ice-ice-bear.github.io/posts/2026-05-07-fly-io-machines-primitive/</guid><description>&lt;img src="https://ice-ice-bear.github.io/" alt="Featured image of post Why Fly.io's Machines Are Actually the Building Block for Everything" /&gt;&lt;h2 id="overview"&gt;Overview
&lt;/h2&gt;&lt;p&gt;I watched two short videos from the official Fly.io channel — &lt;a class="link" href="https://www.youtube.com/watch?v=O6KpRcJzTxs" target="_blank" rel="noopener"
 &gt;What is Fly.io, anyway?&lt;/a&gt; and &lt;a class="link" href="https://www.youtube.com/watch?v=VOZO7CfwPII" target="_blank" rel="noopener"
 &gt;Fly Launch — How Fly.io uses Machines as a building block for everything&lt;/a&gt;. I&amp;rsquo;d heard &amp;ldquo;Machines are the building block&amp;rdquo; repeated many times while running popcon on Fly, and these videos finally pin down what that phrase means concretely.&lt;/p&gt;
&lt;pre class="mermaid" style="visibility:hidden"&gt;graph TD
 User["Your Docker image"] --&gt; FCTL["fly CTL (fat client) &amp;lt;br/&amp;gt; fly launch / fly deploy"]
 FCTL --&gt; MachinesAPI["Machines API &amp;lt;br/&amp;gt; (HTTP, anyone can call)"]
 MachinesAPI --&gt; Firecracker["Firecracker microVM &amp;lt;br/&amp;gt; (same tech as AWS Lambda)"]
 Firecracker --&gt; Region["Deployed across regions &amp;lt;br/&amp;gt; BPF + DNS routing"]
 Region --&gt; WireGuard["WireGuard private network &amp;lt;br/&amp;gt; + IPv6 single fabric"]&lt;/pre&gt;&lt;p&gt;In short: Fly.io converts Docker images into Firecracker microVMs (the same isolation tech as AWS Lambda), runs them across regions worldwide, and stitches them into a single private IPv6 network. The API that creates these machines is exposed to ordinary users — Fly&amp;rsquo;s CLI is a fat client that calls the same API any user can.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="firecracker-microvm--same-isolation-tech-as-aws-lambda"&gt;Firecracker microVM — same isolation tech as AWS Lambda
&lt;/h2&gt;&lt;p&gt;The line in the videos that made me re-listen.&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;Fly is a service that takes Docker images or OCI-compatible images and converts them to real virtual machines — microVMs — and runs them on &lt;strong&gt;Firecracker, which is the same technology that runs AWS Lambda.&lt;/strong&gt;&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;Two implications at once.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Real VMs, not containers.&lt;/strong&gt; Not &lt;code&gt;cgroups&lt;/code&gt; isolation but KVM-based microVMs. Strong security boundary, no shared kernel with other tenants.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Lambda-class boot speed.&lt;/strong&gt; Firecracker microVMs boot in well under a second. Container-class lightness with VM-class isolation.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Fly&amp;rsquo;s reasons for adopting it are obvious. To accept arbitrary user Docker images and run them across regions, you cannot relax isolation. One container escape and you&amp;rsquo;re peering at another tenant on the same host. Firecracker exists for this threat model.&lt;/p&gt;
&lt;p&gt;A side benefit: the same image moves between EC2, Lambda, and a Fly Machine with effectively the same isolation model. Memory footprint and boot time scale proportionally.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="a-single-private-network-across-regions--wireguard--ipv6"&gt;A single private network across regions — WireGuard + IPv6
&lt;/h2&gt;&lt;p&gt;The second claim:&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;All of your virtual machines around the world, no matter what region they are in, are in the same private network thanks to a WireGuard private network and IPv6.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;The point: &lt;strong&gt;you don&amp;rsquo;t have to shard your app logic by region.&lt;/strong&gt; The usual multi-region setup involves per-region endpoints and explicit cross-region replication. Fly puts every machine onto the same IPv6 &lt;code&gt;/64&lt;/code&gt; over WireGuard, so cross-region calls are just internal IPv6 calls.&lt;/p&gt;
&lt;p&gt;In &lt;a class="link" href="https://ice-ice-bear.github.io/posts/2026-05-07-popcon-dev11/" &gt;popcon dev #11&lt;/a&gt; I decided to keep one warm fly frontend machine. This model made it cheap to do — there&amp;rsquo;s a frontend machine in NRT and the GPU worker lives on RunPod. Fly&amp;rsquo;s network connects everything fly-side cleanly, no extra routing.&lt;/p&gt;
&lt;p&gt;Routing is BPF + DNS. With an Anycast IP, user requests automatically route to the nearest machine in the nearest region. From the user&amp;rsquo;s side, one IP. From Fly&amp;rsquo;s side, the closest machine wins.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="why-fly-ctl-is-a-fat-client"&gt;Why fly CTL is a fat client
&lt;/h2&gt;&lt;p&gt;The core message of video #2.&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;fly CTL is a fat client — it&amp;rsquo;s not a thin client wrapping around API calls to the server of fly.io. It is actually a fat client where it does a lot of the work to use fly&amp;rsquo;s API.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;What that means in practice:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;fly launch&lt;/code&gt; auto-detects/generates a Dockerfile, allocates an IP, issues an SSL certificate, generates &lt;code&gt;fly.toml&lt;/code&gt;, etc. — &lt;strong&gt;multiple API calls orchestrated client-side.&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;You could do all of that yourself by calling the Machines API directly — &lt;code&gt;fly launch&lt;/code&gt; is a convenience wrapper.&lt;/li&gt;
&lt;li&gt;Deploy strategies (blue/green, rolling, canary) are orchestrated by the client too — it sequences health checks and machine replacements.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Practical takeaway: &lt;strong&gt;if the CLI doesn&amp;rsquo;t do something, the Machines API will.&lt;/strong&gt; When I wrote popcon&amp;rsquo;s &lt;code&gt;sync-pod-id&lt;/code&gt; script (sync RunPod IDs into fly secrets), this model was already in play — fly CTL doesn&amp;rsquo;t ship that, so I called the API directly.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;fly machine status &amp;lt;id&amp;gt; --json&lt;/code&gt; shows per-machine metadata. Fly-CTL-created machines carry deploy version and version-label metadata, so you can tell whether a given machine was created by fly CTL or by direct API calls.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="flytoml-and-nomad-relics"&gt;fly.toml and Nomad relics
&lt;/h2&gt;&lt;p&gt;A detail mentioned in passing:&lt;/p&gt;

 &lt;blockquote&gt;
 &lt;p&gt;Machines platform — which is not to be confused with the older platform called Nomad that used to run on HashiCorp Nomad. That was the scheduler used. Now we have our own thing going on, we call that the machines platform.&lt;/p&gt;

 &lt;/blockquote&gt;
&lt;p&gt;Fly&amp;rsquo;s earlier architecture used HashiCorp Nomad as scheduler. From v2 it switched to its own Machines platform. Sections like &lt;code&gt;[experimental]&lt;/code&gt; you sometimes see in &lt;code&gt;fly.toml&lt;/code&gt; are likely compatibility relics from the Nomad era.&lt;/p&gt;
&lt;p&gt;This change reads well in retrospect. Nomad is a general-purpose scheduler — it can&amp;rsquo;t natively express the specifics of microVM workloads (fast cold start, image push, region affinity). The custom Machines platform makes all of those first-class.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="insights"&gt;Insights
&lt;/h2&gt;&lt;p&gt;&amp;ldquo;Machines are the building block&amp;rdquo; sounds like marketing copy, but after the videos it parses two ways concretely:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;fly launch&lt;/code&gt; is just another Machines API client.&lt;/strong&gt; Every abstraction Fly exposes sits on the same API, and you can call that same API directly to build new abstractions. Want a custom deploy orchestrator? It&amp;rsquo;s writable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Strong isolation is what makes multi-tenant pricing possible.&lt;/strong&gt; Because hosts run microVMs rather than containers, untrusted user images run safely on shared hardware.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;popcon uses a Fly + RunPod hybrid. Fly handles the reliable stateful side (API, frontend, DB, R2 client). RunPod handles GPU-heavy workers. The fact that traffic between the two clusters flows over Fly&amp;rsquo;s IPv6 private network is a real operational win.&lt;/p&gt;
&lt;p&gt;Next up to dig into: how Anycast actually works (how BPF picks routes), examples of teams calling the Machines API directly to build custom deployers, and Fly&amp;rsquo;s region pricing.&lt;/p&gt;</description></item></channel></rss>