0Pricing
MLOps Academy · Lektion

Auf null skalieren und wieder hochskalieren

Sparen Sie Kosten mit anfragegesteuertem Autoscaling.

Auf null skalieren und wieder hochskalieren ist eine kostenlose MLOps Academy-Lektion auf CoddyKit. Dies ist Lektion 2 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des MLOps Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der MLOps Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

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! 🎉

Häufig gestellte Fragen

Ist die Lektion „Auf null skalieren und wieder hochskalieren“ kostenlos?

Ja — der vollständige Text von „Auf null skalieren und wieder hochskalieren“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des MLOps Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der MLOps Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Auf null skalieren und wieder hochskalieren“?

Sparen Sie Kosten mit anfragegesteuertem Autoscaling. Du übst MLOps Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um MLOps Academy zu starten?

Keine Vorkenntnisse erforderlich. MLOps Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 2 von 4.

Wie lange dauert die Lektion „Auf null skalieren und wieder hochskalieren“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser MLOps Academy-Lektion Code schreiben und ausführen?

Ja. Jede MLOps Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Die InferenceService-Ressource
  2. Auf null skalieren und wieder hochskalieren
  3. Einen benutzerdefinierten Predictor schreiben
  4. KServe und Seldon Core
← Zurück zu MLOps Academy