# Mixer Adapter for Knative

DevFeed: [Mixer Adapter for Knative](<https://devfeed.tech/articles/mixer-adapter-for-knative-48692.md>)

Original publisher: [Read original article](<https://istio.io/latest/blog/2019/knative-activator-adapter/>)

Author: Idan Zach (IBM)

Published: 2019-09-18T00:00:00Z

Content type: article

Language: en

Sources: [Istio Blog](<https://devfeed.tech/sources/istio-blog.md>)

Topics: [Serverless](<https://devfeed.tech/topics/serverless.md>), [API](<https://devfeed.tech/topics/api.md>), [Kubernetes](<https://devfeed.tech/topics/kubernetes.md>), [systems](<https://devfeed.tech/topics/systems.md>), [Load Balancing](<https://devfeed.tech/topics/load-balancing.md>), [proxy](<https://devfeed.tech/topics/proxy.md>)

Tags: [adapter](<https://devfeed.tech/tags/adapter.md>), [api](<https://devfeed.tech/tags/api.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [backends](<https://devfeed.tech/tags/backends.md>), [balancing](<https://devfeed.tech/tags/balancing.md>), [istio](<https://devfeed.tech/tags/istio.md>), [knative](<https://devfeed.tech/tags/knative.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [load-balancing](<https://devfeed.tech/tags/load-balancing.md>), [mesh](<https://devfeed.tech/tags/mesh.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [mixer](<https://devfeed.tech/tags/mixer.md>), [proxy](<https://devfeed.tech/tags/proxy.md>), [scale-from-zero](<https://devfeed.tech/tags/scale-from-zero.md>), [serverless](<https://devfeed.tech/tags/serverless.md>), [services](<https://devfeed.tech/tags/services.md>)

## AI overview

This post explains how an out-of-process Istio Mixer adapter can implement Knative's scale-from-zero logic. It describes request buffering, autoscaling triggers, routing restoration, retries, and load balancing for serverless applications running on Kubernetes.

## Source excerpt

This post demonstrates how you can use Mixer to push application logic into Istio. It describes a Mixer adapter which implements the Knative scale-from-zero logic with simple code and similar performance to the original implementation. Knative serving Knative Serving builds on Kubernetes to support deploying and serving of serverless applications. A core capability of serverless platforms is scale-to-zero functionality which reduces resource usage and cost of inactive workloads. A new mechanism is required to scale from zero when an idle application receives a new request. The following diagram represents the current Knative architecture for scale-from-zero. Knative scale-from-zero The traffic for an idle application is redirected to Activator component by programming Istio with VirtualServices and DestinationRules. When Activator receives a new request, it: buffers incoming requests triggers the Autoscaler redirects requests to the application after it has been scaled up, including retries and load-balancing (if needed) Once the application is up and running again, Knative restores the routing from Activator to the running application. Mixer adapter Mixer provides a rich intermediation layer between the Istio components and infrastructure backends. It is designed as a stand-alone component, separate from Envoy, and has a simple extensibility model to enable Istio to interoperate with a wide breadth of backends. Mixer is inherently easier to extend than Envoy is. Mixer is an attribute processing engine that uses operator-supplied configuration to map request attributes from the Istio proxy into calls to the infrastructure backends systems via a pluggable set of adapters. Adapters enable Mixer to expose a single consistent API, independent of the infrastructure backends in use. The exact set of adapters used at runtime is determined through operator configuration and can easily be extended to target new or custom infrastructure backends. In order to achieve Knative s