What you will be able to do
- Pick the inference mode (batch, streaming or real-time) before you pick a rollout pattern
- Describe canary and blue-green rollouts in terms of the Model Serving features that carry them out
- Judge which pattern suits a high-traffic endpoint, using documented update behaviour and scaling settings
- Compare the batch, streaming, canary and blue-green deployment strategies and say which suit a high-traffic application
Key concept
Traffic split across served entities — One Model Serving endpoint can host several served entities, such as two versions of a model. Its traffic_config sets what percentage of requests each one gets. Changing those percentages is how you roll a model out on Databricks: a little at a time (canary-style) or all at once (blue-green-style).
1.First choose the inference mode, then the rollout pattern
A rollout strategy only matters if something is serving live requests. The MLOps guidance separates two cases. Batch and streaming pipelines load whichever model version holds the Champion alias in Unity Catalog. They pick up a new version the next time they run, so moving the alias is the deployment, and no traffic needs shifting. Real-time use cases are different: they need a REST endpoint, and Databricks builds that with Model Serving. Cost is the main factor in this choice. Batch or streaming is the cheaper option when you need high throughput and can accept higher latency. When predictions must come back quickly but can be computed ahead of time, the guidance suggests publishing batch predictions to an online key-value store rather than serving them live.
Only the fraud scoring. The nightly batch job uses whichever version holds the Champion alias at its next run. Per-swipe scoring needs low latency on live requests, so it runs on a Model Serving endpoint, and shifting endpoint traffic only applies there.
Checkpoint 1 of 5· Check yourself
Which use case does the Databricks MLOps guidance describe as generally most cost-effective with batch or streaming inference?
The guidance ties batch and streaming to cost-effectiveness for workloads with high throughput and higher latency. Live A/B comparisons are a real-time serving pattern.
“Batch or streaming inference is generally the most cost-effective option for higher throughput, higher latency use cases.”Source: docs.databricks.com
Putting the strategies side by side shows where each one fits a high-traffic application. Batch and streaming deployments have no live endpoint to protect: the deployment is an alias move, and the cost advantage grows with throughput. They suit high volume only when callers can wait. When callers cannot wait, a Model Serving endpoint is the route. It is described as highly available and low latency, and it can support over 25K queries per second with an overhead latency of less than 50 ms. Two rollout patterns then apply on that endpoint. A canary shifts a small percentage of traffic to a new served entity through the endpoint's traffic split, which limits how many requests a bad model can reach. A blue-green cutover builds the new configuration while the old one keeps serving, then moves all traffic in one update. For a high-traffic endpoint, the canary is the safer choice when you are unsure of the new model, because the blast radius is a fraction of requests. Blue-green is simpler and fits a version you have already validated offline. The next sections cover each pattern in detail.
2.Canary: send a small share of traffic to the new version
The Databricks documentation does not use the words "canary" or "blue-green". This lesson uses them for two patterns the documentation does describe. A canary rollout serves the new version next to the current one on the same endpoint, sends it a small share of requests, and raises that share as the metrics hold up. In the documented example, an endpoint called multi-model has a served entity named current (model-A version 1) getting 90% of traffic and one named challenger (model-B version 1) getting 10%. Each served entity has its own entity_name, entity_version, workload_size and scale_to_zero_enabled. Because the challenger is sized separately, you can provision it before it takes much traffic.
"traffic_config":
{
"routes":
[
{
"served_model_name":"current",
"traffic_percentage":"90"
},
{
"served_model_name":"challenger",
"traffic_percentage":"10"
}
]
}The MLOps workflow treats this as an online comparison between the Champion and a Challenger: an A/B test or a gradual rollout that may run for a long time. One limit is easy to miss. Every served entity on an endpoint must be the same kind of model. You cannot run a canary that pairs a custom model with an external model on one endpoint.
Checkpoint 2 of 5· Check yourself
A team wants to canary a new custom pyfunc model against an external model, splitting traffic 90/10 on a single endpoint. What happens?
An endpoint serves only one model type. A custom model and an external model need separate endpoints, so they cannot be split on one.
“You can not serve different model types in a single endpoint.”Source: docs.databricks.com
3.Blue-green: build the new configuration, then switch all traffic
The blue-green pattern works the same way. The new version is built completely while the old one keeps serving, and then 100% of traffic moves at once. On Model Serving you get this from an ordinary config update that names the new entity_version with a single route at 100%. The platform does not switch traffic until the new configuration is ready. If the update fails, nothing breaks: the current configuration stays live as though the update never happened. The cost is that once the cutover succeeds, every request goes to the new version. If it misbehaves, rolling back takes another update.
Checkpoint 3 of 5· Check yourself
A cutover update to a new model version fails partway through. What state is the endpoint in?
When an update fails, the configuration that was already live keeps serving, so a failed blue-green cutover does not cause an outage.
“When failures occur the existing active configuration stays effective”Source: docs.databricks.com
Checkpoint 4 of 5· Exam question
An ML engineer sets a Model Serving endpoint's `traffic_config` with two `routes` so 90% of requests go to the current served model and 10% go to a newly registered version, planning to raise that share over several days. What pattern does this implement?
Correct answer: A — A canary rollout that shifts a small, adjustable fraction of live traffic to the new version while the endpoint stays online.
- A. Splitting traffic by percentage between two served versions and raising the new share gradually is exactly the incremental exposure mechanism a canary rollout uses.
- B. A single atomic swap of all traffic in one step describes blue-green, not a percentage split that gets raised gradually across several days as described.
- C. Shadow serving means the new version never returns a response to the caller, but a traffic-split route still returns predictions from whichever version handled it.
- D. Model Serving traffic routing works on request percentages between registered model versions, not on cycling individual containers through a restart sequence.
4.Which pattern fits a high-traffic endpoint
Two documented facts shape this choice. A configuration update can take 10–25 minutes, and only one update can run at a time. A canary that goes from 1% to 10% to 100% is therefore three update cycles, and rolling back is a fourth. Because changes happen in sequence, the canary's real advantage is limiting how many requests a bad model can reach. A blue-green cutover finishes in one update but puts all traffic on the new version immediately. On a high-traffic endpoint, a bad version then affects every request until a rollback update completes.
| Aspect | Canary (stepped traffic_config) | Blue-green (single 100% cutover) |
|---|---|---|
| Served entities during rollout | Current and challenger side by side, each with its own compute | New configuration built while the old one keeps serving |
| Exposure if the new version is bad | Only its traffic_percentage share | All traffic once the cutover finishes |
| Number of config updates | One per step, plus one to roll back | One, plus one to roll back |
| Failed update | Previous configuration stays effective | Previous configuration stays effective |
Whichever pattern you use, high traffic also depends on how each served entity is configured. Route optimization is recommended for endpoints with high QPS. Size Compute Scale-out to the number of requests the entity must handle at once, roughly QPS × model run time: Small covers 0–4 concurrent requests, Medium 8–16 and Large 16–64. If you set min_provisioned_concurrency and max_provisioned_concurrency yourself, the values must be multiples of 4. Scale to zero is not recommended for production endpoints, because capacity is not guaranteed and a cold start adds latency when the endpoint scales back up. That applies to a challenger as much as to the current version.
Checkpoint 5 of 5· Match them up
Match each endpoint setting to its documented guidance
Tap a term, then the definition that fits it.
These are the documented levers for sizing an endpoint. A served entity that gets canary traffic needs the same attention as the current version.
“Route optimization is recommended for endpoints with high QPS and throughput requirements.”Source: docs.databricks.com
Exam traps
Each one states something that sounds right. Open it to see what is actually true.
1.Changing traffic_percentage takes effect immediately, so a canary can be rolled back in seconds.Why is that wrong?
A traffic change is a config update. Updates can take 10–25 minutes and cannot overlap, so each step and each rollback is a full update cycle.
Covered in Which pattern fits a high-traffic endpoint
2.A blue-green cutover on Model Serving causes an outage while the new version loads.Why is that wrong?
Model Serving keeps the old configuration serving until the new one is ready, so the update has no downtime.
Covered in Blue-green: build the new configuration, then switch all traffic
3.Turning on scale to zero for a challenger in production saves money without risk because it only gets 10% of traffic.Why is that wrong?
Databricks does not recommend scale to zero for production endpoints: capacity is not guaranteed and scaling back up adds cold-start latency.
Covered in Which pattern fits a high-traffic endpoint
Sources
Every claim above is drawn from one of these pages, quoted as it was written on the date shown.
- 1.
“Batch or streaming inference is generally the most cost-effective option for higher throughput, higher latency use cases.”
↩︎ First choose the inference mode, then the rollout pattern“For real-time use cases, you must set up the infrastructure to deploy the model as a REST API endpoint.”
↩︎ First choose the inference mode, then the rollout pattern“you might want to perform longer running online comparisons, such as A/B tests or a gradual rollout of the new model”
↩︎ Canary: send a small share of traffic to the new version“Model Serving executes a zero-downtime update by keeping the existing configuration running until the new one is ready.”
↩︎ Blue-green: build the new configuration, then switch all traffic“Model Serving executes a zero-downtime update by keeping the existing configuration running until the new one is ready.”
↩︎ Exam trap 2 - 2.
“can support over 25K queries per second with an overhead latency of less than 50 ms”
↩︎ First choose the inference mode, then the rollout pattern - 3.https://docs.databricks.com/aws/en/machine-learning/model-serving/serve-multiple-models-to-serving-endpointOfficial docs
“Serving multiple models from a single endpoint enables you to split traffic between different models to compare their performance and facilitate A/B testing.”
↩︎ Canary: send a small share of traffic to the new version“Serving multiple models from a single endpoint enables you to split traffic between different models to compare their performance and facilitate A/B testing.”
↩︎ Key concept“You can not serve different model types in a single endpoint.”
↩︎ Checkpoint - 4.https://docs.databricks.com/aws/en/machine-learning/model-serving/create-manage-serving-endpointsOfficial docs
“When failures occur the existing active configuration stays effective”
↩︎ Blue-green: build the new configuration, then switch all traffic“While there is an update in progress, another update cannot be made.”
↩︎ Which pattern fits a high-traffic endpoint“Available sizes are Small for 0-4 requests, Medium 8-16 requests, and Large for 16-64 requests.”
↩︎ Which pattern fits a high-traffic endpoint“Scale to zero is not recommended for production endpoints, as capacity is not guaranteed when scaled to zero.”
↩︎ Exam trap 3“Until the new configuration is ready, the old configuration keeps serving prediction traffic.”
↩︎ Prediction“Route optimization is recommended for endpoints with high QPS and throughput requirements.”
↩︎ Checkpoint - 5.https://docs.databricks.com/aws/en/machine-learning/model-serving/manage-serving-endpointsOfficial docs
“Endpoint configuration update times depend on the details of the update and can take 10-25 minutes.”
↩︎ Which pattern fits a high-traffic endpoint“Endpoint configuration update times depend on the details of the update and can take 10-25 minutes.”
↩︎ Exam trap 1