CertSafari
    Databricks Certified Machine Learning Professional· Lessons

    Domain 3 · Lesson 10/11

    Canary vs blue-green rollouts on Databricks Model Serving

    Deployment Strategies

    18 min read
    6% of exam
    8 sources
    Published 21 Oct 2026
    Docs as of 17 Oct 2026

    What you will be able to do

    • Compare canary and blue-green rollouts by blast radius, rollback speed and capacity cost, and choose one for a high-traffic endpoint.
    • Configure served entities and traffic_config to split live traffic between model versions, and shift the split with a config update.
    • Confirm that a traffic update succeeded, and roll back by shifting traffic percentages instead of redeploying.
    • Extend a deployment job into a staged 1% → 10% → 100% canary rollout.

    Key concept

    Traffic split across served entities — A single Model Serving endpoint can host several model versions as separate served entities. Its traffic_config decides what percentage of live requests each one gets, so a rollout or a rollback is a change of percentages and not a change of endpoint.

    1.Canary and blue-green: two ways to move live traffic

    A rollout pattern decides how live requests move from the model version serving today to the one you just registered. The pattern only matters for real-time serving. After Choosing batch, streaming or real-time inference has put a model behind a REST endpoint, every request is a caller waiting for an answer, and a bad version hurts whoever it reaches. A batch or streaming pipeline that loads the model by alias simply picks up the new version on its next run, so there is no live traffic to split.

    Blue-green keeps two complete deployments. Blue serves all traffic, and green, the new version, is brought up beside it. Once green is ready, every request switches to it at once. On Model Serving, replacing the served model version in one endpoint config update works this way. The platform keeps the existing configuration running until the new one is ready and then cuts over, so callers see no downtime. The cost is capacity, because you are billed for both configurations until the transition completes. The risk is that the cutover is total: if the new version has a flaw that offline evaluation missed, every request meets it at the same moment.

    Canary runs the old and new versions side by side on the same endpoint and sends the new one a small share of requests, such as 10%. You watch it on real traffic, then raise its share in steps until it carries everything. A problem reaches only the canary's slice. Rolling back means changing percentages, because the old version never left. The price is time and attention: the rollout runs over hours or days, and someone, or a job, has to read metrics between steps.

    Blue-green swap vs canary split on a Model Serving endpoint
    AspectBlue-green (one config swap)Canary (two served entities)
    How traffic movesAll requests move at once when the new configuration is readyA small share goes through traffic_config routes, raised in steps
    Blast radius of a bad versionEvery request after the cutoverOnly the canary's traffic_percentage
    DowntimeNone: the old configuration serves until the new one is readyNone: both versions serve throughout
    Capacity costOld and new billed together only during the transitionBoth served entities provisioned for the whole rollout
    RollbackDeploy the previous version again with another config updateShift traffic_percentage back to the current entity
    DurationOne config updateHours to days, gated on metrics

    On a high-traffic endpoint, canary is usually the better choice. The volume is what makes a small slice useful: 10% of a busy endpoint is enough real requests to judge the new version quickly, and 90% of callers stay on the known-good model while you do. Blue-green fits the opposite case, such as a low-traffic or internal endpoint where a full cutover is easy to watch and a failure reaches few callers. Size each served entity for the share it carries. Provisioned concurrency is roughly QPS × model execution time, so a canary at 10% needs only a fraction of the current entity's concurrency until its share grows. Route optimization is recommended for any endpoint with high QPS.

    Judge a deployment strategy for a high-traffic application on three things: how many requests a flaw can reach, how fast you can undo it, and what the capacity costs. Model Serving is built for this load, supporting over 25K queries per second with under 50 ms of overhead latency, so volume alone is not the obstacle. Exposure is. At that scale a blue-green cutover sends the full request rate to a version that has never seen production traffic, and the green configuration must already be sized for all of it, so the transition bills two full-size deployments. A canary reaches a representative sample within minutes, and because endpoints scale up almost immediately but scale down only every five minutes, a canary that is raised in steps gets capacity as its share grows. Blue-green still wins when the endpoint is small, the change is low-risk, and a single clean switch is worth more than a long watch.

    Checkpoint 1 of 9· Check yourself

    A fraud-scoring model runs behind a busy real-time Model Serving endpoint. A new version passed offline evaluation, but the team wants to limit how many live requests a flaw it missed could reach. Which rollout should they use?

    Checkpoint 2 of 9· 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?

    Checkpoint 3 of 9· Exam question

    A retailer's recommendation model runs on a Model Serving endpoint handling live web traffic around the clock, so downtime directly costs revenue. The team compares blue-green and canary strategies for rolling out a retrained model. Which statement correctly compares them for this use case?

    Sources12345

    2.Serving two versions with served entities and traffic_config

    On Databricks, a canary is one endpoint with more than one served entity. Each served entity has a name, a Unity Catalog model given by its full catalog.schema.model path in entity_name, a version in entity_version, and its own compute settings. The endpoint's traffic_config holds a list of routes, and each route pairs a served_model_name with a traffic_percentage. In the documented example, the entity current serves version 1 of catalog.schema.model-A at 90%, and challenger serves version 1 of catalog.schema.model-B at 10%.

    You set the initial split when you create the endpoint with POST /api/2.0/serving-endpoints. In the Serving UI, each served entity gets a traffic percentage, and Add served entity adds the second one. Moving the canary forward is a config update, not a new endpoint. PUT /api/2.0/serving-endpoints/{name}/config takes the full served_entities list plus a new traffic_config. The excerpt below moves the split to 50/50. You can make the same change from the Serving tab with Edit configuration, and the MLflow Deployments SDK accepts the same parameters as the REST API.

    The traffic_config part of a PUT /api/2.0/serving-endpoints/{name}/config body, moving current and challenger to an even splitjson
    "traffic_config":
       {
          "routes":
          [
             {
                "served_model_name":"current",
                "traffic_percentage":"50"
             },
             {
                "served_model_name":"challenger",
                "traffic_percentage":"50"
             }
          ]
       }

    All served entities on an endpoint must be the same model type. Two versions of a custom model can run as a canary against each other, but a custom model and an external model cannot share an endpoint. Retrained versions of the same custom model never hit this limit. It matters when someone proposes testing a hosted model against your custom one on the same endpoint.

    Each served entity can also be called on its own. POST /serving-endpoints/{endpoint-name}/served-models/{served-model-name}/invocations sends a request straight to one entity and ignores the traffic settings. This is useful for smoke-testing the challenger before it gets any share, or for replaying a fixed set of requests against both entities. It is not a canary, though: requests sent this way do not follow traffic_config. If every request goes to /served-models/challenger/invocations, the challenger serves all of them.

    Checkpoint 4 of 9· Fill the gap

    This PUT /api/2.0/serving-endpoints/{name}/config body moves the canary to an even split. What value belongs in the blank so the second route sends traffic to the new version?

    "traffic_config":
       {
          "routes":
          [
             {
                "served_model_name":"current",
                "traffic_percentage":"50"
             },
             {
                "served_model_name":" ? ",
                "traffic_percentage":"50"
             }
          ]
       }

    Checkpoint 5 of 9· Check yourself

    An endpoint named multi-model runs current at 90% and challenger at 10%. A QA script sends all of its requests to /serving-endpoints/multi-model/served-models/challenger/invocations. What happens to those requests?

    Sources64

    3.Confirming a traffic update and rolling back

    A traffic change is not instant, and Ready alone does not mean it worked. Config updates take 10–25 minutes, depending on what changed. Readiness only says whether the endpoint can be queried. The full set of statuses is Ready, Ready (Update failed), Not ready (Updating), Not ready (Update failed) and Not ready (Stopped). Ready (Update failed) is the case to watch: the endpoint is still answering, but the latest change was unsuccessful, so traffic is still following the old configuration.

    To confirm a shift landed, read the endpoint back with GET /api/2.0/serving-endpoints/{name}, the Databricks Workspace Client or the MLflow Deployments SDK, and check three things:

    • state.ready is READY, so the endpoint is serving.
    • The update state (config_update) is NOT_UPDATING, and pending_config is no longer in the response, which is how a finished update looks.
    • config.traffic_config.routes shows the percentages you sent, and each served entity reports DEPLOYMENT_READY.
    Reading endpoint readiness and update state with the Databricks Workspace Clientpython
    from databricks.sdk import WorkspaceClient
    
    w = WorkspaceClient()
    endpoint = w.serving_endpoints.get(name="my-endpoint")
    print(f"Endpoint state: {endpoint.state.ready}")
    print(f"Update state: {endpoint.state.config_update}")

    Fast rollback comes from keeping the champion deployed. While both served entities are on the endpoint, reverting is one more traffic_config update that sends traffic back to current. Nothing new has to be packaged, no new endpoint is created, and no client changes. Compare a swap where the old version is already gone. To get it back you have to deploy it again, and packaging and provisioning a model version takes about 10 minutes, or longer for large or complex models.

    Two tempting alternatives fail. A second endpoint with a fallback hardcoded into every client moves rollback into each application, so a revert means changing and redeploying callers. Relying on the Model Registry's version history to rebuild the champion during an incident means a full redeployment. Scale to zero is not a rollback either: it removes capacity, and the first request after it pays a cold start. It should not be used for production workloads that need consistent uptime.

    Checkpoint 6 of 9· Fill the gap

    Your rollout job has to tell an endpoint that is serving apart from one whose latest traffic change actually finished. Which field completes the second print so the job can check for NOT_UPDATING?

    from databricks.sdk import WorkspaceClient
    
    w = WorkspaceClient()
    endpoint = w.serving_endpoints.get(name="my-endpoint")
    print(f"Endpoint state: {endpoint.state.ready}")
    print(f"Update state: {endpoint.state. ? }")

    Checkpoint 7 of 9· Check yourself

    Mid-rollout, challenger carries 50% of a busy production endpoint and starts returning bad scores, while current is still deployed beside it. What is the fastest safe rollback?

    Checkpoint 8 of 9· Exam question

    A team wants rollback safety on a Model Serving endpoint: if a newly promoted challenger starts returning degraded predictions, on-call engineers must revert traffic to the previous version within minutes, without redeploying the endpoint from scratch. Which design achieves this?

    Sources762

    4.Automating a staged canary in a deployment job

    The MLflow deployment job (evaluate, approve, deploy) ends in a deployment task that, in its simplest form, deploys the approved version to a serving endpoint in one step. That single step is an all-at-once swap. To make it a canary, replace it with a sequence of tasks after approval:

    1. Deploy the model to 1% of traffic.
    2. Raise it to 10%.
    3. Collect and check metrics.
    4. Decide whether to proceed or roll back.
    5. Deploy the model to 100%, or roll it back.

    Each deploy task is a traffic_config update like the ones above. It should wait until the endpoint reports NOT_UPDATING before the next task starts measuring, or the metrics will describe the old split. Keep the job's max concurrent runs at 1, the default. Otherwise two versions registered close together could both try to rewrite the same endpoint's routes.

    The check task is where Champion vs Challenger model selection moves online. The Challenger has already passed offline evaluation, and now it has to hold up on its slice of real traffic before it gets more. The decision compares Serving endpoint health metrics for the two served entities over the same window. The job promotes the canary when its numbers match the champion's and shifts traffic back otherwise. Inference tables capture each request and response, so the comparison can go below averages to the specific inputs where the challenger behaves differently.

    Checkpoint 9 of 9· Put it in order

    Order the tasks of a deployment job that turns the single all-at-once deploy step into a staged canary on a Model Serving endpoint.

    1. 1.Health metrics for both served entities are collected and checked over the same window
    2. 2.A second traffic_config update raises the new entity's share to 10%
    3. 3.An approver signs off on the evaluated model version in the approval task
    4. 4.A traffic_config update sends 1% of traffic to the new served entity
    5. 5.Traffic goes to 100% on the new version, or routes shift back to the champion
    6. 6.The job decides whether to proceed or roll back based on that comparison

    Sources81

    Practise it for real

    Run a small canary on a sandbox endpoint: start at 90/10, move to 50/50, confirm each update, and roll back with a traffic change.

    1. 1.Create an endpoint with POST /api/2.0/serving-endpoints that has two served entities, current and challenger, each pointing to a Unity Catalog model version, plus a traffic_config with routes of 90 and 10.

      Why: A canary starts with the new version on a small share of traffic, while the current version serves everyone else from the same endpoint.

      You should see: The endpoint shows Not Ready while it provisions, then READY.

    2. 2.Call GET /api/2.0/serving-endpoints/{name} until the update state is NOT_UPDATING.

      Why: Readiness alone does not prove the configuration you sent was applied.

      You should see: pending_config is absent, both served entities report DEPLOYMENT_READY, and the routes read 90 and 10.

    3. 3.Send one request to /serving-endpoints/{name}/served-models/challenger/invocations.

      Why: Calling the challenger directly lets you smoke-test it without involving the split.

      You should see: The challenger answers, whatever traffic_config says.

    4. 4.PUT /api/2.0/serving-endpoints/{name}/config with the same served_entities and routes of 50 and 50, then poll GET again.

      Why: Moving a canary forward is a config update on the existing endpoint.

      You should see: After the update finishes, which can take 10–25 minutes, the routes read 50 and 50 and the update state is NOT_UPDATING.

    5. 5.PUT the config again with routes of 90 and 10.

      Why: This is the rollback: the champion never left the endpoint, so you only change percentages.

      You should see: The routes return to 90/10 without a new endpoint or any client change.

    Stuck? Get a nudge

    The documented example sets scale_to_zero_enabled to true, which is fine in a sandbox. Set it to false on any endpoint that serves production traffic.

    Sources

    (8)

    Every claim above is drawn from one of these pages, quoted as it was written on the date shown.

    1. 1.
      “For real-time use cases, you must set up the infrastructure to deploy the model as a REST API endpoint.”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “the inference pipeline automatically uses the new version for its next execution”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “you might want to perform longer running online comparisons, such as A/B tests or a gradual rollout of the new model”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “Model Serving and data profiling allow you to automatically collect and monitor inference tables that contain request and response data for an endpoint.”
      ↩︎ Automating a staged canary in a deployment job
      “Model Serving executes a zero-downtime update by keeping the existing configuration running until the new one is ready.”
      ↩︎ Exam trap 1
      “For real-time model serving, you might want to perform longer running online comparisons, such as A/B tests or a gradual rollout of the new model.”
      ↩︎ Checkpoint
    2. 2.
      “During this update process, you are billed for both the old and new endpoint configurations until the transition is complete.”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “provisioned concurrency = queries per second (QPS) * model execution time (s)”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “Endpoints scale up almost immediately with increased traffic and scale down every five minutes to match reduced traffic.”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “This process can take approximately 10 minutes, but may take longer depending on model complexity, size, and dependencies.”
      ↩︎ Confirming a traffic update and rolling back
      “Scale to zero should not be used for production workloads that require consistent uptime or guaranteed response times.”
      ↩︎ Confirming a traffic update and rolling back
      “Scale to zero should not be used for production workloads that require consistent uptime or guaranteed response times.”
      ↩︎ Exam trap 4
      “Databricks performs a zero-downtime update of endpoints by keeping the existing endpoint configuration up until the new one becomes ready.”
      ↩︎ Prediction
    3. 3.
      “use the traffic split feature to start routing a small fraction of traffic to models in Unity Catalog”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “increase the amount of traffic until all of the traffic is rerouted”
      ↩︎ Canary and blue-green: two ways to move live traffic
    4. 4.
      “Route optimization is recommended for endpoints with high QPS and throughput requirements.”
      ↩︎ Canary and blue-green: two ways to move live traffic
      “You can serve multiple models or model versions from a single endpoint and control the traffic split between them.”
      ↩︎ Serving two versions with served entities and traffic_config
      “The APIs for these tasks accept the same parameters as the REST API for serving endpoints.”
      ↩︎ Serving two versions with served entities and traffic_config
    5. 5.
      “can support over 25K queries per second with an overhead latency of less than 50 ms”
      ↩︎ Canary and blue-green: two ways to move live traffic
    6. 6.
      “The served entity, current, hosts version 1 of model-A and gets 90% of the endpoint traffic”
      ↩︎ Serving two versions with served entities and traffic_config
      “You can also make this update from the Serving tab in the Databricks UI using the Edit configuration button.”
      ↩︎ Serving two versions with served entities and traffic_config
      “You can not serve different model types in a single endpoint.”
      ↩︎ Serving two versions with served entities and traffic_config
      “While querying the individual served model, the traffic settings are ignored.”
      ↩︎ Serving two versions with served entities and traffic_config
      “You can also update the traffic split between served models.”
      ↩︎ Confirming a traffic update and rolling back
      “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
      “While querying the individual served model, the traffic settings are ignored.”
      ↩︎ Exam trap 2
      “serve different versions of a model at the same time, which makes experimenting with new versions easier, while keeping the current version in production”
      ↩︎ Checkpoint
    7. 7.
      “Endpoint configuration update times depend on the details of the update and can take 10-25 minutes.”
      ↩︎ Confirming a traffic update and rolling back
      “Endpoint statuses can be Ready, Ready (Update failed), Not ready (Updating), Not ready (Update failed), or Not ready (Stopped).”
      ↩︎ Confirming a traffic update and rolling back
      “pending_config is no longer returned because the update was finished successfully”
      ↩︎ Confirming a traffic update and rolling back
      “Updated failed indicates the latest change to the endpoint was unsuccessful.”
      ↩︎ Exam trap 3
    8. 8.
      “Finally, Deployment deploys the model version to a Databricks Model Serving endpoint.”
      ↩︎ Automating a staged canary in a deployment job
      “deploy the model to 1%, deploy the model to 10%, collect and check metrics, decide whether to proceed or rollback”
      ↩︎ Automating a staged canary in a deployment job
      “Databricks also recommends setting the max concurrent run limit to 1 (the default) to prevent deployment race conditions.”
      ↩︎ Automating a staged canary in a deployment job
      “after the approval task to deploy the model to 1%, deploy the model to 10%, collect and check metrics, decide whether to proceed or rollback”
      ↩︎ Checkpoint

    Ready to test yourself?

    Practise the 32 questions on this subdomain.

    Spotted a mistake, or was something unclear? Tell us.