Quick revision
The short answer
A service mesh puts a proxy in the path of every service call, a data plane usually built on Envoy, and a control plane such as istiod that programs those proxies with routes, endpoints, certificates and policies over the xDS APIs. Without code changes, a Spring Boot service gets mutual TLS, per-request load balancing, retries and timeouts, traffic splitting and uniform metrics and traces. The cost is proxy memory and CPU, extra latency per hop, another complex system to operate and behaviour that is invisible from the code.
What to remember
In this answer, we saw that a mesh moves networking into the platform: Envoy proxies in the data plane carry the traffic, and a control plane such as istiod programs them over xDS and issues certificates. In the sidecar model, iptables redirects each pod's traffic through its proxy; ambient mode replaces sidecars with per-node ztunnels for layer 4 and optional waypoints for layer 7. An unchanged Spring Boot service gains mTLS, per-request balancing, retries, timeouts, traffic splitting and uniform telemetry, at the cost of proxy resources, extra latency, another system to run and behaviour hidden from the code, which is why mesh and application resilience settings must be coordinated.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
A service mesh puts a proxy in the path of every service call, a data plane usually built on Envoy, and a control plane such as istiod that programs those proxies with routes, endpoints, certificates and policies over the xDS APIs. Without code changes, a Spring Boot service gets mutual TLS, per-request load balancing, retries and timeouts, traffic splitting and uniform metrics and traces. The cost is proxy memory and CPU, extra latency per hop, another complex system to operate and behaviour that is invisible from the code.
Why this question is asked
Every microservice needs the same networking features: encryption, retries, timeouts, load balancing and telemetry. For years, Java teams added them through libraries such as Spring Cloud and Resilience4j, which works well until there are many services in many languages and every library upgrade becomes a project. A service mesh is the platform's answer. Interviewers ask about it because it is easy to describe in marketing terms and harder to explain in mechanics and costs. In this answer, we will recap the data plane and control plane, follow a call through the sidecars, look at the newer ambient mode, list what a Spring Boot service gains without changes, and then weigh the costs, including how mesh and application settings interact.
1A Quick Recap: Data Plane and Control Plane
A mesh has two halves. The data plane is the set of proxies that actually carry the traffic. In Istio, and in many other meshes, that proxy is Envoy, a high-performance layer 7 proxy; Linkerd uses its own lightweight proxy written in Rust. The control plane is the brain. In Istio it is a component called istiod, which watches Kubernetes for services, pods and mesh configuration, turns them into proxy configuration, and pushes it to every proxy. The protocol for that push is a family of APIs called xDS (listeners, routes, clusters, endpoints and secrets), which Envoy understands natively.
The control plane also acts as a certificate authority. It issues each workload a short-lived certificate whose identity is based on its Kubernetes service account, for example spiffe://cluster.local/ns/shop/sa/orders, and rotates it automatically, typically every day.
- Control plane (istiod)watches Kubernetes, issues certificates, pushes
xDSconfig - Sidecar proxy in the caller podoutbound: picks an endpoint, retries, starts mTLS
- Network between podsencrypted with mutual TLS
- Sidecar proxy in the callee podinbound: checks identity and policy, records metrics
- Spring Boot applicationsends and receives plain HTTP on localhost
5 layers, from the top down. Step through them one at a time.
The application never sees certificates or retries; its sidecar does.
2Following One Call Through the Sidecars
In the sidecar model, each pod runs the application container plus an Envoy container. When the pod starts, an init container (or a CNI plugin) installs iptables rules that redirect all inbound and outbound TCP traffic of the pod to the proxy. The application does not know this happened.
Now suppose the orders service calls http://inventory:8080/stock/42 with RestClient. The connection leaves the application, is redirected to the local Envoy, and Envoy recognises the destination as the inventory service. It picks one of the inventory pods from the endpoint list the control plane gave it, using per-request load balancing such as least requests. It opens, or reuses, a mutual TLS connection to that pod's sidecar, where both sides present certificates and verify each other's identity. The inventory sidecar checks the authorization policy (is orders allowed to call inventory?), records metrics, and forwards the request in plain HTTP over localhost to the inventory application. The response travels back the same way, and both proxies emit metrics and trace spans.
3Ambient Mode: A Mesh Without Per-Pod Sidecars
Sidecars are simple to reason about but expensive: one proxy per pod. Istio's ambient mode splits the work differently. A per-node proxy called ztunnel handles layer 4: it intercepts the traffic of the pods on its node and provides mutual TLS, identity and basic authorization. Layer 7 features such as HTTP routing, retries and header-based policies are provided by optional waypoint proxies, deployed per namespace or per service only where they are needed. Pods no longer need restarts to join the mesh, and the memory cost becomes per node rather than per pod. Ambient mode became generally available in Istio 1.24; as with any newer mode, check the features and maturity in your version.
4What a Spring Boot Service Gets Without Code Changes
Once its namespace is in the mesh, an unchanged Spring Boot service gains several features. Mutual TLS encrypts every call and gives each service a verifiable identity, so authorization policies can say which service may call which. Per-request load balancing spreads requests across pods better than Kubernetes' connection-level balancing, which matters for HTTP/2 and gRPC. Retries and timeouts can be configured per route in YAML. Traffic splitting, for example sending 5 percent of requests to version 2, enables canary releases. And every call produces the same metrics (request rate, errors, latency) and trace spans, whatever language the service is written in, although the application must still forward trace headers such as traceparent for traces to join up, which Spring Boot with Micrometer Tracing does.
5What It Costs
Nothing here is free. Each sidecar uses memory and CPU, often tens to a few hundred megabytes depending on how much configuration it receives, multiplied by the number of pods. Each proxy hop adds latency, often around a millisecond or less at the median and more at the tail, and a call between two meshed services passes through two proxies. The mesh is another distributed system to upgrade, monitor and debug, and its failures (a bad configuration push, an expired root certificate) can affect every service at once. And behaviour moves out of the code: a developer reading the Spring service sees no retry, yet requests are being retried.
That last point leads to the most practical risk. If the application already retries with Resilience4j and the mesh also retries, the attempts multiply: three application attempts times three mesh attempts is nine requests per user call. The same is true for timeouts. So teams must decide which layer owns each concern and coordinate the settings.
| Concern | Mesh | Application |
|---|---|---|
| Encryption and service identity | yes, mTLS with rotation | no |
| Connection-failure retries | often, for idempotent calls | only if the mesh does not |
| Business retries and idempotency keys | no | yes |
| Timeouts | per try, inside the app deadline | overall deadline |
| Fallbacks and degraded responses | no | yes |
6Follow-up questions
What can the mesh not do that the application still must?
The mesh does not understand business meaning. It cannot decide that a payment call is safe to retry only with an idempotency key, return a cached price when inventory is down, validate input, authorize a user's access to a specific order, or propagate trace context inside the application. It also cannot make a slow database query fast. The application keeps deadlines, fallbacks, idempotency, user-level authorization and trace header propagation.
Does the application still need TLS configuration?
Not for calls inside the mesh: the application speaks plain HTTP to its local proxy, and the proxies handle mTLS. It still needs TLS for calls to systems outside the mesh, unless an egress gateway handles those.
Why is Kubernetes load balancing not enough for gRPC?
A Kubernetes Service balances connections, not requests. gRPC keeps one long-lived HTTP/2 connection and sends all requests over it, so every request from one client pod goes to the same server pod. A mesh proxy balances each request across all endpoints.
7Conclusion
In this answer, we saw that a mesh moves networking into the platform: Envoy proxies in the data plane carry the traffic, and a control plane such as istiod programs them over xDS and issues certificates. In the sidecar model, iptables redirects each pod's traffic through its proxy; ambient mode replaces sidecars with per-node ztunnels for layer 4 and optional waypoints for layer 7. An unchanged Spring Boot service gains mTLS, per-request balancing, retries, timeouts, traffic splitting and uniform telemetry, at the cost of proxy resources, extra latency, another system to run and behaviour hidden from the code, which is why mesh and application resilience settings must be coordinated.
Open with
A service mesh has a data plane and a control plane. The data plane is a proxy, usually Envoy, that sits in the path of every call; in the sidecar model there is one per pod, and iptables rules redirect the pod's inbound and outbound traffic through it without the app knowing.
Then, if they want more
The control plane, istiod in Istio, watches Kubernetes and pushes routes, endpoints, certificates and policies to the proxies over the xDS APIs, and it acts as a certificate authority with short-lived workload certificates. Istio also has ambient mode, where a per-node ztunnel does layer 4 and mTLS and optional waypoint proxies add layer 7 features only where needed.
For a Spring Boot service, without code changes, you get mutual TLS and service identity, per-request load balancing, retries and timeouts, traffic splitting for canaries, and uniform metrics and traces, though the app still has to propagate trace headers.
The costs are memory and CPU for every proxy, extra latency per hop, often a millisecond or less at the median but more at the tail, another system to upgrade and debug, and behaviour you cannot see in the code.
The big practical risk is double retries: if Resilience4j retries three times and the mesh retries three times, you get nine calls, so each concern needs one owner.
About this answer
- Last updated
- 13 November 2026
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the official documentation for the version you use. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "Explain how a mesh works, what it gives a Spring Boot service without code changes, and...": https://scrivio-interview-library.netlify.app/architecture/load-balancing-networking/1af4938c03/