Implementing a serverless API using traffic splitting with Knative
Knative has traffic splitting functionality that consists of distributing the traffic across two or more versions within a service but uses a proxy to implement this feature. By default, it uses Istio. For this implementation, we are using Contour, an Envoy-based proxy that consumes fewer resources than Istio. Both Istio and Contour use Envoy, a layer 7 proxy to implement service mesh capabilities such as traffic splitting. Traffic splitting could be used to implement deployment strategies such as canary and blue-green deployments, and also could be used to simulate faulty traffic for some basic chaos engineering scenarios. In this section, we are going to implement traffic splitting for the previous API function created in the Creating a simple serverless function section. In that section, we created a function called api
with the revision name v1
. Now we are going to update this function with another revision called...