Welcome to my blog post — “Beyond Sidecar: A Deep Dive into Istio Ambient Mode Traffic Mechanism and Cost Efficiency.”
This post is based on my talk at KCD Beijing and focuses on Istio’s newly introduced data plane model — Ambient Mode. Its core idea is to remove the Sidecar proxy to reduce resource overhead and operational complexity.
In this article, I’ll explain Ambient Mode’s background, core components, traffic routing mechanisms, and a comparison with the existing Sidecar model. The goal is to help you evaluate this new feature and confidently adopt it.
Click here to view the slides.
Let’s start with a question: why should we care about—or even consider adopting—this new mode? Sidecar proxies have been working well in service meshes for years, so why remove them now?
To answer that, let’s look at some of the challenges service meshes currently face.
Thought exercise: Is there a way to retain the core capabilities of a service mesh—security, observability, traffic control—while reducing the per-Pod intrusion and extra resource consumption?
The architecture of service meshes has long been exploring different proxy deployment strategies, such as:
Each of these models has trade-offs in terms of functionality, security, performance, and operational complexity. Istio Ambient Mode is a new attempt to address the Sidecar model’s overhead and operational burdens.
The following table provides a quick comparison of some common service mesh deployment models:
Mode | Security | Efficiency | Manageability | Performance |
---|---|---|---|---|
Sidecar | High isolation via per-Pod proxy | High resource usage | Centralized but complex | Adds some latency |
Ambient | Security via ztunnel (still evolving) | More efficient, shared | Easier to manage, still maturing | Good; cross-AZ traffic may add overhead |
Cilium mesh | Moderate, kernel-based with eBPF | Kernel-level efficiency | Complex to configure | Depends on use case |
gRPC | App-integrated, depends on the app | Efficient | Complex upgrade management | Low latency, ideal for real-time use |
Let’s now move into the second part of our discussion, where we’ll explore the core components of Ambient Mode, including ztunnel, Waypoint Proxy, and the role of Istio CNI.
ztunnel (L4)
Waypoint Proxy (L7)
Istio CNI
istio-init
container and handles traffic redirectionIn Ambient Mode, the Istio data plane is split into two layers:
The control plane is still managed by Istiod, which distributes configurations and certificates to both ztunnel and Waypoint proxies.
istio-init
container, simplifying the installation processiptables REDIRECT
rules inside the Pod’s network namespaceThe following diagram illustrates how Istio CNI integrates with Kubernetes network plugins like Calico or Cilium. Istio CNI modifies the node’s CNI configuration by appending itself to the CNI chain. After Kubernetes assigns a Pod IP, Istio CNI executes its interception logic and injects traffic redirection rules into the Pod’s network namespace.
It applies different iptables
rules depending on whether the Pod runs in Sidecar or Ambient mode, forming a chained CNI workflow that complements—rather than conflicts with—the existing network policies.
The following diagram illustrates in detail what the Istio CNI does when a Pod starts:
After understanding the components, let’s dive into the heart of Ambient Mode: the traffic path. How do zTunnel and Waypoint intercept and forward traffic? We’ll examine this through the lens of transparent traffic interception and the HBONE protocol.
In Ambient Mode, Istio CNI injects iptables rules into each Pod’s network namespace to transparently intercept outbound traffic and redirect it to the local ztunnel process on the node. zTunnel then decides whether to forward traffic at L4 or send it to the Waypoint Proxy for L7 processing.
As shown in the diagram, when Kubelet starts a Pod on the node, this event is observed by the Istio CNI Agent. The agent enters the Pod’s network namespace, sets up iptables rules to redirect traffic to a local socket, and passes the Pod’s file descriptor (FD) to zTunnel. Once zTunnel receives the FD, it creates a socket within the Pod’s namespace.
When the Pod sends traffic, it normally would go directly to the destination address. But because of the iptables rules, the traffic is intercepted and redirected to the local zTunnel process. zTunnel then determines whether the traffic needs L7 processing via Waypoint:
In Ambient Mode, ztunnel and Waypoint Proxy use the HBONE (HTTP/2 + CONNECT) protocol to establish a secure tunnel. This enables mTLS encryption and multiplexing, reducing connection overhead and simplifying proxy forwarding logic.
Below is a simplified example of an HBONE CONNECT request, which uses headers like x-envoy-original-dst-host
and x-istio-auth-userinfo
to pass routing and authentication context:
:method: CONNECT
:scheme: https
:authority: Pod_B_IP:9080
:path: /api/v1/users?id=123
x-envoy-original-dst-host: Pod_B_IP:9080
x-forwarded-proto: hbone
x-istio-attributes: ...
...
In this example, assume ztunnel A is sending traffic to node B. The outer TCP connection is actually from ztunnel_A_IP:52368
to Node_B_IP:15008
, where port 15008 is the HBONE listener on the destination node.
At the HTTP/2 layer, a CONNECT request is initiated. The :authority
field shows Pod_B_IP:9080
, indicating the actual destination port of Pod B. The x-envoy-original-dst-host
header carries the same target.
You’ll also notice custom headers like x-forwarded-proto
and x-istio-attributes
, which carry routing context and security metadata for the receiving ztunnel or downstream proxy.
Think of this as an “inner tunnel” built on top of HTTP/2 CONNECT: the application-layer request (e.g., /api/v1/users?id=123
) is encapsulated inside, then unpacked by ztunnel B and forwarded to Pod B.
This entire process is transparent to the application. But by inspecting the CONNECT headers, we gain insight into how Ambient Mode performs traffic routing and identity verification at the HTTP/2 layer. This flexibility makes HBONE a more adaptable alternative to traditional Sidecar-to-Sidecar communication, especially for implementing mTLS and L7 extensions.
If the source Pod and destination Pod happen to be on the same node, traffic goes through the ztunnel’s L4 encryption path.
As shown here, ztunnel is deployed as a DaemonSet on each node and runs in the host network, sharing the host’s network namespace. Istio CNI intercepts the Pod’s outbound traffic and redirects it to ztunnel’s port 15001. When both the source and destination Pods are on the same node, ztunnel performs encryption and decryption internally and directly forwards the traffic to the destination Pod.
If L7 traffic handling is required (e.g., authentication), ztunnel establishes an HBONE tunnel with the Waypoint proxy, and traffic is routed through the Waypoint before reaching the destination Pod.
This is the cross-node scenario, which is also the most common case:
The source node’s ztunnel encrypts the traffic via an HBONE tunnel and sends it to the destination node’s ztunnel. The destination ztunnel decapsulates the traffic and forwards it as plaintext to the destination Pod. As long as the traffic remains purely L4 and does not require L7 features, it avoids additional hops through a Waypoint proxy—reducing the proxy chain and improving efficiency.
When L7 processing is required, the traffic passes through an additional Waypoint proxy, following this flow:
This process adds one extra proxy hop compared to L4-only traffic, but the benefit is that only traffic requiring L7 handling goes through this additional step—reducing unnecessary overhead.
For traffic originating outside the Istio mesh that tries to access a Pod directly via its IP and port, Istio still needs to ensure such traffic is intercepted and managed by ztunnel to prevent it from bypassing the mesh.
If the traffic targets an application port, ztunnel checks whether the packet includes the 0x539
mark. If not, it redirects the traffic to port 15006
, a plaintext port monitored by ztunnel. After processing, ztunnel adds the 0x539
mark and forwards it to the application port.
If the destination port is 15008
, the packet is treated as HBONE traffic and directly handled by ztunnel.
Traffic Type | Processing Location | Example Scenarios |
---|---|---|
L4 | ztunnel (transparent forwarding) | TCP-level traffic that does not require application-layer policies |
L7 | ztunnel → Waypoint Proxy | HTTP/gRPC traffic requiring advanced features like auth, routing, observability, etc. |
For most traffic that only needs encryption and forwarding at the TCP layer, Ambient Mode relies solely on ztunnel
. Only when HTTP-layer policies are required does the traffic get routed through the Waypoint proxy.
Now that we understand Ambient Mode, it’s important to compare it with the traditional Sidecar model to evaluate which scenarios best fit each and what gaps remain.
Compared to the traditional Sidecar model, Ambient Mode still has some limitations:
EnvoyFilter
) to individual Pods.Criteria | Sidecar Mode | Ambient Mode |
---|---|---|
Proxy Location | Each Pod runs its own Envoy sidecar | Node-level ztunnel + optional Waypoint Proxy |
Resource Overhead | Higher CPU/memory usage, especially in large-scale environments | Lower overhead; proxies are shared at the node/namespace level |
Operational Complexity | Sidecar upgrades require rolling restarts of all affected Pods | Upgrades are centralized to a few components (ztunnel/Waypoint) |
Performance | Strong per-Pod isolation but added proxy cost per Pod | Better L4 performance; L7 adds one more forwarding hop via Waypoint |
Feature Completeness | Mature and stable; supports multi-cluster, VMs, and hybrid networks | Still evolving; multi-network, and VM support are under development |
Typical Scenarios | Scenarios requiring strict isolation or custom EnvoyFilter /WASM |
Large-scale clusters, lightweight management, mostly L4 traffic |
Let’s wrap up with a summary of Ambient Mode’s pros, cons, and where it fits best.
You can find more cloud-native articles and practical insights on my blog at jimmysong.io. If you have any questions about this post or Istio in general, feel free to leave a comment or join the community discussion. Thank you!
Last updated on Mar 22, 2025