Your company's product-recommendation service exposes a REST endpoint, POST /api/v1/recommend, which is currently backed by model version 1. A retrained model (v2) shows better offline metrics, and the business wants to validate it in production. The deployment must meet several requirements: client applications must continue using the same /api/v1/recommend path, any problems with v2 must be reversible within seconds, and real-time latency must remain within the existing SLA. Which deployment strategy for the model endpoint best satisfies all of these requirements?
Replace the container image behind /api/v1/recommend during a scheduled maintenance window, switching 100 percent of traffic to model v2 at once.
Deploy model v2 alongside v1 and use a canary rollout that initially routes only a small percentage of /api/v1/recommend traffic to v2 while monitoring key metrics, promoting or rolling back automatically.
Run v2 in a nightly batch job that pre-computes recommendations and have the API return cached batch results until the model is fully replaced.
Expose model v2 at a new endpoint path (/api/v2/recommend) and require client teams to migrate to the new URL when ready.
A canary rollout (sometimes implemented as a blue/green deployment with canary traffic shifting) spins up the new model alongside the existing one and gradually diverts a small, configurable proportion of live requests to the new model. Because both versions stay online, clients continue to call the unchanged endpoint path, latency is unaffected, and automated health-checks can instantly redirect all traffic back to the stable model if KPIs degrade. In-place replacement risks a full outage and slow rollback, publishing a new URL breaks the requirement to keep the contract stable, and an offline batch process does not exercise the real-time service or enable instant rollback.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a canary rollout?
Open an interactive chat with Bash
How does a canary rollout differ from a blue/green deployment?
Open an interactive chat with Bash
Why is a canary rollout preferred for real-time services with SLAs?