ladderlore
请求新指南
  • 输入服务名称,例如 S3 或 IAM。

概念 · 基于 CLF-C02

Spot design

Design for interruption: stateless, checkpointed, and spread across many instance types.

本课尚未翻译,暂以英文显示。

你在云从业者中已学过

  • Spot is spare EC2 capacity at up to 90% off.
  • AWS can take it back.
  • It suits flexible, fault-tolerant work.
阅读云从业者课程
Spot instance
Two-minute notice
Save progress
Replacement starts
  1. 1AWS signals the instance two minutes before it takes it back.
  2. 2The app saves its state to S3 or a queue.
  3. 3The fleet starts a new instance and the work resumes.
What happens when Spot capacity is reclaimed.

分步说明

  1. 1AWS signals the instance two minutes before it takes it back.
  2. 2The app saves its state to S3 or a queue.
  3. 3The fleet starts a new instance and the work resumes.

What happens when Spot capacity is reclaimed.

  • Price capacity optimized

    Picks
    Low price, deep capacity
    Use
    Default choice
  • Capacity optimized

    Picks
    Deepest capacity
    Use
    Costly interruptions
  • Lowest price

    Picks
    Cheapest pool
    Use
    More interruptions
Allocation strategies for Spot Fleet and Auto Scaling.

是什么

AWS gives a two-minute interruption notice through instance metadata and an Amazon EventBridge event. An earlier rebalance recommendation signals that an instance is at higher risk. Use both to save progress, drain connections and stop cleanly.

是什么

Keep the app stateless, or checkpoint to Amazon S3, Amazon EBS or a queue. Split work into small jobs that can be retried. Use many instance types and AZs, so one price spike or capacity shortage does not empty the fleet. A Spot Fleet or EC2 Fleet launches the pool. The recommended allocation strategy is price-capacity-optimized: it picks pools with deep spare capacity at a low price. An Auto Scaling group with a mixed instances policy keeps an On-Demand base and fills the rest with Spot.

是什么

Spot fits AWS Batch, Amazon EMR, worker nodes of Amazon ECS and Amazon EKS, Fargate Spot, CI and rendering. It does not fit databases or long single jobs that cannot restart.

要记住

  • Two-minute interruption notice. A rebalance recommendation can come earlier.
  • Stateless or checkpointed work only. Save to S3, EBS or a queue.
  • Diversify: many instance types and AZs.
  • Allocation strategy: price-capacity-optimized is the usual choice.
  • Mixed instances Auto Scaling group: On-Demand base plus Spot.

要记住

  • Works with AWS Batch, EMR, ECS and EKS.

考试中

  • “Interruptible batch processing, lowest cost” points to Spot Instances.
  • “Spot workers must not lose work when reclaimed” points to a queue or checkpoints, plus handling the two-minute notice.
  • “Keep a minimum on-demand capacity and add cheap capacity above it” points to a mixed instances Auto Scaling group.