What a Sidecar Costs, Only Those Who Measure Know
“The sidecar costs us too much.” or “It is negligible.” Two sentences from almost every mesh debate. Hardly anyone has measured them.
- Date
- Topic
- Sidecar costs
- Sources
- 3
- Reading time
- 2 min
- Version
- Translation
Even so, they end up in budget rounds and architecture decisions. Yet this can be measured with the tools you already have.
Figure as text
Diagram of the A/B load test for sidecar costs: a load generator sends the same load profile down two paths, a pod without sidecar injection and a pod with app container plus istio-proxy. For each path, p50, p95 and p99 as well as CPU and RAM per container are recorded; comparing both series of measurements yields the delta as the price of the sidecar. Below, three levers: capture separately, A/B under load, sidecar scoping. Punchline: without your own measurements, the loudest guess wins the budget round.
Capture separately. Collect resource metrics at container level, app container and proxy container individually. If you only see the pod total, you cannot put a number on the proxy’s share and are back to arguing about feelings.
What also counts in the calculation is what each proxy reserves via its Resource Requests. You pay for reserved capacity even when nobody uses it.
Latency via an A/B load test. The same workload, the same load profile, once with sidecar injection and once without. You compare percentiles, p50, p95, p99, never the average. The average tends to hide the outliers that you later end up discussing on an incident call.
And the biggest lever against memory hunger: sidecar scoping. Without scoping, every proxy carries the configuration of the entire mesh around with it, everyone knows everyone. Incidentally, it is also a security setting (report #6), but here the RAM is what counts.
I am deliberately not giving any blanket figures. Sidecar costs depend on your traffic profile and on how much configuration each proxy drags along. Any blanket figure from a LinkedIn post would be gut feeling, just with a decimal place.
Without your own measurements, the loudest guess wins the budget round.
One catch remains: measurements are almost always taken in staging. The next Field Report explains why the numbers are worth the least there, of all places. Short version: staging lies.