✦ Sprites 2 Docs

Durable and Ephemeral Disks

Keep state on durable disks that checkpoint and fork, or use cheaper ephemeral disks that reset on every cold start.

On this page

What it is

Every Sprite has one root disk, and you choose its kind when you create the Sprite:

Durable (default)Ephemeral
Survives stops, restarts, host moves✅ YesOnly warm stops
Checkpoint / restore / fork✅ Yes❌ No
Default size100 GB20 GB
Maximum size1024 GB100 GB
StorageDurable storageFast storage local to the host (~250 MB/s or more sequential writes)
CostStandardLower
Best forState that mattersScratch, builds, throwaway jobs

Why it matters: use durable disks where state matters, and cheaper scratch space for temporary work. You can also prepare state on a durable Sprite and fork it into an ephemeral Sprite that resets to that prepared state every time.

Durable disks

Durable is the default. You don’t need to do anything:

ssh my-org@sprites.dev sprite create api

Optionally set a size (up to 1024 GB, no smaller than the image):

curl -sS -X POST "https://api.sprites.dev/v1/sprites" \
  -H "Authorization: Bearer $SPRITES_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"api","config":{"max_disk_gb":200}}'

Everything you write is kept across warm stops, cold stops, idle sleep and moves between hosts, and you can checkpoint and fork it.

Ephemeral disks

An ephemeral disk uses fast storage local to the host, with roughly 250 megabytes per second (about 2 Gbit/s) or more of sustained sequential write throughput. In our tests it was several times faster than a durable disk when writing real (non-zero) data. It’s rebuilt from the image at every cold start: its writes stay on the host running it and are never saved, so the data disappears when the Sprite is turned off.

The Sprite itself isn’t deleted. It keeps its name, config, services, secrets and URL. Only its disk starts over.

Step by step: a scratch Sprite

1. Create it

ssh my-org@sprites.dev sprite create scratch --ephemeral-disk
# HTTP API
curl -sS -X POST "https://api.sprites.dev/v1/sprites" \
  -H "Authorization: Bearer $SPRITES_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"scratch","config":{"ephemeral_disk":true}}'

With a custom size (up to 100 GB):

ssh my-org@sprites.dev sprite create scratch --ephemeral-disk --max-disk-gb 50

2. Use it

ssh my-org@sprites.dev sprite exec scratch 'echo hello > /tmp/note && cat /tmp/note'

3. Understand when it resets

EventDisk
Warm stop (including normal idle sleep)Kept
Cold stop (sprite stop --cold)Rebuilt
Idle eviction from warm to coldRebuilt
Host release or platform re-homeRebuilt
Watch out

Because a warm Sprite can go cold whenever the host needs capacity, never rely on ephemeral data surviving. Write anything you need to keep somewhere durable.

4. Reset it on purpose

A cold stop gives you a fresh disk on the next start:

ssh my-org@sprites.dev sprite stop scratch --cold

Step by step: prepared state on an ephemeral disk

This is the powerful combination: do the expensive setup once on a durable Sprite, then fork it into ephemeral Sprites that reset to the prepared state instead of the bare image.

1. Prepare a durable Sprite

ssh my-org@sprites.dev sprite create builder
ssh my-org@sprites.dev sprite exec builder --timeout-ms 600000 \
  'git clone https://github.com/acme/app.git && cd app && npm ci'

2. Checkpoint it

ssh my-org@sprites.dev checkpoint builder deps-ready

3. Fork it with an ephemeral disk

ssh my-org@sprites.dev fork builder deps-ready ci-runner --ephemeral-disk
# HTTP API
curl -sS -X POST "https://api.sprites.dev/v1/sprites/builder/fork" \
  -H "Authorization: Bearer $SPRITES_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":"deps-ready","new_sprite_name":"ci-runner","ephemeral_disk":true}'

4. Use it, and let it reset

Run your jobs in ci-runner. Every cold start rebuilds its disk from deps-ready, with dependencies already installed and none of the previous run’s leftovers.

Pinned checkpoints

While an ephemeral fork exists, its checkpoint is pinned:

  • Retention keeps it.
  • Deleting it fails with checkpoint_pinned (HTTP 409).
  • It outlives the deletion of the Sprite it came from.

Deleting the ephemeral fork releases the checkpoint.

The fork’s disk is the source’s size, so the source’s max_disk_gb must be 100 or less. A larger source fails with invalid_config. Since the default durable disk is 100 GB, a default Sprite qualifies.

Limits and rules

  • The disk kind and size are fixed at creation. Changing them fails with ephemeral_disk_immutable or disk_size_immutable.
  • Ephemeral Sprites can’t be checkpointed, restored or forked; these fail with ephemeral_disk (409), and the checkpoint list is empty.
  • A cluster containing an ephemeral Sprite can’t be cluster-forked.
  • An SBD-runtime Sprite can’t be the source of an ephemeral fork.