Skip to content

Feature: Fast Snapshot Restore (FSR) warming for --attach-volume — eliminate first-touch lazy-load latency on wide fan-out #152

Open

Description

@scttfrdmn

Split out from #147 (the build→attach path is now fully shipped: spawn snapshot create --from <dir|tar|tar.gz|raw> in v0.48.0 + --attach-volume in v0.46.0). FSR is the remaining piece and is filed separately because it has a recurring real-money cost, so it needs its own design + opt-in UX review rather than riding on a shipped feature.

Problem

A volume created from a snapshot lazy-loads blocks from S3 on first access. For a single instance that's fine, but for a wide fan-out (e.g. ~100 Kraken2 tasks each creating a volume from the same k2_pluspf snapshot via --attach-volume), every volume pays first-touch latency on the reference data. That's the one gap between the data-volume path and a baked-AMI's warm local disk.

What FSR does

Fast Snapshot Restore pre-warms a snapshot in specific AZs so every volume created from it is immediately at full performance — no first-read penalty. SDK ops already available: EnableFastSnapshotRestores, DisableFastSnapshotRestores, DescribeFastSnapshotRestores (verified in the EC2 SDK).

The catch — it bills per-AZ-hour

FSR costs ~$0.75 per snapshot per AZ per hour while enabled (regardless of use). So spawn must never silently enable it — it's a paid AWS feature toggled on the user's behalf. Design must make the cost explicit and bound the enabled window.

Proposed design (for review)

  • Opt-in flag, never default:
    • spawn launch --attach-volume snap-xxx:/mnt:ro --fsr enables FSR for that snapshot in the launch AZ before creating the volume; or
    • a standalone spawn snapshot warm <snap> --azs us-east-1a,us-east-1b [--disable] so the user owns the costly window explicitly.
  • Cost confirmation in the launch/estimate flow, like the existing instance cost estimate — show $/AZ/hr and require -y to proceed.
  • Bounded window / auto-disable: a run-scoped or TTL'd disable so FSR doesn't bill indefinitely after the fan-out drains (e.g. --fsr-disable-on-drain, or the reaper disables it when the last consuming instance terminates — ties into the lifecycle invariant).
  • State enforcement: only enable when state can later be disabled; surface DescribeFastSnapshotRestores in spawn snapshot status.

Validation

  • Unit: flag/cost-confirmation parsing; enable→describe→disable round-trip (substrate models EC2 control plane — confirm it serves the FSR ops; if not, file a gap and table-test the lifecycle logic).
  • Live (paid, bounded, leak-check): enable FSR on a real snapshot in 1 AZ, confirm optimizing→enabled, launch a couple of --attach-volume instances, disable FSR, verify it's disabled (no lingering per-AZ-hour charge), terminate + leak-check. FSR left enabled is itself a cost leak — the validation must prove disable.

Cross-refs

Activity

  1. added
    enhancement
    on Jun 13, 2026
  2. added this to the Later milestone on Oct 19, 2026
  3. modified the milestones: Later, Post-1.0 on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions