Choose a model and plan its fallback
Benchmark eligible models and keep an approved rollback route for each workload.
Choose a model and plan its fallback
Work through the decision
A support tool proposes sending all traffic to a cheaper text model. Eight percent of requests contain a photo, and all traffic must stay in the approved region. How would you change the route safely?
Check your reasoning
Partition evaluation by modality. Put only eligible text traffic on the cheaper route after measuring answer quality and tail latency. Keep an approved image-capable route and test that the fallback accepts the same inputs and respects residency.
Compare the choices
- Benchmark by workload
- Compare candidate models on representative modalities, context sizes, quality, latency and total cost under the intended load.
- Externalize model routing
- A versioned routing configuration maps workload classes to approved model IDs behind a stable request interface.
- Test a compatible fallback
- Exercise loss of the preferred endpoint and check capabilities, data location, timeouts and quality on the recovery route.
- Register and promote a model version
- Track lineage, evaluation results, approval and rollback targets for customized artifacts before moving traffic.
A fallback matrix
The primary accepts text and photos in region A. Backup B handles text in A. Backup C handles photos only in an unapproved region. Route text to B during an outage and queue or escalate photo requests. Test this with a photo; a successful text-only drill would miss the gap.
Apply it on AWS
One pattern uses API Gateway for the application boundary, Lambda to adapt requests, and AWS AppConfig to change approved routing rules. A SageMaker Model Registry package can identify a custom version. Before using a cross-Region inference profile, check every possible destination against the workload policy.
Practice the guide skills
- Measure accuracy, context fit, p95 latency and cost for two eligible models on identical inputs. Reject models that cannot accept the required modality. Watch 12:30
- Place approved model IDs behind a compatible adapter and configuration flag. Exercise a route change without rebuilding clients. Watch 31:06
- Disable the preferred route in a tabletop test. Verify fallback capacity, feature compatibility, geography and caller-visible behavior. Watch 30:09
- Record the base model, customization data version, evaluation and approval. Promote by immutable identifier and retain the prior deployment. Watch 49:44
Official objectives for this lesson
Related lesson · Design retrieval, generation and authorized actions
Choose a model and plan its fallback quiz
Answer 3 questions. Check each answer for an explanation.