Match inference capacity to the traffic shape
Compare synchronous, provisioned and asynchronous inference against measured token demand.
Match inference capacity to the traffic shape
Work through the decision
A service handles interactive requests all day and 80,000 summaries overnight. Buying peak interactive capacity for the entire backlog looks expensive. How should the workloads be separated?
Check your reasoning
Measure peak tokens per second and the live latency target. Serve interactive traffic on an eligible real-time model. Submit delay-tolerant independent records through an asynchronous batch path. Compare actual utilization with the cost of a capacity commitment before purchasing one.
Compare the choices
- Use on-demand inference
- Pay for inference as requests arrive. Check service quotas and cold traffic behavior for the selected model.
- Reserve provisioned throughput
- For supported models, predictable sustained load can justify dedicated capacity. Size from measured token demand, availability and commitment cost.
- Submit a batch inference job
- Independent records with a delay-tolerant deadline can be processed together and reconciled by record ID.
- Optimize a self-hosted endpoint
- Measure accelerator memory, model load time, context size, quantization effects and scaling delay before provisioning a custom runtime.
Calculate baseline demand
If 30 requests per minute each consume 1,000 input and 200 output tokens, the workload generates 30,000 input and 6,000 output tokens per minute. Compare those dimensions separately with the applicable quota or capacity model. A burst at three times the average can break a sizing plan based on daily totals.
Apply it on AWS
On Bedrock, check model and region eligibility for batch inference or Provisioned Throughput before comparing prices. For a self-hosted SageMaker endpoint include model loading, accelerator memory and autoscaling lag. Test a representative mixed-length batch to expose a single long input delaying its peers.
Practice the guide skills
- Compare interactive on-demand, provisioned and asynchronous batch options against the model's availability, load shape and latency deadline. Watch 3:15:59
- Estimate accelerator memory including model weights and context cache. Measure warmup and test quantization against a quality threshold. Watch 3:19:56
- Separate the live queue from overnight work. Test concurrency and capacity against measured token demand, utilization and deadline. Watch 3:24:00
Official objectives for this lesson
Related lesson · Choose an AWS delivery model for generative AI
Match inference capacity to the traffic shape quiz
Answer 3 questions. Check each answer for an explanation.