When machine boots but reply disappears

How Mainbrella saves machine starts without losing work.

Oct 7, 2026

16 cards · 2m · tap to begin

From · · 2m

When machine boots but reply disappears

How Mainbrella saves machine starts without losing work.

In brief

How Mainbrella saves machine starts without losing work. Mainbrella's system saves receipts before booting machines so retries find previous attempts without starting new ones. Originally reported by Mainbrella.

The problem

When a machine boots but the reply never reaches you, do you retry and risk starting a second machine?

We save a receipt

Mainbrella saves a receipt before booting so a retry can find the first attempt.

The slot reservation

The slot reservation

Each account gets a Cloudflare Durable Object to decide which requests get a slot and compute allowance.

Reservation before boot

The coordinator saves the reservation before asking the runtime to boot so the next request sees the slot as taken.

Idempotency key

A new key on every retry starts a new machine; keeping the key reuses the original attempt.

Atomic write

Atomic write

The reservation and receipt land in one atomic write to prevent charging without a retry to find.

Receipts last 24 hours

Receipts last twenty-four hours; if the machine stops or slot reuses, the key returns creation_no_longer_running.

Running definition

The runtime boots the selected image with sleep infinity and gives uname -a sixty seconds to succeed.

Old request meets new machine

An old request arrives with the right slot name but wrong lifetime after cancellation.

Compute reservation

A free slot doesn’t mean unlimited runtime; we reserve compute allowance up front.

Compute units

One hour reserved for a Medium machine costs ten units; five minutes used costs 0.833 units.

Hard deadlines

The machine’s hard deadline is the earliest of its plan’s session limit, paid access expiration, next month boundary, or reserved compute.

Managed execution

For longer work, create a managed execution with its own idempotency key and machine identity.

File requests

The job writes /workspace/metrics.csv; we download it through a generation-bound file request.

Save the disk

Saving a disk involves three parties: the account, runtime, and provider; none can atomically commit the other two.

The consequence

Retries find previous attempts without starting new ones; the system prevents lost work.

The key point

Mainbrella's system saves receipts before booting machines so retries find previous attempts without starting new ones.

Read the original on Mainbrella

React

Sign in to react and comment.

Comments (0)

Life is short. Keep it sweet. Respect others' opinions and be kind!

    Recommended next

    More decks on mainbrella and related topics.