Interview questions and model answers
"What is a service mesh and why would you use one?"
It's an infrastructure layer of proxies that every service-to-service call passes through, configured by a control plane. It gives uniform mutual TLS with workload identities, timeouts, retries and circuit breaking, traffic splitting for canaries, identity-based authorisation and consistent metrics, without changing application code. I'd use it when there are many services and teams and those needs are real; for a few services it's usually overkill.
"Sidecar vs ambient mode?"
Sidecar mode injects an Envoy proxy into every pod, which gives full L7 features everywhere but costs CPU and memory per pod, adds start-up ordering issues and needs pod restarts for upgrades. Ambient mode uses a per-node ztunnel for L4 mTLS, identity and telemetry, and adds waypoint proxies only where L7 features are needed, so it's cheaper and easier to adopt, with L7 policies requiring a waypoint.
"How does mTLS work in Istio?"
istiod acts as a CA and issues each workload a short-lived certificate whose SPIFFE identity comes from its service account, rotated automatically. Proxies on both sides present certificates, so traffic is encrypted and each side is authenticated. I'd roll out with PERMISSIVE mode first, confirm traffic is mTLS, then enforce STRICT per namespace with PeerAuthentication.
"We're getting 503s between two services in the mesh. How do you debug it?"
I'd read the istio-proxy access logs on both sides for the response flag: UF or UC point at connection problems such as a pod not listening, an mTLS mismatch or keep-alive issues; UH means no healthy endpoints; NR means no matching route; UO means a circuit-breaker limit. Then istioctl analyze for config errors, proxy-status to check the proxies are in sync, and proxy-config routes and endpoints to see what the caller's proxy really has.
"How would you do a canary release with a mesh?"
Define subsets for v1 and v2 in a DestinationRule, then route with weights in a VirtualService or an HTTPRoute, for example 5% to v2, with an optional header match for internal testers. Better, let Flagger or Argo Rollouts shift weights in steps while checking error rate and latency, rolling back automatically if they degrade.
"What are the risks of retries in a mesh?"
Retries at multiple layers multiply load during an outage and can turn a partial failure into a full one. Retry only idempotent requests, at one layer, with per-try timeouts, few attempts and a retry budget, and combine them with outlier detection and circuit breaking so failing endpoints are taken out rather than hammered.
"When would you not use a service mesh?"
When there are only a few services, when the team can't take on another critical system, or when one specific need can be met more simply: CNI encryption or app TLS for encryption, Argo Rollouts with Gateway API for canaries, network policies for isolation. A mesh is a platform commitment, so I'd adopt it when the scale and requirements justify it, and possibly start with ambient mode for mTLS only.