Istio — Fundamentals
What is Istio?
| Without Istio | With Istio |
|---|
|---|---|
| Each service implements its own retries, timeouts | An Envoy sidecar handles all traffic policies |
|---|---|
| Plain HTTP between pods (insecure) | Automatic mTLS between all services |
| Manual canary deployment code | Weight-based routing in a VirtualService |
| Add a tracing SDK to each service | Automatic trace header propagation |
| No circuit breaking | Outlier detection in a DestinationRule |
Traffic Management
mTLS & Authorization
Istio Architecture — Control Plane and Data Plane
| Component | Plane | What it does |
|---|
|---|---|---|
| istiod | Control Plane | The brain — manages Envoy config, issues mTLS certs, handles service discovery; one istiod manages the whole mesh |
|---|---|---|
| Envoy sidecar | Data Plane | A proxy injected into every pod, intercepting all inbound/outbound traffic, enforcing policies, collecting telemetry |
| Pilot | Control Plane (inside istiod) | Converts Istio config (VirtualService, DestinationRule) into Envoy xDS config and pushes it to sidecars |
| Citadel | Control Plane (inside istiod) | Certificate Authority — issues and rotates mTLS certificates for every service |
| Galley | Control Plane (inside istiod) | Validates Istio config before it's applied |
Circuit Breaker — What Outlier Detection Does
When a pod returns 5 consecutive 5xx errors within 30 seconds, Istio ejects it from the load-balancing pool for 30 seconds — traffic stops going to that pod, it can recover, and it's re-admitted afterward. This prevents a single failing pod from degrading the whole service, without needing any application-level circuit-breaker code.
mTLS and Observability
With Istio, every service-to-service call is automatically encrypted and mutually authenticated with no code changes required — Envoy sidecars handle the TLS handshake, and each service has a SPIFFE-format identity certificate issued by Citadel.
Built-in observability — the three signals:
| Signal | What Istio provides | Where to view |
|---|
|---|---|---|
| Metrics | Request rate, error rate, latency (P50/P95/P99) per service pair, automatically from every Envoy sidecar | Prometheus + Grafana (Istio dashboards built-in) |
|---|---|---|
| Traces | Distributed traces across microservices — Envoy propagates trace headers | Jaeger or Zipkin |
| Logs | Access logs for every request — source, destination, status code, duration | ELK or Loki |
Zero instrumentation is required — install Istio, label the namespaces, and every service automatically gets request metrics, traces, and logs. This is Istio's biggest operational value: instant observability across all microservices without changing a single line of application code.
Interview Questions
What is a service mesh and when do you actually need Istio?
A service mesh is a dedicated infrastructure layer for managing service-to-service communication — it handles traffic management (retries, timeouts, circuit breaking, canary deployments), security (mTLS between all services, authorization policies), and observability (distributed tracing, per-service-pair metrics), all without requiring changes to application code. The sidecar proxy (Envoy, in Istio's case) is injected into every pod and intercepts all traffic. Istio genuinely becomes necessary once there are more than roughly 5 microservices with real cross-cutting concerns — you don't want to reimplement retries and circuit breaking inside every individual service — and specifically once mTLS between all services, fine-grained traffic-splitting for canary deployments, or automatic distributed tracing without an SDK in every service become genuine requirements. For a smaller number of services, or where these specific needs aren't yet real, Istio's operational complexity (an extra control plane, sidecar resource overhead, a genuinely non-trivial learning curve) can outweigh its benefit — it's a deliberate architectural investment, not a default every Kubernetes cluster should reach for.

