# Introducing the TrafficExtension API

DevFeed: [Introducing the TrafficExtension API](<https://devfeed.tech/articles/introducing-the-trafficextension-api-48822.md>)

Original publisher: [Read original article](<https://istio.io/latest/blog/2026/traffic-extension-api/>)

Author: Liam White - Docusign

Published: 2026-05-18T00:00:00Z

Content type: release

Language: en

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

Topics: [istio](<https://devfeed.tech/topics/istio.md>), [API](<https://devfeed.tech/topics/api.md>), [Lua](<https://devfeed.tech/topics/lua.md>), [WebAssembly](<https://devfeed.tech/topics/web-assembly.md>), [container](<https://devfeed.tech/topics/container.md>)

Tags: [ambient](<https://devfeed.tech/tags/ambient.md>), [api](<https://devfeed.tech/tags/api.md>), [c-plus-plus](<https://devfeed.tech/tags/c-plus-plus.md>), [extensibility](<https://devfeed.tech/tags/extensibility.md>), [extension](<https://devfeed.tech/tags/extension.md>), [go](<https://devfeed.tech/tags/go.md>), [http](<https://devfeed.tech/tags/http.md>), [istio](<https://devfeed.tech/tags/istio.md>), [logging](<https://devfeed.tech/tags/logging.md>), [lua](<https://devfeed.tech/tags/lua.md>), [mesh](<https://devfeed.tech/tags/mesh.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [oci](<https://devfeed.tech/tags/oci.md>), [payload](<https://devfeed.tech/tags/payload.md>), [policy-enforcement](<https://devfeed.tech/tags/policy-enforcement.md>), [rust](<https://devfeed.tech/tags/rust.md>), [services](<https://devfeed.tech/tags/services.md>), [tcp](<https://devfeed.tech/tags/tcp.md>), [telemetry](<https://devfeed.tech/tags/telemetry.md>), [traffic-extension](<https://devfeed.tech/tags/traffic-extension.md>), [wasm](<https://devfeed.tech/tags/wasm.md>), [webassembly](<https://devfeed.tech/tags/webassembly.md>)

## AI overview

Istio 1.30 introduces TrafficExtension, a unified API for configuring Lua scripts and WebAssembly plugins in Envoy-based sidecars, gateways, and waypoints. The API replaces WasmPlugin as the primary proxy extensibility mechanism and supports HTTP and TCP traffic, with extensions for tasks such as authentication, logging, telemetry, policy enforcement, and request or response transformation.

## Source excerpt

Mesh extensibility has always been a core tenet of Istio's design. By allowing users to inject custom logic directly into the data plane, Istio enables a wide range of use cases for performing custom authentication, collecting specialized telemetry, or transforming requests and responses on-the-fly. Until now Istio's only supported extensibility API was WasmPlugin, which served WebAssembly-based extensions. Users who wanted to leverage Lua scripts could only do so indirectly via EnvoyFilter, a low-level mechanism that is powerful but easy to misconfigure. Istio 1.30 introduces the TrafficExtension API -- a single, unified API for configuring Wasm and Lua extensions for Envoy-based sidecars, gateways and waypoints. What is TrafficExtension? TrafficExtension is a new Istio API that replaces WasmPlugin as the primary proxy extensibility mechanism. It supports two extension types: Lua scripts -- inline Lua scripts embedded directly in the resource, executed within Envoy with no module distribution required. Best for simple header manipulation, logging, and conditional logic. Applied to Layer 7 (HTTP) traffic only. WebAssembly plugins -- Proxy-Wasm sandbox modules loaded dynamically from OCI image registries. Supports multiple languages (Go, Rust, C++, AssemblyScript) and is recommended for complex processing, policy enforcement, telemetry collection, and payload mutations. Applied to Layer 7 (HTTP) or layer 4 (TCP) traffic. See the TrafficExtension concepts page for detailed guidance on choosing between Lua and Wasm for your use case. Writing extensions Lua Lua scripts are written inline. The following example reads an x-number request header, computes whether the value is even or odd, and adds an x-parity response header: apiVersion: extensions.istio.io/v1alpha1 kind: TrafficExtension metadata: name: parity namespace: istio-system spec: selector: matchLabels: istio: ingressgateway lua: inlineCode: | function envoy_on_request(request_handle) local number = tonumber(request