<p>As described <a href="https://github.com/knative/serving/blob/master/pkg/activator/README.md" rel="nofollow noreferrer">here</a>, Knative's Activator receives and buffers requests to inactive revisions.</p>

<p>How is this routing implemented? All I see in the Namespace of my application is a VirtualService routing requests to the revisions, so I don't see how traffic coming into the mesh is redirected to the Activator.</p>

<p>Knative serving version: 0.9.0 </p>

<p>Knative has a new concept (CRD) known as the Serverless service which is created for each Knative Service.</p>

<p>The serverless service creates two Kubernetes Services:</p>

<ul>
<li>The <strong>Private service</strong> which targets your application pods. It is needed to discover the Pod IPs.</li>
<li>The <strong>Public service</strong> <strong>is being targeted</strong> by the ingress gateway and according to the Mode it is in (more about it later) it will either point to the same endpoints as the first service or to the endpoints of the activator service.</li>
</ul>

<h1>Serverless Service Modes</h1>

<p>Serverless Services can be in one of the following modes: </p>

<ul>
<li>Serve</li>
<li>Proxy</li>
</ul>

<h2>Serve Mode</h2>

<p>The serverless service is in Serve mode as long as there are pod instances of your application running. As such your Public service is configured with the endpoints from your private service, meaning that requests forwarded by the ingress gateway reach your application as shown in the diagram below:</p>

<p><a href="https://i.stack.imgur.com/RcQjl.png" rel="noreferrer"><img src="https://i.stack.imgur.com/RcQjl.png" alt="Serving Mode for Knative serverless controller"></a></p>

<ul>
<li>hello-go-pb - is the public service.</li>
<li>hello-go-pr - is the private service.</li>
</ul>

<h2>Proxy Mode</h2>

<p>When the instances of your application are scaled down by the autoscaler, the serverless service controller updates the public service to be configured with the IPs discovered by the Activator Service. Which triggers autoscaling buffers the request until one service is up and running and forwards the request. Proxy mode can be seen in the diagram below:</p>

<p><a href="https://i.stack.imgur.com/Z6s5P.png" rel="noreferrer"><img src="https://i.stack.imgur.com/Z6s5P.png" alt="Proxy Mode for Knative serverless controller"></a></p>

<p>As a summary, the Serverless controller sets the endpoints of the public service 
 by alternating between the endpoints of the Private Service or if it's scaled down to zero to the endpoints of the Activator Service.</p>
