0Pricing
MLOps Academy · 课时

金丝雀发布:先部署给少量用户

将少量流量转移到新模型

金丝雀发布:先部署给少量用户 是 CoddyKit 上的免费 MLOps Academy 课时。 这是第 1 节课,共 4 节。 你可以在下方免费阅读本课时的完整内容 — 然后在浏览器中使用内置代码编辑器和全天候 AI 导师进行实践。 这是 MLOps Academy 学习路径的一部分,你的进度在网页和 CoddyKit 应用中同步。 MLOps Academy 课程共包含 4 节课。

本课时的部分内容尚未翻译,以英文显示。

What a Canary Is

A canary rollout sends your new model to a small slice of real traffic first, so any damage stays tiny while you watch. 🐤

Why Not Ship to Everyone

Flipping all traffic to a fresh model at once is a big-bang deploy: if it is wrong, every single user feels it instantly.

Start Small on Purpose

Canaries usually begin around 5% of traffic. That is enough to gather real signal, but small enough that a bad model barely dents your users.

Champion and Challenger

The stable model is the champion; the canary is the challenger. Both run live at once so you can compare them on the same real requests.

Watch Before You Widen

While the canary serves its slice, you monitor error rate, latency, and key business metrics, side by side against the champion.

Ramp Up in Steps

If the canary looks healthy, you ramp its share up in stages, say 5%, 25%, 50%, then 100%, pausing to check at each level.

Splitting the Traffic

A router or proxy decides which model each request hits. This simple split sends one in twenty calls to the canary version.

import random

def route(request, canary_pct=5):
    if random.uniform(0, 100) < canary_pct:
        return canary_model.predict(request)
    return champion_model.predict(request)

Tag Who Served It

Log which model handled each request. Without a version tag on every prediction, you cannot tell whose metrics are whose later.

log.info("prediction", extra={
    "model_version": "v2-canary",
    "latency_ms": latency,
})

Keep the Slices Comparable

Route by a stable hash of user id so the same person always lands on the same model. Random per-request splits make a fair comparison harder.

Bail Out Fast

The whole point is a quick exit. If the canary misbehaves, you drop its traffic back to 0% and users never noticed a thing.

Canary vs Blue-Green

Blue-green keeps two full environments and flips between them. A canary instead leaks traffic gradually, giving you finer control and earlier warning.

Quick Check

Let us check the core idea behind a canary.

Recap

A canary ships your new model to a tiny slice first, compares it against the champion, ramps up only if healthy, and rolls back instantly if not. ✅

常见问题解答

「金丝雀发布:先部署给少量用户」课时是免费的吗?

是的 — 「金丝雀发布:先部署给少量用户」的完整文本可在网页上免费阅读。要进行交互式练习(内置代码编辑器和全天候 AI 导师)并解锁 MLOps Academy 课程的其余内容,请升级到 CoddyKit PRO。 MLOps Academy 课程共包含 4 节课。

「金丝雀发布:先部署给少量用户」这节课中我会学到什么?

将少量流量转移到新模型 你通过在浏览器中直接运行的动手代码来练习 MLOps Academy,全天候 AI 导师会在你学习这节课的过程中回答你的问题。

学习 MLOps Academy 需要有经验吗?

无需任何先前经验。CoddyKit 上的 MLOps Academy 课程适合初学者到高级学习者,你可以从这里开始或从头开始,按照自己的节奏学习。 这是第 1 节课,共 4 节。

「金丝雀发布:先部署给少量用户」课时需要多长时间?

大多数 CoddyKit 课程大约需要 5–10 分钟。每节课都很精短且互动,所以你能稳步进步,并在网页和应用中从离开的地方继续。

我能在这节 MLOps Academy 课中编写并运行代码吗?

能。每节 MLOps Academy 课都包含内置代码编辑器,你可以在浏览器中直接编写并运行真实代码,并获得即时 AI 反馈 — 无需本地设置。

此课程中的所有课时

  1. 金丝雀发布:先部署给少量用户
  2. 在不影响用户的情况下进行影子流量测试
  3. 定义自动回滚标准
  4. 使用 Argo Rollouts 渐进式交付
← 返回 MLOps Academy