Course contentsShow
← System Design
Lesson 831 of 1,91922. Service MeshFree lesson

Transparent vs Explicit Proxying

How service meshes can intercept traffic transparently using iptables or require explicit proxy configuration.

Transparent vs Explicit Proxying

What you'll learn: How service meshes can intercept traffic automatically or require manual configuration to route requests through proxies.

The Core Idea

When a service mesh uses sidecar proxies to manage network communication, there are two ways those proxies can intercept traffic between services:

Transparent proxying automatically captures all outbound network traffic from your application without any code changes. The service mesh (often using iptables rules in Linux) redirects network packets to the sidecar proxy invisibly. Your application code makes a normal HTTP call to another service, and the infrastructure silently routes it through the proxy first.

Explicit proxying requires your application to be configured to send traffic directly to the proxy. You must point your code at the proxy's address (like localhost:15001) instead of the destination service. The application knows it's using a proxy.

Analogy

Think of transparent proxying like an invisible mail sorting center: you address letters normally, but they're automatically routed through the center without you knowing. Explicit proxying is like being told "drop all your mail at this specific processing office" — you must consciously change where you send things.

Why It Matters

Transparent proxying is the most common approach in modern service meshes because it requires zero application changes. The mesh "just works" once deployed. However, it relies on low-level networking manipulation (iptables, eBPF) which adds complexity and platform dependencies.

Explicit proxying gives more control and is simpler to understand, but forces every application to be proxy-aware.

Key Takeaway: Transparent proxying uses infrastructure tricks like iptables to automatically intercept traffic, while explicit proxying requires applications to consciously route requests through the proxy — most service meshes prefer transparent mode for zero code changes.