0Pricing
MLOps Academy · レッスン

ゼロまでスケールして戻す

リクエスト駆動のオートスケーリングでコストを削減します。

「ゼロまでスケールして戻す」はCoddyKit上の無料MLOps Academyレッスンです。 これはレッスン2/4です。 下記で完全なレッスンを無料で読むことができます。その後、ブラウザ内の組み込みコードエディタと24時間対応のAIチューターでハンズオン演習できます。 これはMLOps Academy学習パスの一部であり、ウェブとCoddyKitアプリ全体で進捗が同期されます。 MLOps Academyコースには全4レッスンが含まれています。

このレッスンの一部はまだ翻訳されておらず、英語で表示されています。

Idle Models Cost Money

A model pod sitting with no traffic still burns CPU, memory, and cloud bills. KServe can shrink an idle service all the way down. Scale to zero stops that waste. 💸

Powered by Knative

KServe's serverless mode rides on Knative, which watches request volume and adjusts replicas. When traffic stops, it can remove every pod for that service.

Request-Driven Autoscaling

Replicas track demand, not a fixed schedule. As requests rise, KServe adds pods, and as they fade it scales back. This is request-driven autoscaling in action.

Setting minReplicas to Zero

To allow full scale down, you set minReplicas to 0 in the predictor spec. With zero allowed, an idle service drops to no running pods at all.

spec:
  predictor:
    minReplicas: 0
    model:
      modelFormat:
        name: sklearn

The Concurrency Target

The autoscaler aims for a target number of in-flight requests per pod. This concurrency target decides how aggressively KServe adds replicas under load.

metadata:
  annotations:
    autoscaling.knative.dev/target: "10"

Scaling Back Up

When a request arrives at a zero-scaled service, Knative spins a pod up on demand. Traffic resumes the moment the pod is ready, so the scale up is automatic.

The Cold Start Cost

That first request after zero must wait for the pod to start and load the model. This delay is the cold start, the main trade-off of scaling to zero. ⏱️

When Zero Makes Sense

Scale to zero shines for bursty or rare workloads where idle time dominates. For steady, latency-critical traffic, the cold start penalty may not be worth it.

Keep One Warm Instead

If cold starts hurt, set minReplicas to 1 so one pod always stays alive. You trade a little cost for a guaranteed warm instance ready to serve.

spec:
  predictor:
    minReplicas: 1

Cap the Upper End

You can also bound growth with maxReplicas so a traffic spike never overruns your cluster budget. It puts a ceiling on the autoscaler.

spec:
  predictor:
    minReplicas: 0
    maxReplicas: 5

Watch It Scale

You can confirm the behavior by watching pods appear and vanish with traffic. The pod count drops to zero when idle and climbs back when calls come in.

kubectl get pods -l serving.kserve.io/inferenceservice=sklearn-iris -w

Quick Check

What is the main downside of letting a service scale to zero?

Recap

You saw how minReplicas: 0 lets KServe scale idle models to zero and back on demand. Cap with maxReplicas, and keep one warm if cold starts hurt. Great progress! 🎉

よくある質問

「ゼロまでスケールして戻す」レッスンは無料ですか?

はい。「ゼロまでスケールして戻す」の完全なテキストはこのウェブで無料で読めます。インタラクティブに演習し(組み込みコードエディタと24時間対応のAIチューター)、MLOps Academyコースの残りをアンロックするには、CoddyKit PROにアップグレードしてください。 MLOps Academyコースには全4レッスンが含まれています。

「ゼロまでスケールして戻す」で何を学びますか?

リクエスト駆動のオートスケーリングでコストを削減します。 ブラウザで直接実行するハンズオンコードでMLOps Academyを演習し、24時間対応のAIチューターがレッスンを進める中での質問に答えます。

MLOps Academyを始めるのに経験は必要ですか?

事前経験は必要ありません。CoddyKitのMLOps Academyは初級者から上級者向けに構成されているため、ここから始めるか最初から始めて、自分のペースで進むことができます。 これはレッスン2/4です。

「ゼロまでスケールして戻す」レッスンにはどのくらい時間がかかりますか?

ほとんどのCoddyKitレッスンは約5~10分かかります。各レッスンはコンパクトでインタラクティブなので、着実に進歩し、ウェブとアプリ全体で正確に前回の場所から再開できます。

このMLOps Academyレッスンでコードを書いて実行できますか?

はい。すべてのMLOps Academyレッスンに組み込みコードエディタが含まれているため、ブラウザでリアルコードを書いて実行し、即座のAIフィードバックを取得できます。ローカル設定は不要です。

このコースのすべてのレッスン

  1. InferenceServiceリソース
  2. ゼロまでスケールして戻す
  3. カスタムPredictorを書く
  4. KServeとSeldon Core
← MLOps Academyに戻る