Service Mesh — infrastructure layer managing communication between microservices. Sidecar proxies (Envoy) intercept all traffic → handle: mTLS encryption, retries, circuit breakers, traffic shaping, observability (metrics/traces). Examples: Istio (most featured), Linkerd (lightweight), Consul Connect, AWS App Mesh. Overhead: +2-5 ms latency per hop, more memory.
Below: details, example, related terms, FAQ.
# Istio VirtualService — 10% traffic to v2
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
spec:
http:
- route:
- destination: { host: my-service, subset: v1 }
weight: 90
- destination: { host: my-service, subset: v2 }
weight: 10Gateway — north-south (ingress). Mesh — east-west (service-to-service). Complementary.
For < 10 services — yes. Complexity doesn't pay off. For 50+ services + mTLS requirement — worth it.
Istio: feature-rich, steep learning curve. Linkerd: lightweight Rust, simpler UX. For starters — Linkerd.