Urgent.News

What's breaking now, across thousands of outlets.

Tech

Surviving AWS Spot Interruptions With Real Checkpointing

๐Ÿ”ง The Problem Spot instances are 60-90% cheaper than on-demand, and the pitch is always the same: "just make your workload fault-tolerant." Great, thanks. In practice, most teams discover their batch job, training run, or queue worker isn't actually fault-tolerant until the first 3am page from a spot reclamation mid-run. The naive fix is restarting the job from scratch after interruption. For aโ€ฆ

Spot instances are significantly cheaper than on-demand options, but they come with the risk of interruption. Most teams find out their workloads are not truly fault-tolerant until it's too late. Restarting from scratch after an interruption can be costly and inefficient, especially for long-running jobs. The key to mitigating these interruptions is implementing a checkpointing pattern.

This pattern involves three components: a checkpoint writer that serializes progress to durable storage, a progress ledger to track what has been checkpointed, and an interruption watcher that triggers an emergency checkpoint upon receiving a termination notice. The interruption watcher polls AWS's metadata service, which provides a termination notice roughly two minutes before reclamation.

This gives enough time to save minimal state and exit cleanly. The checkpoint cadence should be set to balance the trade-off between minimizing I/O overhead and maximizing replay cost. A formula, checkpoint_interval โ‰ˆ sqrt(2 * checkpoint_write_cost / interruption_rate), has proven effective. For queue workers, checkpointing per message batch can be an effective alternative.

By implementing this checkpointing pattern, you can make spot interruptions a non-event, ensuring your workloads remain resilient and cost-effective.

Written by urgent.news from Dev.to's reporting โ€” not their text. Machine-written โ€” may contain errors; check the original before relying on it.

Read the original at dev.to โ†’

More in Tech

Same model, same defences: 7 document attacks down to 0, chat attacks barely moved

A prompt-injection benchmark, three bugs in my own scorer, and the result I only found after fixing them. I built RAGProbe, an open-source tool that throws prompt-injection attacks at LLM apps andโ€ฆ

  • Seven document attacks successfully blocked by layered defenses
  • Chat attacks barely increased from 37 to 40 after defenses
  • Three bugs and one incorrect claim in original attack tool fixed

Forward Watch

AI Object Detection for Recreational Boats Every skipper knows the moment: a log just under the surface, a kayak hidden in sun glare, or a small boat with no AIS crossing ahead at dusk.

  • Forward Watch monitors boat bow camera for hazards
  • Detects six object classes: ships, boats, debris, buoys, kayaks
  • Alerts skipper via Signal K, notifications, chart plotters

More from Monday 2 November โ†’