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.