How do Istio sidecar and ambient mode data planes work?
A mesh moves transport security and traffic policy out of application code. It issues each workload a cryptographic identity, encrypts service-to-service traffic with mutual TLS, enforces authorization against those identities, and emits consistent telemetry, without changing any service. Sidecar and ambient mode deliver these through different proxy placements.
Sidecar mode injects an Envoy proxy into every pod. Traffic redirection sends all inbound and outbound connections through that proxy. Envoy handles L4 and L7 together: mTLS, retries, header-based routing and HTTP authorization. Every pod pays for a full L7 proxy whether it uses those features or not.
Ambient mode splits the work. A per-node ztunnel handles L4: mTLS, identity, L4 authorization and basic TCP telemetry. Workloads that need L7 features get an Envoy-based waypoint proxy, deployed per namespace or per service account and shared by the workloads it serves.
Sidecar: App A -> [Envoy A] ======mTLS======> [Envoy B] -> App B
(in pod) (in pod)
Ambient L4: App A -> [ztunnel node1] ==mTLS==> [ztunnel node2] -> App B
Ambient L7: App A -> [ztunnel node1] ==> [waypoint, maybe node3]
==> [ztunnel node2] -> App B
| Aspect | Sidecar | Ambient |
|---|---|---|
| L4 proxy | Envoy per pod | ztunnel per node |
| L7 proxy | Same Envoy per pod | Optional shared waypoint |
| Proxies per L7 request | Two (client and server sidecar) | Two ztunnels plus one waypoint |
| Upgrade impact | Pod restart | Node agent or waypoint rollout |
Neither mode is faster in general. The cost difference comes from how many proxies exist, where they run, and which requests have to pass through an L7 proxy.
SIDECAR: Envoy in every pod handles L4 + L7 (2 proxies per request)
+------ node1 ------+ +------ node2 ------+
| +---- pod A ----+ | | +---- pod B ----+ |
| | App A->Envoy | |==== mTLS ===>| | Envoy->App B | |
| +---------------+ | | +---------------+ |
+-------------------+ +-------------------+
AMBIENT L4: per-node ztunnel, mTLS + L4 authz (2 proxies per request)
+------ node1 ------+ +------ node2 ------+
| pod A: App A | | pod B: App B |
| | | | ^ |
| [ztunnel] |==== mTLS ===>| [ztunnel] |
+-------------------+ +-------------------+
AMBIENT L7: ztunnels + shared waypoint, maybe on another node (3 proxies)
+------ node1 ------+ +------ node2 ------+
| pod A: App A | | pod B: App B |
| | | | ^ |
| [ztunnel] | | [ztunnel] |
+-----|-------------+ +-----------^-------+
| mTLS mTLS |
| +-- node3 (any node) --+ |
+------>| waypoint Envoy (L7) |---------+
| HTTP authz, routing |
+----------------------+
Request paths in each mode: two in-pod Envoy sidecars, a ztunnel-to-ztunnel mTLS hop for ambient L4, and an extra waypoint Envoy hop for ambient L7 that may run on a different node.
Why does sidecar memory scale with pod count, and how much does ambient save?
Each sidecar is a full Envoy that receives its own copy of the mesh configuration: listeners, routes, clusters and endpoints for every service it is allowed to reach. Without scoping, that set grows with the service registry, so adding services raises memory in every existing pod. The cost then multiplies by replica count. The scheduler reserves resource requests per pod regardless of actual use, so an idle replica still holds node capacity. Ambient moves L4 work into one ztunnel per node and L7 work into waypoints that you deploy only where you need them.
Formula: sidecar reservation = pods × sidecar request. Ambient reservation = (nodes × ztunnel request) + (waypoint replicas × waypoint request).
Illustrative estimate (assumed numbers, not a benchmark). Assume 500 pods on 20 nodes, a sidecar request of 100m CPU / 128Mi, a ztunnel request of 200m / 256Mi, and a waypoint request of 200m / 256Mi per replica.
| Scenario | Proxy count | CPU reserved | Memory reserved |
|---|---|---|---|
| Sidecars at 100m / 128Mi | 500 | 50,000m | 64,000Mi |
| Sidecars at 50m / 64Mi | 500 | 25,000m | 32,000Mi |
| Ambient, 3 waypoints | 20 + 3 | 4,600m | 5,888Mi |
| Ambient, 30 waypoints | 20 + 30 | 10,000m | 12,800Mi |
| Ambient, waypoint per service account (150 × 2 replicas) | 20 + 300 | 64,000m | 81,920Mi |
The last row shows that ambient's savings depend on how many waypoints you run. If you deploy a waypoint for every service account, the total can match or exceed the sidecar reservation. Use your own requests, node count and waypoint layout in the formula. The method is the useful part; these numbers only show how to apply it.
How do latency and control plane load differ between the two modes?
In sidecar mode, every request between two meshed pods passes through two full Envoy proxies: the client's sidecar handles outbound routing, and the server's sidecar handles inbound policy. Each one terminates or originates mTLS and parses HTTP, even when your policies only need L4 identity. Ambient L4 traffic takes a lighter path. The source node's ztunnel opens an mTLS tunnel (HBONE) to the destination node's ztunnel, and neither one parses HTTP. Adding a waypoint for L7 policy puts an Envoy hop back in the path. Because a waypoint is a separate deployment, it may run on a different node from both the client and the server, which can add a network round trip that sidecars never incurred.
Which mode is faster depends on payload size, connection reuse, node placement and whether you need L7. Published comparisons use someone else's traffic shape, so measure p50 and p99 on your own requests. Tail latency is where waypoint placement and proxy CPU contention show up first.
The control plane picture changes too. By default, istiod computes and pushes xDS configuration to every sidecar, and each sidecar receives routes for every service in the mesh. In ambient mode, istiod pushes to one ztunnel per node plus however many waypoints you run, which is usually far fewer endpoints.
Sidecar mode has two built-in ways to reduce this load:
- Sidecar resource: restricts each workload's egress hosts to the services it actually calls, which shrinks the configuration each proxy receives.
- Discovery selectors in mesh config: limit which namespaces istiod watches at all.
Combined with proxy resource requests sized from observed usage, these settings close much of the memory and push-load gap before any migration. Apply them first, then compare the two modes.
# 1) Namespace-wide Sidecar resource: proxies in 'checkout' only receive
# config for services they actually call, not the whole mesh.
apiVersion: networking.istio.io/v1
kind: Sidecar
metadata:
name: default # no workloadSelector, so it applies to the whole namespace
namespace: checkout
spec:
egress:
- hosts:
- "./*" # services in the same namespace
- "payments/*" # the one upstream namespace checkout depends on
- "istio-system/*" # control plane and gateways
---
# 2) Install-time mesh config: istiod only watches labeled namespaces,
# and sidecar requests are sized from observed usage, not defaults.
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
name: control-plane
namespace: istio-system
spec:
meshConfig:
discoverySelectors:
- matchLabels:
istio-discovery: enabled # label only namespaces that belong in the mesh
values:
global:
proxy:
resources:
requests:
cpu: 50m # placeholder: set from your measured p95 usage
memory: 64Mi # placeholder: set from your measured p95 usage
A namespace-scoped Sidecar resource limits which hosts each proxy receives config for, while discoverySelectors and right-sized proxy requests reduce istiod push load and sidecar memory before any comparison with ambient mode.
What operational and engineering-time costs sit outside CPU and memory?
…weigh the costs that never show up on a node dashboard.
In sidecar mode, the proxy's lifecycle is coupled to every application pod. Each proxy upgrade means restarting workloads, which in practice becomes a coordinated rollout across every team that owns a namespace. Startup and shutdown ordering adds its own work. Init containers that need the network can fail because traffic redirection is already in place but no proxy is running yet. Jobs can finish their work and then never complete because the sidecar keeps running. Kubernetes native sidecar support reduces these problems, but someone still has to find and fix the workloads that hit them.
Ambient mode removes most of that coupling. You can upgrade the data plane without restarting application pods. The tradeoff is that ztunnel runs as shared, node-level infrastructure. A bad ztunnel rollout affects every meshed pod on that node, so you need canary nodes and careful DaemonSet rollout settings.
| Concern | Sidecar | Ambient |
|---|---|---|
| Proxy upgrade | Restart every workload | Roll ztunnel per node, upgrade waypoints separately |
| Lifecycle bugs | Init containers, Jobs, shutdown ordering | Mostly gone |
| Debugging | One proxy's config and logs per pod | Path split across ztunnel and a waypoint, often on different nodes |
| Cost attribution | Proxy usage lands in the tenant's pod | Lands in shared pods and needs an allocation model |
| Failure domain | Single pod | Whole node (ztunnel) or every client of a waypoint |
Chargeback gets harder in ambient mode. A noisy service's encryption and L7 processing shows up in ztunnel or waypoint pods that you share with other teams, not in its own namespace. Finally, budget engineering time for the migration itself: running mixed-mode clusters, re-validating policies, and retraining on-call engineers to debug the new path.
Which features need a waypoint, and how does L7 policy placement change?
In ambient mode, ztunnel handles only L4: mTLS, workload identity, and TCP-level authorization based on source identity, namespace, and port. Anything that requires parsing HTTP needs a waypoint proxy. That includes path- and header-based routing, retries, timeouts, fault injection, traffic splitting, and authorization rules that match on methods, paths, or headers. Ztunnel never decodes the application protocol, so it cannot enforce these rules.
This changes where policy attaches. In sidecar mode, an AuthorizationPolicy with a selector is enforced by the destination workload's own proxy, so the policy lives next to the code it protects. In ambient mode, L7 policy attaches to the waypoint through targetRefs, which reference the waypoint's Gateway resource or a Service. A selector-based L7 policy aimed at an ambient workload with no waypoint will not be enforced as written. Audit existing policies before you migrate.
A typical setup is:
- Deploy a waypoint with
istioctl waypoint apply -n <namespace>. - Label the namespace with
istio.io/use-waypointso its traffic routes through that waypoint. - Create an
AuthorizationPolicywhosetargetRefspoint at the waypointGateway.
The security boundary also moves. A sidecar holds only its own workload's certificate, inside that workload's pod. Ztunnel is a per-node DaemonSet that holds credentials for every ambient workload scheduled on that node. If ztunnel is compromised, every identity on the node is exposed. Security reviewers should evaluate that trust model explicitly rather than assume it matches the sidecar model.
Feature coverage and CNI interactions differ between Istio releases. Check the documentation for your version instead of relying on a fixed list.
# Enroll the namespace in ambient mode so ztunnel handles L4 (mTLS, identity).
kubectl label namespace bookinfo istio.io/dataplane-mode=ambient
# Deploy a waypoint proxy for the namespace. The default name is "waypoint".
istioctl waypoint apply -n bookinfo
# Route the namespace's traffic through that waypoint so L7 rules can be enforced.
kubectl label namespace bookinfo istio.io/use-waypoint=waypoint
# Attach an L7 policy to the waypoint's Gateway with targetRefs, not a selector.
# A selector-based L7 policy on an ambient workload with no waypoint is not enforced as written.
kubectl apply -f - <<'EOF'
apiVersion: security.istio.io/v1
kind: AuthorizationPolicy
metadata:
name: productpage-get-only
namespace: bookinfo
spec:
targetRefs:
- kind: Gateway
group: gateway.networking.k8s.io
name: waypoint
action: ALLOW
rules:
- from:
- source:
# Identity comes from mTLS, which ztunnel terminates and the waypoint sees.
principals: ["cluster.local/ns/bookinfo/sa/frontend"]
to:
- operation:
# Method and path matching need HTTP parsing, which only the waypoint does.
methods: ["GET"]
paths: ["/productpage*"]
EOF
Enrolls a namespace in ambient mode, deploys and enables a waypoint for it, and attaches an L7 AuthorizationPolicy to the waypoint Gateway with targetRefs so that method and path rules are enforced.
When should you choose ambient mode, and when should you avoid it?
Start from the traffic profile of your workloads. Ambient pays off when most services need only mTLS, identity-based authorization, and L4 telemetry. In that case, you stop paying for an Envoy in every pod and deploy waypoints only for the few namespaces that need L7 handling. If nearly every service needs retries, header-based routing, or request-level authorization, you end up with waypoints in front of almost everything. That shrinks the resource savings and adds a hop that a sidecar would have handled inside the pod.
| Situation | Better fit | Why |
|---|---|---|
| Mostly mTLS and L4 policy | Ambient | No per-pod proxy memory |
| L7 features on nearly every service | Sidecar | Waypoints would be everywhere anyway |
| Per-workload Envoy tuning or filters | Sidecar | Waypoints are shared, so customization is coarser |
| Tooling or runbooks assume a proxy container | Sidecar | Avoids rewriting debugging and injection workflows |
| Low tolerance for node-wide blast radius | Sidecar | A ztunnel fault affects every meshed pod on that node |
Also avoid ambient if your team has no operating experience with its newer components, or if you depend on integrations nobody has verified against it. Examples include custom CNI chains, security agents, and observability pipelines that expect a sidecar.
Migration is not the only way to cut overhead. Scoping each sidecar's configuration to the services it actually calls, and setting proxy resource requests from observed usage, can recover much of the waste.
If you do migrate, both modes can run in the same cluster. Enroll one namespace at a time, check its policy and telemetry, then move on to the next.
How can you measure service mesh overhead in your own cluster?
Start with what the cluster is already spending. kubectl top pods --containers breaks usage down per container, so in a sidecar namespace you can isolate the istio-proxy rows from the application containers. In ambient mode the overhead lives elsewhere. Check the ztunnel DaemonSet pods, which typically run in the Istio system namespace and serve every enrolled pod on their node. Also check any waypoint deployments in your application namespaces. kubectl top shows only a point-in-time snapshot, so pull the same series from your metrics stack over at least a full traffic cycle.
Then compare usage against requests. The scheduler reserves capacity based on requests, so a sidecar requesting several times what it uses costs you nodes even when it sits idle. Report both figures: the request gap shows waste you can recover through tuning, and the usage figure shows the true floor for each mode.
Run load tests three ways: with no mesh, in sidecar mode, and in ambient mode, with and without a waypoint. Use your real payload sizes, your real mix of long-lived and short-lived connections, and production-level concurrency. Record p50 and p99 for each run, because tail latency is where proxy hops and connection setup show up first.
To keep the comparison fair, run identical workload replicas on the same node type, with equivalent mTLS and policy configuration, in the same window. Don't compare a quiet namespace against a busy one.
Finally, replace the assumed inputs in the earlier cost model with these measurements. In most cases one afternoon of measurement resolves a debate that would otherwise run for weeks.
#!/usr/bin/env bash
# Snapshot mesh overhead in a sidecar namespace and an ambient namespace.
# Point-in-time only: confirm against your metrics stack over a full traffic cycle.
set -euo pipefail
SIDECAR_NS="shop-sidecar" # namespace with istio-injection enabled
AMBIENT_NS="shop-ambient" # namespace labeled istio.io/dataplane-mode=ambient
ISTIO_NS="istio-system" # where the ztunnel DaemonSet runs
echo "== Sidecar mode: istio-proxy actual usage (POD NAME CPU MEMORY) =="
kubectl top pods -n "$SIDECAR_NS" --containers | awk 'NR==1 || $2=="istio-proxy"'
echo "== Sidecar mode: istio-proxy requests (what the scheduler reserves) =="
# With native sidecars, istio-proxy may be listed under initContainers instead.
kubectl get pods -n "$SIDECAR_NS" -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.containers[?(@.name=="istio-proxy")].resources.requests.cpu}{"\t"}{.spec.containers[?(@.name=="istio-proxy")].resources.requests.memory}{"\n"}{end}'
echo "== Ambient mode: ztunnel usage (shared per node, not per pod) =="
kubectl top pods -n "$ISTIO_NS" -l app=ztunnel --containers
echo "== Ambient mode: ztunnel requests =="
kubectl get pods -n "$ISTIO_NS" -l app=ztunnel -o jsonpath='{range .items[*]}{.metadata.name}{"\t"}{.spec.nodeName}{"\t"}{.spec.containers[0].resources.requests.cpu}{"\t"}{.spec.containers[0].resources.requests.memory}{"\n"}{end}'
echo "== Ambient mode: waypoint usage, if any (default waypoint name assumed) =="
kubectl top pods -n "$AMBIENT_NS" --containers | awk 'NR==1 || $1 ~ /waypoint/'
# Feed both columns into the cost model: requests drive node count,
# usage is the floor you could tune requests down toward.
A read-only shell script that captures actual usage and requested resources for istio-proxy sidecars, ztunnel DaemonSet pods, and waypoint pods, which gives you both the request and usage inputs for the cost model.
How OneEnv can help
Disclosure: OneEnv is the product behind this blog.
OneEnv (oneenv.io) is a workspace-based governance platform for the things services share — environment variables, database structure, API routes and validation rules. A change to a shared value is staged on a branch, reviewed once, and then every affected service explicitly approves or rejects it before it goes live, so you can see who a change touches before it ships instead of finding out in production.
Applied to istio ambient vs sidecar, this is where it helps:
Saves time
- Every service that inherits a shared value is listed in one place, so nobody searches repos and chats to find out who is affected.
- One review per branch replaces coordinating each team separately; each service still keeps its own approve/reject.
- Reviewers see the exact diff and the list of affected services up front, so approval is a decision rather than an investigation.
Saves cost
- Fewer production incidents and rollbacks caused by a shared value, route or column changing under a consumer unannounced.
- Less duplicated configuration to maintain: one shared definition inherited by many services.
- Per-service approve/reject means a bad shared value can be refused where it would break something, before it is live.
- OneEnv has a free plan (1 workspace, unlimited services and members, full governance), so trying it costs nothing.
These are qualitative benefits, not measured results — how much you save depends on how many services share the value.
Want to try it? Start at oneenv.io.