Lesson 4 of 7 Cost and Capacity Optimization

Balancing Capacity, Performance and Reliability

This lesson explains capacity decisions that balance enough performance at peak, high availability and no money wasted on idle resources.

Learning outcomes

After completing this lesson, you will be able to:

  • Run endpoints across Availability Zones for reliability.
  • Size capacity from load tests and scale ahead of known peaks.
  • Remove idle capacity.

Reliability

A production real-time endpoint should run at least two instances; SageMaker AI spreads instances across Availability Zones, so one zone's failure does not take the endpoint down. Endpoints in a VPC need subnets in several Availability Zones. For Bedrock, cross-Region inference profiles spread requests across Regions to absorb capacity limits, and applications should retry throttled requests with exponential backoff. Critical systems can keep a fallback model or a cached response path.

The following diagram shows the preparations for a two-day product launch on a timeline.

Preparing for the two-day launch. Quota increases for the endpoint's instance type and for Bedrock tokens per minute are requested two weeks ahead; scheduled scaling raises the endpoint's minimum capacity from 2 to 6 instances for the event days, with target tracking above that; the assistant uses a cross-Region inference profile with retries; and minimum capacity returns to 2 afterwards.
The timeline is schematic.
True or false

Reliable endpoints

Exam skills 4.2.4

Check how endpoint capacity affects reliability.

Log in to try this activity Interactive activities are free with an account.

Performance

Size capacity from load tests rather than guesses, set auto scaling targets with headroom, pre-warm before known peaks with scheduled scaling, and keep minimum capacity high enough for the first minutes of a burst while new instances start. Check service quotas, such as instances per endpoint and Bedrock tokens per minute, well before launches and request increases.

Cost

Idle capacity is the largest source of avoidable cost in machine learning inference. Endpoints can be scaled in at night and at weekends when traffic falls. Intermittent workloads can use serverless or asynchronous endpoints that scale to zero. Small models can be consolidated onto shared infrastructure with multi-model endpoints or inference components, instead of each having its own instances. Endpoints that are no longer used should be deleted, because they are billed for as long as they exist. The following table summarises the balance between cost, performance and reliability.

GoalTechnique
AvailabilityTwo or more instances across AZs; cross-Region inference; retries
Peak performanceLoad-tested scaling targets, scheduled pre-warming, adequate minimum capacity
Headroom for launchesService quota increases in advance
No idle costScale to zero, serverless, consolidation, clean-up
Scenario questions

Balance the three

Exam skills 4.2.4

Balance cost against performance and reliability.

Log in to try this activity Interactive activities are free with an account.
Worked example

A product launch

An e-commerce company expects traffic to a recommendation endpoint and a Bedrock-powered assistant to triple during a two-day launch event.

  • Request a quota increase for the endpoint's instance type and for Bedrock tokens per minute two weeks ahead.
  • Schedule the endpoint's minimum capacity from 2 to 6 instances for the event days, with target tracking above that.
  • Use a cross-Region inference profile for the assistant and add retries with backoff.
  • Return minimum capacity to 2 after the event.

Requesting quotas only when throttling starts would be too late, because increases can take time to approve.

Check yourself

How many instances should a production real-time endpoint have?

Show answer

At least two, across Availability Zones.

Exam Tips

Remember for the exam

  • Production real-time endpoints: at least two instances across AZs.
  • Bedrock peaks: cross-Region inference and retries with backoff.
  • Request quota increases ahead of known peaks.
  • Pre-warm for known peaks with scheduled scaling.
  • Scale to zero or consolidate for intermittent workloads.