Deploy the Service

Obtain both the hostname and IP address of the istio-ingressgateway service
in the istio-system namespace, and then export them into the IP_ADDRESS
environment variable.

Note that each platform where you run your Kubernetes cluster is configured
differently. Details about the various ways that you can obatin your ingress
hostname and IP address is available in the Istio documentation under the
Control Ingress Traffic
topic.

Examples:

For GKE, you run the following commands:

# In Knative 0.2.x and prior versions, the `knative-ingressgateway` service was used instead of `istio-ingressgateway`.INGRESSGATEWAY=knative-ingressgateway
# The use of `knative-ingressgateway` is deprecated in Knative v0.3.x.# Use `istio-ingressgateway` instead, since `knative-ingressgateway`# will be removed in Knative v0.4.if kubectl get configmap config-istio -n knative-serving &> /dev/null;thenINGRESSGATEWAY=istio-ingressgateway
fiexportIP_ADDRESS=`kubectl get svc $INGRESSGATEWAY --namespace istio-system --output jsonpath="{.status.loadBalancer.ingress[*].ip}"`

Analysis

Algorithm

Knative Serving autoscaling is based on the average number of in-flight requests
per pod (concurrency). The system has a default
target concurrency of 100
but we used 10 for our service. We loaded the service
with 50 concurrent requests so the autoscaler created 5 pods
(50 concurrent requests / target of 10 = 5 pods)

Panic

The autoscaler calculates average concurrency over a 60 second window so it
takes a minute for the system to stablize at the desired level of concurrency.
However the autoscaler also calculates a 6 second panic window and will enter
panic mode if that window reached 2x the target concurrency. In panic mode the
autoscaler operates on the shorter, more sensitive panic window. Once the panic
conditions are no longer met for 60 seconds, the autoscaler will return to the
initial 60 second stable window.