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

Resource Consumption at Scale

Calculate memory and CPU requirements when deploying sidecars to hundreds or thousands of pods in a large cluster.

Resource Consumption at Scale

You'll learn: How to estimate and plan for memory and CPU overhead when a service mesh deploys sidecar proxies to hundreds or thousands of pods.

The Hidden Cost of Sidecars

When you deploy a service mesh, every pod gets a sidecar proxy—typically an Envoy instance. One proxy per pod doesn't sound expensive, but multiply that by 1,000 pods across your cluster and you've suddenly added significant resource overhead.

Calculating Resource Impact

Each sidecar proxy consumes:

  • Memory: 50-100 MB at idle, scaling up with connection count and configuration complexity
  • CPU: 0.1-0.5 cores during typical operation, spiking under heavy traffic

For a cluster with 500 application pods:

  • Memory overhead: 25-50 GB
  • CPU overhead: 50-250 cores

That's the equivalent of several dedicated servers just running proxies! In large enterprises with thousands of services, this can mean hundreds of additional nodes.

The Compounding Effect

Unlike application code that you deploy selectively, the mesh deploys sidecars everywhere. Even low-traffic services get the full proxy overhead. A small microservice handling 10 requests/minute still consumes 50+ MB for its sidecar.

This is why service mesh adoption requires careful capacity planning. You need to:

  1. Benchmark sidecar resource usage in your environment
  2. Calculate total overhead: (pods × memory_per_proxy) + (pods × cpu_per_proxy)
  3. Add 20-30% buffer for traffic spikes
  4. Evaluate whether mesh benefits justify the infrastructure cost

Key Takeaway: Service mesh sidecar proxies multiply resource consumption linearly with pod count—at scale, this can double your cluster's memory and CPU requirements, making capacity planning essential before adoption.