A layer of sidecar proxies that handles service-to-service traffic, security and metrics.
A service mesh is a layer that handles how services talk to each other. A small proxy sits next to every service and takes care of retries, timeouts, encryption and metrics, so the app code does not have to.
When you have many microservices, each one calls others over the network. Networks fail, so each call needs the same careful handling: a timeout, a retry, a circuit breaker, encryption, logging, and a way to find the other service. If every team writes this code in its own language and library, you get a lot of copies and a lot of mistakes.
A service mesh moves this work out of the app and into the infrastructure. The mesh has two parts:
The app just calls payments as if it were a normal call. The local sidecar catches it, encrypts it, picks a healthy target, applies the timeout and retry rules, records metrics, and sends it on. The sidecar on the other side checks and decrypts it before passing it to the target service.
| Part | Job | Examples |
|---|---|---|
| Data plane | Carry real requests. Encrypt, route, retry, time out, and record metrics. | Envoy proxy, Linkerd2-proxy |
| Control plane | Hold the rules and identities. Hand out certificates. Push config to every proxy. | Istiod (Istio), Linkerd control plane, Consul |
| Model | How it works | Good and bad |
|---|---|---|
| Sidecar proxy | One proxy container beside each service instance | Strong isolation per service. Uses CPU and memory for every pod, and adds two hops. |
| Node or ambient proxy | A shared proxy per node (and optional per-namespace proxies), as in Istio ambient mode or Cilium | Less resource use, simpler upgrades. A newer design with different trade-offs. |
| Proxyless (library based) | gRPC or another library gets rules from the control plane, with no proxy | Lowest latency. Works only for supported languages. |
A simplified, deterministic model (no random numbers). A call takes 20 ms, each sidecar pair adds about 2 ms, and every retry waits 10 ms. Real meshes also add timeouts, circuit breaking and rich metrics.
| Term | Meaning in easy words |
|---|---|
| Service mesh | An infrastructure layer that manages and secures service-to-service calls |
| Data plane | The proxies that carry the real traffic |
| Control plane | The part that stores rules and identities and configures the proxies |
| Sidecar | A helper container that runs next to the app and handles its network traffic |
| Envoy | A popular open-source proxy used as the data plane in Istio and others |
| mTLS | Mutual TLS: both sides present certificates, so each side knows who the other is |
| East-west traffic | Calls between services inside your system (the opposite of north-south, from outside users) |
| Traffic shifting / canary | Sending a chosen percentage of requests to a new version |
| Circuit breaking | Stop calling a failing service for a while, so it can recover |
| Observability | Being able to see what the system does, through metrics, logs and traces |
| Service identity | A cryptographic name (certificate) that proves which service is calling |
| Choice | We gain | We lose |
|---|---|---|
| Service mesh | Uniform security, reliability and visibility | Extra layer, resources and operations work |
| Libraries in each app | No extra proxy, lowest latency | A copy per language and a lot of upgrade work |
| Sidecar model | Strong isolation and many features | Resource cost per pod, and two extra hops per call |
| Ambient / node proxy | Less overhead, easier adoption | A newer design with fewer years of use |
| Strict mTLS | Strong security | Every client must join the mesh or be handled as an exception |
| Many retries | More calls succeed | More load on a struggling service, and a risk of duplicates |