概念 · 基于 SAA-C03
Auto scaling endpoints and choosing metrics
Application Auto Scaling for SageMaker AI endpoints: pick the metric that tracks load.
本课尚未翻译,暂以英文显示。
你在Solutions Architect Associate中已学过
- Target tracking holds a metric near a target, and scheduled scaling covers known peaks.
- Choose the metric that matches the bottleneck, and set minimum and maximum sizes.
- 1The endpoint publishes a metric to CloudWatch.
- 2The policy compares it with the target and changes capacity within the minimum and maximum.
- 3The new capacity changes the metric, and the loop repeats.
Real-time
- Scale on
- Invocations per instance, or CPU, GPU or memory
- Note
- Test to find the target
Inference component
- Scale on
- Concurrent requests per copy
- Note
- Updated every 10 seconds
Asynchronous
- Scale on
- Backlog per instance
- Note
- Can reach zero instances
Serverless
- Scale on
- Provisioned concurrency
- Note
- By target or schedule
| Endpoint type | Scale on | Note |
|---|---|---|
| Real-time | Invocations per instance, or CPU, GPU or memory | Test to find the target |
| Inference component | Concurrent requests per copy | Updated every 10 seconds |
| Asynchronous | Backlog per instance | Can reach zero instances |
| Serverless | Provisioned concurrency | By target or schedule |
1 / 2
Real-time
- Scale on
- Invocations per instance, or CPU, GPU or memory
- Note
- Test to find the target
Inference component
- Scale on
- Concurrent requests per copy
- Note
- Updated every 10 seconds
Asynchronous
- Scale on
- Backlog per instance
- Note
- Can reach zero instances
| Endpoint type | Scale on | Note |
|---|---|---|
| Real-time | Invocations per instance, or CPU, GPU or memory | Test to find the target |
| Inference component | Concurrent requests per copy | Updated every 10 seconds |
| Asynchronous | Backlog per instance | Can reach zero instances |
2 / 2
Serverless
- Scale on
- Provisioned concurrency
- Note
- By target or schedule
| Endpoint type | Scale on | Note |
|---|---|---|
| Serverless | Provisioned concurrency | By target or schedule |
是什么
Endpoint scaling uses Application Auto Scaling. You register the variant as a scalable target with a minimum and maximum capacity, then attach a policy. Target tracking is the usual choice. For a real-time variant the predefined metric is SageMakerVariantInvocationsPerInstance, the average invocations per instance per minute. Load test to find what one instance can take, then set the target below it. A custom metric such as CPU, GPU or memory utilization works if it changes in proportion to capacity. A policy can set a scale-out cooldown and a scale-in cooldown. A long scale-in cooldown avoids flapping.
是什么
High-resolution metrics react faster. ConcurrentRequestsPerModel, and ConcurrentRequestsPerCopy for inference components, are published every 10 seconds instead of every minute. They count requests in flight, including queued ones, and for streaming models until the last token. They suit LLMs where one request runs long. Scheduled scaling adds capacity before a known peak.
是什么
Other endpoint types use other signals. An asynchronous endpoint scales on ApproximateBacklogSizePerInstance, the queue backlog per instance, and can reach zero instances. A step policy on the HasBacklogWithoutCapacity metric brings it back from zero. A serverless endpoint has no instances, so scaling means adjusting provisioned concurrency, by target or schedule.
要记住
- Register a scalable target with a minimum and maximum, then add a policy.
- Real-time: SageMakerVariantInvocationsPerInstance, or a custom metric that tracks capacity.
- LLMs: concurrent requests per model or per copy, updated every 10 seconds.
- Async: backlog per instance. It can scale to zero.
要记住
- Serverless: scale provisioned concurrency by target or schedule.
- Scale-out and scale-in cooldowns slow reactions on purpose.
考试中
- “Keep each instance near a set number of requests a minute” points to a target tracking policy on invocations per instance.
- “LLM endpoint scales too slowly” points to concurrent-request metrics, which update every 10 seconds.
- “A queue of async requests builds up” points to scaling on backlog per instance.
- “Traffic peaks at 9 AM every weekday” points to scheduled scaling.
本任务内容 · 3.2
- Provisioned vs on-demand resources
- IaC for ML: CloudFormation, CDK and Service Catalog
- Containers for ML: images, ECR and own containers
- ECS, EKS and Batch for ML workloads
- SageMaker endpoints in a VPC
- Auto scaling endpoints and choosing metrics
- Scaling GPU and LLM workloads
Knowledge Bases
- Retrieval pipelines
- Agent state and memory management
- Agentic workflow infrastructure