Project hosts

Spot recovery strategy for project hosts

Recover interrupted workloads, identify the active machine and pricing, and prepare for a return from fallback to spot.

Recover work after a spot interruption

A cloud provider can reclaim a spot host at any time. CoCalc can restore host capacity; an interrupted analysis, training run, or agent task still needs to resume from saved work. Keep checkpoints and required results in project files or separately retained storage. Shared scratch is not included in project backups.

Spot recovery is active only with spot pricing and Interruption restore set to Restore immediately. Open Spot Recovery Strategy in the host settings. Its diagram shows recovery states; the settings below it control behavior and are saved with the host form.

Retry spot first

CoCalc first tries the configured spot machine type. These settings control when recovery advances to fallback:

Check which machine is running

On site-funded GCP hosts, recovery can try alternate spot machine types before standard capacity. These automatic machine-type alternatives are not used for pay-as-you-go hosts. Provider availability, compatible hardware and quota still limit which machine can start.

Host details show when the active machine differs from the configured one: Running … instead of … on Spot, or on Standard pricing. A recovery phase of idle can still mean an alternate spot machine is running. Check the active machine, available memory and required software before resuming a workload; a configured machine type alone does not establish current capacity or equivalent performance.

Standard fallback

With Allow standard fallback enabled, CoCalc can use a standard on-demand VM after spot attempts fail. The host remains configured for spot while its effective pricing is standard. The fallback indicator explains the current standard rate and the spot rate when restored.

Returning to the configured spot machine

Returning from standard capacity or an alternate spot machine restarts the host. After the required hold and a successful probe, CoCalc can defer that restart while projects are active. It prefers a quiet period or the region's overnight window, but can also return when the configured fallback runtime cap is reached. That cap is not a deadline by which spot capacity is guaranteed.

Save checkpoints before a planned return as well as before an interruption. After recovery, check both host readiness and the workload's saved results; restoring a host does not restore a process's in-memory state. See Project host lifecycle actions for status checks.

Agent notes

Report configured and active machine types, desired and effective pricing, and recovery phase separately. Resume from verified saved work rather than assuming a completed infrastructure operation means the computation finished. Standard hosts avoid spot reclamation, but can still stop for maintenance, billing or other failures.