스팟 인스턴스

컴퓨팅 연관 문항 22개

남는 용량을 최대 90% 싸게. 중단을 견디는 워크로드 전용

이게 뭔가요? / What is this?

Spot은 별도의 서버 종류가 아니라, 이미 있는 EC2 가상 서버를 "AWS가 남는 용량을 쓸 때만, 훨씬 싸게" 빌리는 구매 방식(요금제)일 뿐입니다. 비행기의 스탠바이 티켓처럼 정가보다 훨씬 싸지만, 자리(용량)가 필요해지면 짧은 통보 후 좌석을 내줘야 하는 조건이 붙습니다.

개요 / Overview

Spot 인스턴스는 AWS의 유휴 EC2 용량을 경매식으로 싸게 제공하며, 용량이 필요해지면 2분 전 경고 후 회수됩니다. "내결함성", "중단되어도 재시작 가능", "배치 처리", "가장 비용 효율적"이 함께 나오면 거의 항상 Spot이 정답입니다.

동작 원리 / How it works

Spot은 AWS가 지금 팔지 못하고 남은 EC2 용량을 대폭 할인해 내놓는 시장입니다. 온디맨드 수요가 늘어 그 용량이 필요해지면 AWS가 회수하는데, 회수 2분 전에 인스턴스 메타데이터와 EventBridge로 중단 알림이 옵니다. 따라서 Spot 워크로드의 설계 요건은 단 하나입니다 — 2분 안에 안전하게 손을 뗄 수 있어야 합니다.

실무 패턴은 작업을 큐에서 꺼내 처리하고 완료 시에만 삭제하는 구조입니다. 중단되면 가시성 제한 시간이 지나 메시지가 큐로 되돌아가고 다른 워커가 집어갑니다. 체크포인트를 S3에 주기적으로 쓰는 방식도 같은 목적입니다.

시험은 무엇을 보는가 / What the exam is testing

시험은 Spot으로 "워크로드의 성격을 읽는 능력"을 봅니다. 내결함성·무상태·재시작 가능·배치라는 단어가 깔려 있고 최저 비용을 물으면 Spot이 정답이며, 반대로 사용자 대면 트랜잭션이나 데이터베이스에 Spot을 고르면 오답입니다. 비용만 보고 고르는 함정을 피하는지가 핵심입니다.

시험 포인트 / Exam points

쓰면 안 되는 경우

상태를 유지해야 하는 데이터베이스, 중단이 곧 장애인 사용자 대면 트랜잭션, 정해진 마감이 있는 단일 실행 작업에는 부적합합니다. 이런 조건이 보이면 On-Demand나 RI로 방향을 트세요.

Spot + On-Demand 혼합

ASG의 혼합 인스턴스 정책으로 기본 용량은 On-Demand로 깔고 초과분만 Spot으로 채우면, 비용을 낮추면서도 최소 가용량을 보장할 수 있습니다. 비용과 가용성을 동시에 요구하는 문제의 정답 형태입니다.

2분 중단 경고

회수 전 인스턴스 메타데이터와 EventBridge로 중단 알림이 옵니다. 이 신호를 받아 체크포인트를 저장하거나 작업을 큐로 되돌리도록 설계해야 합니다.

자주 틀리는 함정 / Common traps

RDS나 상태를 가진 데이터 계층을 Spot EC2에 올리는 선택지 — 회수 시 데이터 손실이나 장시간 복구가 발생합니다.

마감이 정해진 단일 실행 작업에 Spot만 쓰는 것 — 용량을 확보하지 못하면 아예 시작하지 못할 수 있습니다. 기본 용량은 On-Demand로 깔고 초과분만 Spot으로 채우는 혼합 정책이 안전한 정답입니다.

📝 이 개념 문제 풀기

Spot Instances

Compute 22 related questions

Spare capacity at up to 90% off, for interruption-tolerant work

이게 뭔가요? / What is this?

Spot is not a separate kind of server — it is just a purchase option (a pricing plan) for renting the same EC2 virtual machines whenever AWS has spare capacity, at a steep discount. Like a standby airline ticket, it costs far less than full price, but comes with the condition that the seat can be reclaimed on short notice if the airline needs the capacity back.

개요 / Overview

Spot uses idle EC2 capacity at a deep discount and reclaims it with a two-minute warning. When "fault tolerant", "can be restarted", "batch", and "most cost-effective" appear together, Spot is almost always the answer.

동작 원리 / How it works

Spot is a market for EC2 capacity AWS currently cannot sell, offered at a deep discount. When On-Demand demand rises and that capacity is needed, AWS reclaims it, sending an interruption notice through instance metadata and EventBridge two minutes ahead. So Spot imposes exactly one design requirement: be able to let go safely within two minutes.

The practical pattern is pulling work from a queue and deleting the message only on completion. An interruption lets the visibility timeout expire so another worker picks the message up. Periodically checkpointing to S3 serves the same purpose.

시험은 무엇을 보는가 / What the exam is testing

Spot tests whether you can read the nature of a workload. Words like fault-tolerant, stateless, restartable, and batch combined with lowest cost make Spot correct; choosing Spot for user-facing transactions or a database is wrong. The test is whether you resist picking on price alone.

시험 포인트 / Exam points

When not to use Spot

Not for stateful databases, user-facing transactions where interruption equals outage, or single deadline-bound jobs. In those cases move to On-Demand or Reserved.

Mixing Spot and On-Demand

An ASG mixed-instances policy can put a baseline on On-Demand and burst on Spot, cutting cost while guaranteeing minimum capacity — the shape that answers questions demanding both.

Two-minute interruption notice

A reclaim notice arrives via instance metadata and EventBridge. Design the worker to checkpoint or return the job to a queue when it fires.

자주 틀리는 함정 / Common traps

Putting a database or stateful data tier on Spot — reclamation means data loss or a long recovery.

Using only Spot for a single deadline-bound job — if capacity is unavailable it may never start. A mixed policy with an On-Demand baseline and Spot on top is the safe answer.

📝 Practice this concept

AWS SAA Hub Pro는 독립 학습 자료이며 Amazon Web Services, Inc.의 공식 서비스가 아닙니다. 시험 정책과 서비스 사양은 AWS 공식 문서를 기준으로 확인하세요.