categories.containers-platform Advanced

What is a Service Mesh? What problems does it solve in microservices architectures?

AI Practice

Service Mesh Concept

A service mesh is an infrastructure layer for service-to-service communication. It uses sidecar proxies (typically Envoy) to handle all network traffic between services, so business code doesn't need to worry about networking logic.

Core Problems It Solves

Observability: Automatically generates metrics, traces, and logs for all inter-service requests without code changes

Traffic management:

  • Canary deployments: Route 10% of traffic to a new version
  • Circuit breaking: Prevent cascading failures
  • Retries and timeouts: Configure retry strategies consistently

Security:

  • mTLS: Automatic mutual TLS encryption between services
  • Authorization Policy: Fine-grained access control

Service discovery: Automatically discovers service endpoints in the cluster

Architecture

Data Plane: Sidecar proxies (Envoy) in each Pod

Control Plane: Manages and distributes configuration to all proxies

  • Istio: istiod
  • Linkerd: linkerd-control-plane

When You Need a Service Mesh

  • Many microservices (>10), complex inter-service dependencies
  • Need to enforce mTLS for security compliance
  • Need fine-grained traffic control (A/B testing, progressive rollouts)

Trade-offs

Sidecar containers increase resource consumption per Pod (CPU/Memory), introduce additional network latency, and add configuration complexity.

✦ AI Mock Interview

Type your answer and get instant AI feedback

Sign in to use AI scoring

Copyright © 2026 Wood All Rights Reserved · FE Interview Hub