Scaling to Zero

    What about scaling up to meet increased demand?

    Knative Autoscaling also allows you to easily configure your service to scale up (horizontal autoscaling) to meet increased demand as well as control the number of instances that spin up using concurrency limits and other options, but that’s beyond the scope of this tutorial.

    Let’s see this in action! We’re going to peek under the hood at the in Kubernetes where our Knative Service is running to watch our “Hello world!” Service scale up and down.

    Let’s run our “Hello world!” Service just one more time. This time, try the Knative Service in your browser http://hello.default.127.0.0.1.nip.io, or you can use your terminal with .

    Warning

    It may take up to 2 minutes for your Pods to scale down. Pinging your service again will reset this timer.

    Expected output:

    Scale up your Knative Service

    Rerun the Knative Service in your browser http://hello.default.127.0.0.1.nip.io, and you will see a new pod running again.

    Exit the watch command with .

    Some people call this Serverless 🌮 Up next, traffic splitting!

    Want to go deeper on Autoscaling?

    Interested in getting in the weeds with Knative Autoscaling? Check out the for concepts, samples, and more!