概念
Scaling and scheduling for cost
Match capacity to demand over time: scale out, schedule, hibernate, and relax availability where you can.
このレッスンはまだ翻訳されていないため、英語で表示しています。
Availability Zones
- Production
- Multi-AZ
- Non-production
- One AZ
Purchasing
- Production
- Commitment plus On-Demand
- Non-production
- On-Demand or Spot
Running hours
- Production
- Always
- Non-production
- Work hours only
Size
- Production
- Sized to load
- Non-production
- Smaller
| Compare | Production | Non-production |
|---|---|---|
| Availability Zones | Multi-AZ | One AZ |
| Purchasing | Commitment plus On-Demand | On-Demand or Spot |
| Running hours | Always | Work hours only |
| Size | Sized to load | Smaller |
Stop
- You pay for
- EBS only
- Resume
- Slow, RAM empty
Hibernate
- You pay for
- EBS and saved RAM
- Resume
- Fast, RAM restored
Terminate
- You pay for
- Nothing
- Resume
- Launch a new one
| Pause with | You pay for | Resume |
|---|---|---|
| Stop | EBS only | Slow, RAM empty |
| Hibernate | EBS and saved RAM | Fast, RAM restored |
| Terminate | Nothing | Launch a new one |
概要
Horizontal scaling adds and removes instances. It follows demand closely, has no ceiling from one machine and needs no downtime, so you pay for what you use. Vertical scaling changes the instance size. It needs a restart, has an upper limit, and leaves you paying for the big size at quiet times. Use Auto Scaling for variable load, and scheduled scaling when the pattern is known, such as scaling in every night.
概要
Non-production does not need production availability. Dev and test can run in one AZ, on smaller or Spot instances, and be stopped outside work hours. A 10-hour weekday schedule runs about 50 of 168 hours a week, roughly 70% less compute. Use Amazon EventBridge Scheduler, AWS Systems Manager or scheduled actions on an Auto Scaling group to stop and start. Instance Scheduler on AWS is an AWS solution that starts and stops EC2 and RDS instances on a schedule, chosen by tags. Production keeps Multi-AZ and committed pricing.
概要
A stopped instance costs nothing for compute, but memory is lost, and you keep paying for EBS. Hibernation saves memory (RAM) to the encrypted EBS root volume, so the instance resumes where it stopped. You pay for EBS, including the saved RAM, but not for instance hours. Use it for slow-starting applications and pre-warmed instances. It needs supported instance types, and an instance can stay hibernated for up to 60 days.
覚えること
- Horizontal: Auto Scaling, no downtime, no ceiling. Vertical: a restart and a size limit.
- Scheduled scaling for known patterns. Target tracking for the rest.
- Non-production: one AZ, smaller, Spot, stopped at night and at weekends.
- Stop: pay for EBS only, RAM lost. Hibernate: RAM saved to EBS, fast resume.
覚えること
- Hibernation needs an encrypted EBS root volume. Up to 60 days.
- Production keeps Multi-AZ. Match availability to the class of workload.
試験では
- “Dev instances sit idle at night, cut cost” points to a stop and start schedule, for example Instance Scheduler on AWS.
- “Application takes long to warm up memory, resume fast, pay little while paused” points to EC2 hibernation.
- “Non-critical workload, lowest cost” points to a single AZ and Spot, not Multi-AZ.
- “Traffic peaks at the same time every day” points to scheduled scaling.
混同しやすいもの
- Horizontal vs vertical scalingScale out for capacity and availability, scale up for a quick fix, and scale each tier on its own metric.
AWS Auto ScalingPick the scaling policy and metric, set warm-up, and know warm pools, lifecycle hooks and launch templates.
- Spot designDesign for interruption: stateless, checkpointed, and spread across many instance types.
このタスクの内容 · 4.2
- Purchasing options compared
- Reserved Instances in depth
- Savings Plans in depth
- Spot design
- Dedicated Hosts and tenancy
- Rightsizing
Compute Optimizer
- Scaling and scheduling for cost
- EC2, Lambda and Fargate cost
Organizations
- Horizontal vs vertical scaling
Load Balancing
- Regions and AZs as the HA building block
- Picking compute by workload
- Instance families and sizing
Lambda
Fargate
Outposts
- Hybrid and edge compute options
NLB and GWLB
- Placing resources
- Cost allocation tags
Cost Explorer
Budgets
Cost and Usage Reports
- Multi-account billing
Auto Scaling