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

Service Mesh Performance Overhead

Understanding the latency and resource costs introduced by adding proxy hops to every service call.

Service Mesh Performance Overhead

What You'll Learn

You'll understand the real performance costs—latency and resource consumption—that come from routing every service call through sidecar proxies in a service mesh.

The Hidden Tax of Transparent Proxying

When you introduce a service mesh, every outbound and inbound request passes through a sidecar proxy (remember the pattern from lesson 828). This adds an extra network hop and processing step to every single service call. Instead of Service A talking directly to Service B, the path becomes: Service A → Proxy A → Proxy B → Service B (and back again for the response).

What This Costs You

Latency: Each proxy hop typically adds 1-5 milliseconds of latency. For a simple request-response, you're adding 2-10ms total. In a chatty system with many internal calls, this compounds quickly. A request that triggers five downstream calls might add 50ms or more.

CPU and Memory: Every sidecar proxy is a separate process consuming resources. In a cluster with 100 services across 500 pods, you now have 500 additional proxy containers running. Each might use 50-200MB of memory and require CPU for encryption, routing logic, metrics collection, and policy evaluation.

Network Bandwidth: The mesh control plane continuously pushes configuration updates to sidecars. Envoy proxies also collect detailed metrics on every request, generating significant observability data.

The Analogy

Think of it like adding airport security checkpoints between every office room in a building. Yes, you get better safety and tracking of who goes where, but employees spend more time walking through checks instead of doing their actual work.

Key Takeaway: Service meshes provide powerful features but aren't free—expect measurable increases in latency (2-10ms per call) and resource costs (memory/CPU per sidecar), which you must budget for when deciding if the operational benefits justify the overhead.