Skip to main content

Sidecar Proxy

A sidecar proxy is a proxy container that runs in the same pod as an application and transparently handles all of its inbound and outbound traffic. In a service mesh it enables mTLS, retries, routing, and metrics without any application code changes.

What it does

The sidecar shares the pod's network namespace. Traffic redirection rules (iptables or eBPF) send everything through the proxy, so the application sends and receives plain traffic while the proxy handles encryption, policy, and telemetry.

flowchart LR X["Remote caller"] -->|"mTLS in"| S["Sidecar proxy"] S -->|"plain HTTP"| A["App container"] A -->|"plain HTTP"| S S -->|"mTLS out"| Y["Remote service"] subgraph Pod["One pod"] S A end classDef proxy fill:#DBEAFE,color:#1E293B classDef app fill:#D1FAE5,color:#1E293B classDef ext fill:#475569,color:#ffffff class S proxy class A app class X,Y ext

An analogy: a secretary outside every meeting room who checks credentials, logs each letter, and holds back traffic if the room is overloaded, while the people inside carry on as normal.

What it provides

  • mTLS, identity, and authorization checks.
  • Retries, timeouts, and circuit breaking.
  • Request metrics and traces.
  • Traffic routing and splitting.

Implementations

Mesh Proxy
Istio Envoy
Linkerd Rust micro-proxy

Trade-offs

Every pod now runs an extra container, so CPU and memory overhead multiply across the fleet, and each call adds extra proxy hops. Startup ordering also matters. Kubernetes native sidecar containers, which became stable in 1.33, run an init container with restartPolicy: Always to start before and stop after the app container.

Remember

The collection of all sidecars is the data plane. The control plane only supplies their configuration.

Common Mistake

Sizing application resource requests but not the sidecar's. At fleet scale, proxy overhead can be a large share of cluster capacity.

Frequently Asked Questions

How is a sidecar proxy different from a reverse proxy like Nginx?

A sidecar runs inside each pod and transparently intercepts that pod's traffic, so the app does not need to be reconfigured. A reverse proxy is a separate network hop that traffic must be explicitly routed through.

What cost do teams underestimate?

Per-pod CPU and memory overhead multiplied across the fleet, plus added latency in deep call chains. Ambient mode and lighter proxies reduce this.

Does the app know the sidecar exists?

No. Traffic interception is transparent, which is why no code or library changes are needed.

Found a mistake, an outdated step or a broken link?