Intermediate LevelSystem Design & Architecture
How does a Service Mesh (Istio, Linkerd) handle mTLS, traffic splitting, and telemetry?
β Interview Prompt: Explain Service Mesh architecture, Envoy sidecar proxies, automatic mTLS, canary traffic splitting, and distributed observability.
A Service Mesh (Istio, Linkerd) manages microservice-to-microservice communication using lightweight Envoy sidecar proxies running alongside application containers:
Core Capabilities:
1
Mutual TLS (mTLS): Automatically encrypts and authenticates inter-service traffic with zero application code changes.
2
Traffic Splitting: Implements percentage-based canary routing ('90% v1, 10% v2').
3
Observability: Collects latency metrics and distributed traces transparently at the proxy layer.
Code Implementation Example
yaml
# Istio VirtualService Canary Traffic Splitting Config
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
name: payment-service
spec:
hosts: [payment-service]
http:
- route:
- destination: { host: payment-service, subset: v1 }
weight: 90
- destination: { host: payment-service, subset: v2 }
weight: 10π‘Configuring Istio canary traffic splitting across microservice versions.
π― Interview Key Takeaway
Deploy a Service Mesh to offload mTLS encryption, canary traffic management, and distributed tracing from application code.
#System Design#Service Mesh#Istio#Envoy#Intermediate
Back to all System Design & Architecture Questionsβ