Service Mesh & Microservices Expert
Design and operate service meshes for secure, observable, and resilient microservice communication using Istio, Envoy, and Linkerd.
Activation Triggers
Activate on: "service mesh", "Istio", "Envoy", "sidecar proxy", "circuit breaker", "service discovery", "mTLS", "traffic management", "canary deployment", "Linkerd"
NOT for: Edge/API gateway → api-gateway-reverse-proxy-expert | Application instrumentation → observability-apm-expert | Container orchestration basics → relevant DevOps skill
Quick Start
- Evaluate need — service meshes add complexity; justified at 10+ services with cross-cutting concerns
- Choose mesh — Istio (full-featured), Linkerd (lightweight), Cilium (eBPF, no sidecar)
- Enable mTLS — zero-trust between all services, mesh handles certificate rotation
- Configure traffic policies — retries, timeouts, circuit breakers per service pair
- Deploy with canary — use mesh traffic splitting for safe rollouts (90/10, 80/20, etc.)
Core Capabilities
| Domain |
Technologies |
| Meshes |
Istio 1.24+, Linkerd 2.16+, Cilium Service Mesh |
| Data Plane |
Envoy Proxy, Linkerd2-proxy, eBPF (Cilium) |
| Security |
mTLS, SPIFFE/SPIRE, AuthorizationPolicy |
| Traffic |
VirtualService, DestinationRule, traffic splitting |
| Observability |
Kiali, automatic Prometheus metrics, distributed tracing |
Architecture Patterns
Sidecar Proxy Architecture (Istio)
┌────────────────── Pod ──────────────────┐
│ ┌──────────┐ ┌──────────────────┐ │
│ │ App │────→│ Envoy Sidecar │──┼──→ Other services
│ │ Container│←────│ (injected auto) │←─┼── (via their sidecars)
│ └──────────┘ └──────────────────┘ │
└─────────────────────────────────────────┘
Envoy intercepts all inbound/outbound traffic:
- mTLS encryption/decryption
- Retry, timeout, circuit breaking
- Metrics collection (RED)
- Access logging
- Traffic routing rules
Circuit Breaker + Retry Configuration
# Istio DestinationRule: circuit breaker for payment-service
apiVersion: networking.istio.io/v1
kind: DestinationRule
metadata:
name: payment-service
spec:
host: payment-service
trafficPolicy:
connectionPool:
tcp:
maxConnections: 100
http:
h2UpgradePolicy: DEFAULT
maxRequestsPerConnection: 10
outlierDetection:
consecutive5xxErrors: 5 # trip after 5 errors
interval: 10s # check every 10s
baseEjectionTime: 30s # eject for 30s minimum
maxEjectionPercent: 50 # never eject >50% of hosts
---
# Istio VirtualService: retry policy
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: payment-service
spec:
hosts: [payment-service]
http:
- route:
- destination:
host: payment-service
retries:
attempts: 3
perTryTimeout: 2s
retryOn: 5xx,reset,connect-failure
timeout: 10s
Canary Deployment with Traffic Splitting
# Route 90% to v1, 10% to v2 (canary)
apiVersion: networking.istio.io/v1
kind: VirtualService
metadata:
name: order-service
spec:
hosts: [order-service]
http:
- route:
- destination:
host: order-service
subset: v1
weight: 90
- destination:
host: order-service
subset: v2
weight: 10
# Progressive: 90/10 → 70/30 → 50/50 → 0/100
# Roll back instantly by setting v1 weight to 100
Anti-Patterns
- Mesh for 3 services — service mesh overhead is not justified for small deployments; use direct HTTP with retry libraries
- Ignoring resource overhead — each Envoy sidecar uses 50-100MB RAM and adds ~1ms latency; budget for it
- Application-level retries + mesh retries — double retries cause amplification; choose one layer for retry logic
- Permissive mTLS forever — start with PERMISSIVE for migration, but move to STRICT mode to enforce zero-trust
- No traffic policies — deploying a mesh without configuring timeouts, retries, and circuit breakers wastes the mesh
Quality Checklist
1---2license: Apache-2.03name: service-mesh-microservices-expert4description: "Istio, Envoy, circuit breakers, and service discovery for microservices. Activate on: service mesh, Istio, Envoy, sidecar, circuit breaker, service discovery, mTLS, traffic management. NOT for: API gateway edge routing (use api-gateway-reverse-proxy-expert), application-level observability (use observability-apm-expert)."5allowed-tools: Read,Write,Edit,Bash(npm:*,npx:*,kubectl:*,istioctl:*)6category: Backend & Infrastructure7tags:8 - service-mesh9 - istio10 - envoy11 - microservices12 - circuit-breaker13pairs-with:14 - skill: api-gateway-reverse-proxy-expert15 reason: Gateway handles north-south; mesh handles east-west traffic16 - skill: observability-apm-expert17 reason: Mesh provides automatic telemetry for distributed tracing18 - skill: distributed-transaction-manager19 reason: Circuit breakers and retries affect transaction reliability20metadata:21 source: https://skillmd.com/skills/curiositech/service-mesh-microservices-expert22---2324# Service Mesh & Microservices Expert2526Design and operate service meshes for secure, observable, and resilient microservice communication using Istio, Envoy, and Linkerd.2728## Activation Triggers2930**Activate on:** "service mesh", "Istio", "Envoy", "sidecar proxy", "circuit breaker", "service discovery", "mTLS", "traffic management", "canary deployment", "Linkerd"3132**NOT for:** Edge/API gateway → `api-gateway-reverse-proxy-expert` | Application instrumentation → `observability-apm-expert` | Container orchestration basics → relevant DevOps skill3334## Quick Start35361. **Evaluate need** — service meshes add complexity; justified at 10+ services with cross-cutting concerns372. **Choose mesh** — Istio (full-featured), Linkerd (lightweight), Cilium (eBPF, no sidecar)383. **Enable mTLS** — zero-trust between all services, mesh handles certificate rotation394. **Configure traffic policies** — retries, timeouts, circuit breakers per service pair405. **Deploy with canary** — use mesh traffic splitting for safe rollouts (90/10, 80/20, etc.)4142## Core Capabilities4344| Domain | Technologies |45|--------|-------------|46| **Meshes** | Istio 1.24+, Linkerd 2.16+, Cilium Service Mesh |47| **Data Plane** | Envoy Proxy, Linkerd2-proxy, eBPF (Cilium) |48| **Security** | mTLS, SPIFFE/SPIRE, AuthorizationPolicy |49| **Traffic** | VirtualService, DestinationRule, traffic splitting |50| **Observability** | Kiali, automatic Prometheus metrics, distributed tracing |5152## Architecture Patterns5354### Sidecar Proxy Architecture (Istio)5556```57┌────────────────── Pod ──────────────────┐58│ ┌──────────┐ ┌──────────────────┐ │59│ │ App │────→│ Envoy Sidecar │──┼──→ Other services60│ │ Container│←────│ (injected auto) │←─┼── (via their sidecars)61│ └──────────┘ └──────────────────┘ │62└─────────────────────────────────────────┘6364Envoy intercepts all inbound/outbound traffic:65- mTLS encryption/decryption66- Retry, timeout, circuit breaking67- Metrics collection (RED)68- Access logging69- Traffic routing rules70```7172### Circuit Breaker + Retry Configuration7374```yaml75# Istio DestinationRule: circuit breaker for payment-service76apiVersion: networking.istio.io/v177kind: DestinationRule78metadata:79 name: payment-service80spec:81 host: payment-service82 trafficPolicy:83 connectionPool:84 tcp:85 maxConnections: 10086 http:87 h2UpgradePolicy: DEFAULT88 maxRequestsPerConnection: 1089 outlierDetection:90 consecutive5xxErrors: 5 # trip after 5 errors91 interval: 10s # check every 10s92 baseEjectionTime: 30s # eject for 30s minimum93 maxEjectionPercent: 50 # never eject >50% of hosts94---95# Istio VirtualService: retry policy96apiVersion: networking.istio.io/v197kind: VirtualService98metadata:99 name: payment-service100spec:101 hosts: [payment-service]102 http:103 - route:104 - destination:105 host: payment-service106 retries:107 attempts: 3108 perTryTimeout: 2s109 retryOn: 5xx,reset,connect-failure110 timeout: 10s111```112113### Canary Deployment with Traffic Splitting114115```yaml116# Route 90% to v1, 10% to v2 (canary)117apiVersion: networking.istio.io/v1118kind: VirtualService119metadata:120 name: order-service121spec:122 hosts: [order-service]123 http:124 - route:125 - destination:126 host: order-service127 subset: v1128 weight: 90129 - destination:130 host: order-service131 subset: v2132 weight: 10133134# Progressive: 90/10 → 70/30 → 50/50 → 0/100135# Roll back instantly by setting v1 weight to 100136```137138## Anti-Patterns1391401. **Mesh for 3 services** — service mesh overhead is not justified for small deployments; use direct HTTP with retry libraries1412. **Ignoring resource overhead** — each Envoy sidecar uses 50-100MB RAM and adds ~1ms latency; budget for it1423. **Application-level retries + mesh retries** — double retries cause amplification; choose one layer for retry logic1434. **Permissive mTLS forever** — start with PERMISSIVE for migration, but move to STRICT mode to enforce zero-trust1445. **No traffic policies** — deploying a mesh without configuring timeouts, retries, and circuit breakers wastes the mesh145146## Quality Checklist147148- [ ] mTLS mode set to STRICT (not PERMISSIVE) in production149- [ ] Circuit breakers configured per upstream service150- [ ] Retry budgets set to prevent amplification (retries < 20% of total traffic)151- [ ] Timeouts explicit on every VirtualService (no infinite waits)152- [ ] Canary deployment tested with traffic splitting153- [ ] Kiali or equivalent mesh topology dashboard available154- [ ] Sidecar resource limits set (CPU/memory requests and limits)155- [ ] AuthorizationPolicy restricts which services can call which156- [ ] Mesh telemetry feeding into observability stack (Prometheus, Jaeger)157- [ ] Sidecar injection verified (no pods running without proxy)