Skip to content

Service Mesh Load Testing: Measure Sidecar and Policy Overhead

Service mesh load testing shows what proxies, mTLS, retries and policy add per hop. Measure mesh on vs off, size sidecars and catch retry storms.

Service A, sidecar, sidecar, service B call chain with per-hop overhead stacking, and a mesh-on versus mesh-off latency comparison labelled illustration

Service mesh load testing measures what the proxy layer adds to each call and how its policies behave under pressure. Run the same workload at the same arrival rate with the mesh on and off, then repeat with your real mTLS, retry, timeout and telemetry settings, and compare latency percentiles and CPU. The mesh is in the path of every request, so its cost compounds across a call chain.

A mesh is infrastructure you change once and every service inherits. That makes a load test of it unusually valuable. A small per-hop cost looks harmless in a single-service test and becomes visible only on a path with several services.

Prerequisites

You need three things before you start:

  • A cluster where you control mesh injection, so you run the same services with and without proxies.
  • Metrics for sidecar CPU, throttling and memory, plus the mesh’s own latency metrics.
  • A load generator with an arrival-rate model that reaches your entry point.

What a mesh adds to each hop

In a sidecar mesh, each pod runs a proxy next to the application. A call from service A to service B leaves A’s application, passes through A’s sidecar, crosses the network, passes through B’s sidecar and then reaches B’s application. Compared with a direct call, that adds two proxy traversals and two extra local connections.

Inside those proxies, several features consume time and CPU:

  • mTLS. Establishing and encrypting connections between sidecars costs CPU. Connection reuse limits the handshake cost, but encryption applies to every byte.
  • Retries and timeouts. The proxy tracks per-request state to apply them.
  • Telemetry. Metrics, access logs and trace headers are generated per request. Verbose access logging on a busy path costs more than routing does.
  • Policy. Authorization checks and rate limits run on the request path.

The cost per hop is small relative to a database query and large relative to a cache hit. It compounds: a request that crosses five services passes through ten proxy traversals. Tail latency follows the same pattern. Even if each proxy adds a little at p50, the slowest proxy on a path sets the pace at p99, as discussed in tail latency and fan-out.

Some meshes offer ambient or sidecarless modes, where a node-level proxy handles part of the traffic instead of a per-pod sidecar. The same questions apply: measure the added latency, the CPU and memory cost, and how policies behave under load, in the mode you plan to run.

Measure the overhead

The cleanest comparison removes one variable at a time.

Mesh on versus off. Deploy the same services in two namespaces or two environments, one with proxies injected and one without. Use identical resources, versions and data. Send the same arrival rate to both and compare percentiles. The difference is the cost of the mesh in its current configuration.

Feature by feature. Start with the mesh in its minimal configuration, then enable mTLS, then telemetry, then policy, running the same load each time. This shows which feature accounts for the cost, which is often not the one you expected.

Hop count. Test a path with one downstream call and a path with four. If overhead grows with the number of hops, you have confirmed the compounding effect on your own topology.

Use an open arrival rate rather than a fixed number of virtual users. A closed model slows down when the mesh slows down, which hides the latency you want to see.

Size the sidecar

A sidecar has its own CPU and memory requests and limits. When the proxy hits its CPU limit, the kernel throttles it. Requests queue inside the proxy, and the application reports high latency while its own container looks idle. The symptom resembles a slow application, which is why the cause is easy to miss.

During a test, watch for these signals on the proxy container separately from the application container:

  • CPU usage against its limit and CPU throttling counters
  • memory usage and restarts
  • connection counts and the proxy’s own queue or pending request metrics
  • latency measured by the proxy versus latency measured by the application

If the proxy’s measured latency is much higher than the application’s, the time is going into the proxy. Raise the limit, reduce per-request work such as access logging, or reconsider the resource model, then run the test again to confirm.

Retries, timeouts and retry storms

A mesh retries failed requests and enforces timeouts without any application code. That is useful, and it interacts with whatever retries the application already does. If the application retries three times and the mesh retries twice at each of three hops, one failure becomes dozens of requests against a dependency that is already struggling.

Test this on purpose. Slow or fail one downstream service and observe request volume at that service, not only at the entry point. If volume rises well beyond the offered load, retry layers are multiplying. Retry storms under load describes how to inject the fault and measure the amplification. Also check that timeouts decrease down the chain, so an inner call does not outlive the caller’s deadline and keep doing work nobody waits for.

Circuit breaking and outlier detection

Meshes eject an unhealthy instance from the pool or limit concurrent requests to a service. Under load, test whether these controls behave as you intend:

  • Does ejection happen when one instance is slow, and how long does it take?
  • Does the remaining pool absorb the traffic or collapse under the shifted load?
  • Does a limit on pending requests return errors early enough to protect the service, and do callers handle those errors?
  • Do ejected instances return to the pool too soon and cause a flapping pattern?

Fault a single instance during steady load and watch the error rate, latency and per-instance request counts together.

Control plane at scale

The control plane pushes configuration to the proxies. In a large cluster, a burst of changes such as a rolling deployment or a mass scale-up causes many pushes at once. While a push is in flight, proxies carry stale endpoint lists and send requests to pods that no longer exist. Test this by scaling a workload up and down, or rolling a deployment, during steady load. Watch for error spikes, configuration propagation delay reported by the mesh, and control plane CPU and memory.

A test plan

  1. Pick two or three real call paths. Choose one short path and one deep path, with traffic that matters to users.
  2. Build two comparable environments. One has proxies, one does not, with the same versions, data and resources.
  3. Set the load shape. Use a constant arrival rate, a warm-up and a hold long enough for stable p99.
  4. Run the baseline without the mesh. Record p50, p95, p99, throughput, errors and CPU.
  5. Run with the minimal mesh. Repeat at the same rate. Compute the difference.
  6. Enable features one at a time. Add mTLS, telemetry and policy, with a run after each.
  7. Watch the sidecars. Record CPU throttling, memory and proxy-measured latency per proxy.
  8. Step the rate up. Find where each configuration crosses your latency target.
  9. Inject faults. Slow one dependency, fail one instance, and measure retry volume and outlier detection.
  10. Disturb the control plane. Roll a deployment and scale a workload during steady load.
  11. Compare against criteria. Decide pass or fail using the thresholds below.

Worked example with hypothetical numbers

The numbers here illustrate how to read a result. They are not measurements.

A checkout path crosses four services. The team runs it at a constant 800 requests per second.

Configurationp50p95p99Sidecar CPU vs limit
No mesh38 ms70 ms110 msnot applicable
Mesh, mTLS only41 ms76 ms124 ms35%
Mesh, mTLS, full telemetry and policy46 ms92 ms190 ms88%

Reading it: mTLS alone adds a modest amount. Telemetry and policy add much more at p99, and sidecar CPU is near its limit. The team checks the throttling counter and finds the proxy on the busiest service is throttled during the hold. They lower access log verbosity, raise that proxy’s CPU limit and rerun. In this hypothetical, p99 drops to 145 ms and throttling disappears. The conclusion is specific: the mesh was acceptable once configured for this traffic, and the default proxy limits were not.

Failure criteria

Agree these before the run so the result is a decision, not an opinion.

  • p95 and p99 of each tested path stay under the latency target at the expected peak rate.
  • Mesh overhead at p99 stays under an agreed percentage of the no-mesh baseline.
  • No sidecar shows sustained CPU throttling or restarts during the hold.
  • Retry volume at a degraded dependency stays under an agreed multiple of offered load.
  • Outlier detection ejects the faulted instance within an agreed time, and the remaining pool keeps error rate under its limit.
  • Error rate during a rolling deployment stays under its limit.

Troubleshooting

  • Mesh-on and mesh-off runs differ in more than the proxy. Check versions, resource requests and data. Fix the environments before you trust the delta.
  • Latency rises while application CPU is idle. Look for sidecar CPU throttling.
  • Request volume at a dependency exceeds offered load. Count the retry layers on the path.
  • Errors spike during a rollout. Check configuration propagation delay and stale endpoints.

Run it in MaxoPerf

Generate the load with a script that calls your real entry point, for example the gateway or the first service on the path, and set failure criteria on latency percentiles and error rate so each run returns a verdict. Failure criteria and pass/fail gates shows the setup. Run the mesh-on and mesh-off tests with the same load profile and compare them in the run comparison view described in comparing runs and baselines. The RPS-controlled throughput cookbook covers a fixed request rate.

If the services are only reachable inside the cluster network, install a private datacenter agent in that network and select it as the test location, so load enters from the same side as internal callers. Sidecar CPU, throttling and control plane metrics come from your own monitoring, so keep those dashboards open during the run, and use distributed tracing to see which hop holds the time. For the wider plan around service-level tests and end-to-end journeys, see how to load test microservices.

Questions this article answers

How much latency does a service mesh add?

It depends on the proxy, the enabled features, the payload and the hop count, so no single figure applies. Each hop through a proxy adds some processing and a network traversal, and the cost compounds across a call chain. Measure it by running the same load with the mesh on and off.

How do you load test Istio or another service mesh?

Run the same workload at the same arrival rate with and without the proxies, compare latency percentiles and CPU, then repeat with your real policies enabled. Add fault and retry scenarios to see how mesh timeouts, retries and outlier detection behave under load.

Why does sidecar CPU throttling cause application latency?

The sidecar sits on the request path. If its container hits its CPU limit, the kernel throttles it, requests queue in the proxy, and the application looks slow even though the application container is healthy. Watch throttling metrics on the proxy container during the test.

Do mesh retries and application retries cause a retry storm?

Yes. If the application retries a failed call and the mesh also retries it at each hop, one failure multiplies into many requests against a struggling service. Count the retry layers on each path and test a degraded dependency to see the amplification.