# Deep Dive into the Network Traffic Path of the Coexistence of Ambient and Sidecar

DevFeed: [Deep Dive into the Network Traffic Path of the Coexistence of Ambient and Sidecar](<https://devfeed.tech/articles/deep-dive-into-the-network-traffic-path-of-the-coexistence-of-ambient-and-sidecar-48777.md>)

Original publisher: [Read original article](<https://istio.io/latest/blog/2023/traffic-for-ambient-and-sidecar/>)

Author: Steve Zhang (Intel), John Howard (Google), Yuxing Zeng(Alibaba), Peter Jausovec(Solo.io)

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

Content type: article

Language: en

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

Topics: [istio](<https://devfeed.tech/topics/istio.md>), [service-mesh](<https://devfeed.tech/topics/service-mesh.md>), [software-architecture](<https://devfeed.tech/topics/software-architecture.md>), [Microservices](<https://devfeed.tech/topics/microservices.md>), [Network](<https://devfeed.tech/topics/network.md>)

Tags: [ambient](<https://devfeed.tech/tags/ambient.md>), [architecture](<https://devfeed.tech/tags/architecture.md>), [cni](<https://devfeed.tech/tags/cni.md>), [coexistence](<https://devfeed.tech/tags/coexistence.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [deployment](<https://devfeed.tech/tags/deployment.md>), [iptables](<https://devfeed.tech/tags/iptables.md>), [istio](<https://devfeed.tech/tags/istio.md>), [mesh](<https://devfeed.tech/tags/mesh.md>), [microservices](<https://devfeed.tech/tags/microservices.md>), [network](<https://devfeed.tech/tags/network.md>), [network-traffic](<https://devfeed.tech/tags/network-traffic.md>), [security](<https://devfeed.tech/tags/security.md>), [service-mesh](<https://devfeed.tech/tags/service-mesh.md>), [services](<https://devfeed.tech/tags/services.md>), [sidecar](<https://devfeed.tech/tags/sidecar.md>), [sidecar-injection](<https://devfeed.tech/tags/sidecar-injection.md>), [traffic](<https://devfeed.tech/tags/traffic.md>), [waypoint](<https://devfeed.tech/tags/waypoint.md>), [ztunnel](<https://devfeed.tech/tags/ztunnel.md>)

## AI overview

This deep dive explains how network traffic flows when Istio ambient and sidecar modes coexist. It covers traffic paths between services in the two modes and describes the Istio 1.18.2 implementation, including iptables redirection, ztunnel, waypoint proxies, and deployment configuration.

## Source excerpt

Ambient mode now uses in-Pod redirection to redirect traffic between workload pods and ztunnel. The method described in this blog is no longer needed, and this post has been left for historical interest. There are 2 deployment modes for Istio: ambient mode and sidecar mode. The former is still on the way, the latter is the classic one. Therefore, the coexistence of ambient mode and sidecar mode should be a normal deployment form and the reason why this blog may be helpful for Istio users. Background In the architecture of modern microservices, communication and management among services is critical. To address the challenge, Istio emerged as a service mesh technology. It provides traffic control, security, and superior observation capabilities by utilizing the sidecar. In order to further improve the adaptability and flexibility of Istio, the Istio community began to explore a new mode - ambient mode. In this mode, Istio no longer relies on explicit sidecar injection, but achieves communication and mesh management among services through ztunnel and waypoint proxies. Ambient also brings a series of improvements, such as lower resource consumption, simpler deployment, and more flexible configuration options. When enabling ambient mode, we don't have to restart pods anymore which enables Istio to play a better role in various scenarios. There are many blogs, which can be found in the Reference Resources section of this blog, that introduce and analyze ambient, and this blog will analyze the network traffic path in Istio ambient and sidecar modes. To clarify the network traffic paths and make it easier to understand, this blog post explores the following two scenarios with corresponding diagrams: The network path of services in ambient mode to services in sidecar mode The network path of services in sidecar mode to services in ambient mode Information about the analysis The analysis is based on Istio 1.18.2, where ambient mode uses iptables for redirection. Ambient mode