Service Mesh and Sidecars
1. Executive Summary
A service mesh is an infrastructure layer that handles service-to-service communication—security (mTLS), traffic management (routing, retries, timeouts), and observability (metrics, traces)—without embedding all logic in application code. The dominant deployment model uses sidecar proxies (typically Envoy) colocated with each workload pod, controlled by a control plane (e.g., Istio, Linkerd).
Sidecars intercept east-west traffic via iptables/eBPF redirection, applying policies consistently across polyglot services. The tradeoff is operational complexity, latency overhead, and resource cost—justified at scale when many teams need uniform security and traffic policies without library fragmentation.
This chapter covers mesh architecture, control vs data plane, mTLS identity, traffic splitting, sidecar lifecycle, alternatives (eBPF ambient mesh), and when not to adopt a mesh.
2. Why This Topic Matters
Principal interviews on microservices platforms expect:
- Clear control plane vs data plane separation.
- How mTLS works with SPIFFE identities—not just "encrypt traffic."
- Canary/blue-green at L7 without app changes.
- Sidecar cost (memory per pod, startup time).
- Mesh vs library (Resilience4j) vs API gateway boundary.
Weak answers treat mesh as mandatory for Kubernetes or confuse ingress gateway with full mesh.
3. Problems Being Solved
| Problem | Service mesh response |
|---|---|
| Inconsistent TLS across languages | Sidecar terminates mTLS uniformly |
| Per-team retry/timeout divergence | Central policy via CRDs / xDS |
| Blind east-west traffic | Automatic metrics and distributed tracing headers |
| Canary without redeploying all clients | Weighted routing at proxy |
| Zero-trust networking | Identity per workload, not IP trust |
| Policy audit | Declarative config in GitOps |
Mesh does not replace: API design, idempotency, business logic, or north-south edge security alone.
4. Assumptions and System Model
| Assumption | Implication |
|---|---|
| Kubernetes or similar orchestration | Pods as deployment unit for sidecars |
| East-west traffic dominates ops concerns | Mesh ROI higher with many internal calls |
| Control plane availability critical | CP outage may block new config—not necessarily data plane traffic |
| Proxies add latency | Budget 1–5ms per hop—verify workload |
| Not all traffic through mesh initially | Opt-in namespaces, gradual rollout |
Trust model: Each workload has X.509 SVID (SPIFFE); peers verify identity; authorization policies enforce which service may call which.
5. Essential Terminology
| Term | Definition |
|---|---|
| Data plane | Proxies handling actual request traffic (Envoy) |
| Control plane | Config distribution, certs, service discovery (Istiod) |
| Sidecar | Proxy container alongside app container in pod |
| mTLS | Mutual TLS—both client and server present certificates |
| SPIFFE/SPIRE | Workload identity framework and implementation |
| VirtualService | Istio L7 routing rules (weights, headers) |
| DestinationRule | Subset definitions, TLS mode, load balancing |
| xDS | Discovery APIs (CDS, EDS, LDS, RDS) pushing config to Envoy |
| Ambient mesh | eBPF-based mesh reducing per-pod sidecars (Istio ambient mode) |
| Ingress gateway | North-south entry; distinct from east-west sidecars |
6. Core Mechanism
Control plane and data plane
Figure 1: Control plane pushes policy and certificates; sidecars enforce on all east-west traffic.
Request path through sidecar
Figure 2: App speaks plain HTTP to localhost; sidecar handles encryption, policy, telemetry.
Canary traffic split
Figure 3: VirtualService weighted routing enables canary without client awareness.
7. Step-by-Step Walkthrough
Scenario: Deploy payment service v2 with 10% canary on Istio.
| Step | Action |
|---|---|
| 1 | Label v2 pods version: v2 |
| 2 | DestinationRule defines subsets v1, v2 |
| 3 | VirtualService routes 90/10 by weight to subsets |
| 4 | Monitor golden signals on v2 subset |
| 5 | Increase weight 10 → 50 → 100 |
| 6 | Rollback by setting v2 weight to 0—no client redeploy |
mTLS bootstrap:
| Step | Component |
|---|---|
| 1 | Istiod issues certs to sidecars via SDS |
| 2 | Peer authentication policy enforces STRICT mTLS |
| 3 | AuthorizationPolicy allows order-service → payment-service only |
Sidecar resource sizing (production starting points—verify per workload):
| Component | CPU request | Memory request | Notes |
|---|---|---|---|
| Envoy sidecar | 100m | 128–256Mi | Increase with WASM filters |
| Istiod (per cluster) | 500m–2 | 1–4Gi | Scales with service count |
| Ingress gateway | 500m–1 | 512Mi–1Gi | Terminates north-south TLS |
Under-provisioned sidecars cause OOMKill during traffic spikes—monitor proxy memory separately from app container.
mTLS migration phases:
| Phase | PeerAuthentication | Risk |
|---|---|---|
| 0 | PERMISSIVE (default) | Plaintext still possible |
| 1 | PERMISSIVE + monitor | Identify non-mTLS callers |
| 2 | STRICT per namespace | Break non-injected pods |
| 3 | STRICT cluster-wide | Full east-west encryption |
Never jump to STRICT cluster-wide without namespace pilot validation.
8. Invariants and Guarantees
| Property | Type | Statement |
|---|---|---|
| Policy consistency | Safety | All meshed traffic subject to same CRD policies |
| Identity binding | Safety | Cert SAN matches service account identity |
| Data plane availability | Liveness | Existing connections often survive CP brief outage |
| Zero added latency | Not guaranteed | Proxy hop adds CPU and network cost |
| Application correctness | Not guaranteed | Mesh does not fix non-idempotent retries |
9. Failure Scenarios
Scenario 1: Control plane outage
Setup: Istiod unavailable during upgrade.
Effect: New pods may not receive certs/config; existing traffic may continue.
Mitigation: HA control plane; cert TTL and grace periods; staged upgrades.
Scenario 2: Sidecar not ready
Setup: App starts before Envoy; traffic sent before proxy ready.
Effect: Connection failures or bypass—depends on holdApplicationUntilProxyStarts.
Mitigation: Init containers; readiness probe includes sidecar; startup ordering.
Scenario 3: Retry storm via mesh policy
Setup: Mesh retries POST on 503 globally.
Effect: Duplicate charges without app idempotency.
Mitigation: Disable mesh retries on mutations; idempotency keys; policy per route.
Scenario 4: Resource exhaustion
Setup: 500MB Envoy per pod × 5000 pods.
Effect: Cluster memory pressure; scheduling failures.
Mitigation: Right-size proxy; ambient/eBPF mode; namespace-scoped mesh only.
Scenario 5: Observability cardinality explosion
Setup: Per-endpoint labels on all metrics.
Effect: Prometheus/OOM; expensive monitoring bills.
Mitigation: Cardinality limits; aggregate labels; tail sampling for traces.
Scenario 6: Egress policy blocks mesh control plane
Setup: NetworkPolicy denies istiod → sidecar on port 15012 after security hardening.
Effect: Certificates expire; mTLS handshake failures cluster-wide.
Mitigation: Document required control plane ports; policy review in CI; staging validation before prod NetworkPolicy rollout.
10. Performance Characteristics
| Factor | Typical impact |
|---|---|
| Sidecar hop | ~1–3ms latency; CPU for TLS |
| mTLS handshake | Amortized with session resumption |
| HTTP/2 multiplexing | Better connection reuse east-west |
| WASM filters | Flexible; can add significant CPU |
| eBPF ambient | Lower per-pod overhead—verify version maturity |
Benchmark your payload sizes and QPS—marketing numbers are not transferable.
11. Scalability Limits
- Control plane load grows with service count and config churn rate.
- xDS push storms on large fleets—use incremental xDS and config scoping.
- Sidecar memory floor (~50–100MB) limits pod density per node.
- Multi-cluster mesh (multi-primary, primary-remote) adds operational complexity.
12. Operational Considerations
- GitOps for VirtualService, DestinationRule, PeerAuthentication.
- Version skew policy between control plane and data plane proxies.
- Upgrade windows with canary control plane instances.
- Debug tooling:
istioctl proxy-config, Envoy admin interface (secured). - Namespace-level mesh enablement before cluster-wide.
- Runbooks for sidecar injection failures and cert rotation issues.
Mesh operational dashboard (minimum panels):
| Panel | Alert threshold | Action |
|---|---|---|
| mTLS handshake failure rate | >0.1% for 5m | Check cert rotation, injection |
| Sidecar proxy memory | >80% limit | Increase limit or investigate leak |
| xDS push latency | p99 >2s | Control plane scaling |
| Outlier ejection count | Sustained >10/min | Investigate destination service |
| AuthorizationPolicy deny rate | Spike >3× baseline | Attack or misconfiguration |
Upgrade runbook outline: drain connections → upgrade control plane (one replica at a time) → verify xDS → rolling data plane proxy upgrade → smoke test mTLS between tier-1 services.
13. Security Considerations
- STRICT mTLS for production east-west; PERMISSIVE only during migration.
- AuthorizationPolicy deny-by-default for sensitive services.
- Protect control plane as tier-0—compromise enables policy tampering.
- Ingress gateway WAF + mesh mTLS are complementary layers.
- Audit proxy access logs for anomalous cross-service calls.
14. Cost Considerations
- Sidecar memory × pod count = significant cluster overhead.
- Control plane nodes and supporting observability backend costs.
- Engineer time for mesh expertise—often underestimated.
- Ambient mesh may reduce infra cost; evaluate against maturity needs.
Decision criterion: Mesh ROI when many teams × polyglot services × strict security exceed platform team capacity for library-based solutions.
15. Production Implementations
Istio
CNCF graduated; Envoy-based; broad feature set; used at Google, IBM, many enterprises.
Linkerd
Rust micro-proxy (linkerd2-proxy); lighter footprint; opinionated simplicity.
Consul Connect
HashiCorp mesh integrated with Consul service discovery.
AWS App Mesh
Managed control plane; Envoy on ECS/EKS.
Cilium Service Mesh
eBPF-based; kernel-level optimization path.
Istio operational lessons (common production findings):
Organizations adopting Istio typically report these patterns—anecdotal, verify in your context:
- Start with observability only (mTLS PERMISSIVE, no authz) before STRICT enforcement
- Sidecar resource limits are the #1 cause of unexplained 503s during traffic spikes
- AuthorizationPolicy rollout causes more incidents than mTLS migration
- Ingress gateway is separate capacity planning from east-west mesh
- Ambient mode reduces memory tax but requires newer Istio versions and team upskilling
Linkerd positioning: Teams prioritizing simplicity over feature breadth often choose Linkerd for smaller clusters—the Rust micro-proxy has lower memory footprint than Envoy in many benchmarks (workload-dependent—verify). Tradeoff: smaller plugin ecosystem vs Istio.
When mesh is overkill: If the organization runs fewer than ~15 services in one language with mature Resilience4j/Polly standards and no strict zero-trust mandate, mesh operational cost may exceed benefit for years.
16. Alternatives and Tradeoffs
| Approach | Strength | Weakness |
|---|---|---|
| Library resilience | No proxy overhead | Inconsistent across languages |
| API gateway only | Simple north-south | No east-west visibility |
| Sidecar mesh | Uniform policy | Resource + ops cost |
| Ambient/eBPF mesh | Lower per-pod cost | Newer; tooling evolving |
| No mesh (small fleet) | Simplicity | Manual TLS and policy drift |
Adopt mesh when east-west policy at scale is a recurring organizational problem, not because Kubernetes "requires" it.
17. Common Misconceptions
| Misconception | Reality |
|---|---|
| "Mesh encrypts everything automatically" | Policies and injection must be configured |
| "Mesh replaces API gateway" | Ingress and east-west serve different roles |
| "Zero latency impact" | Measurable proxy hop exists |
| "Retries are always safe in mesh" | Dangerous on non-idempotent operations |
| "All clusters need Istio day one" | Many succeed with simpler patterns longer |
18. Principal Architect Perspective
- Golden path: Platform offers mesh opt-in with documented patterns; not mandatory for 3-service startups.
- Policy as code in Git with review—who can authorize
*topayment-service? - Latency budget must include mesh hops on critical paths.
- Idempotency remains application responsibility—mesh retries amplify bugs.
- Evaluate ambient/eBPF for new deployments to reduce sidecar tax.
Mesh vs library decision matrix:
| Factor | Prefer mesh | Prefer client library |
|---|---|---|
| Language count | 3+ polyglot | Single language (JVM) |
| Team count | 20+ teams | <5 teams |
| Policy uniformity | Mandatory org-wide | Team autonomy OK |
| Latency budget | >5ms headroom per hop | Sub-ms critical path |
| Ops maturity | Dedicated platform SRE | No platform team |
Document decision in ADR—revisit annually as ambient mesh matures.
Interview tip: When asked "should we use a service mesh," always answer with criteria and phased rollout—never yes/no without organizational and latency context.
19. Architecture Review Exercise
Scenario: Full Istio strict mTLS on 2000 microservices; global retry=5 on all routes; no authorization policies; Prometheus 2M series.
Review prompts:
- Blast radius of retry policy?
- mTLS without authorization—sufficient for zero trust?
- Monitoring cost and cardinality?
- Remediation priorities?
Expected findings: Scope retries; add AuthorizationPolicy; reduce metric labels; cert rotation HA review.
20. Whiteboard Explanation
90-second version:
"A service mesh separates communication concerns into sidecar proxies—the data plane—and a control plane that pushes config and certificates. Apps talk to localhost; Envoy intercepts east-west traffic, applies mTLS with workload identities, timeouts, retries, and emits metrics/traces. Istio defines routing with VirtualServices—canary by weight without changing clients. Control plane is Istiod distributing xDS config and acting as CA. Tradeoffs: every pod pays sidecar memory and latency; ops complexity is real. Use when many polyglot services need consistent security and traffic policy. Don't use mesh retries on POST without idempotency. Alternatives include library-based resilience or lighter meshes like Linkerd, and ambient modes reducing sidecars."
Extended principal addendum: Mention organizational readiness—mesh requires platform SRE ownership, policy review for AuthorizationPolicy changes, and developer education on debugging through sidecars. Without these, mesh adoption creates more incidents than it prevents in the first 6 months.
21. Interview Questions
-
Control vs data plane?
- Signals: CP config/certs; DP proxies traffic.
-
How does sidecar intercept traffic?
- Signals: iptables/eBPF redirect; transparent proxy.
-
mTLS in mesh?
- Signals: Both sides present certs; SPIFFE identity.
-
Canary without client change?
- Signals: VirtualService weighted subsets.
-
Mesh vs API gateway?
- Signals: East-west vs north-south.
-
Sidecar disadvantages?
- Signals: Memory, latency, ops, startup ordering.
-
When NOT use mesh?
- Signals: Small fleet, few services, strong library discipline.
-
Control plane down impact?
- Signals: Existing connections often OK; new config/certs affected.
-
AuthorizationPolicy purpose?
- Signals: L7 allow/deny between identities.
-
Ambient mesh difference?
- Signals: eBPF path; reduced per-pod sidecar.
-
xDS protocols?
- Signals: Dynamic config push to Envoy (CDS, EDS, LDS, RDS).
-
Retry policy risk?
- Signals: Non-idempotent amplification.
-
SPIFFE identity in mesh?
- Signals: Workload X.509 SVID; not IP-based trust.
-
Sidecar vs ambient mesh tradeoff?
- Signals: Per-pod overhead vs eBPF complexity; maturity evaluation.
-
How debug mTLS handshake failure?
- Signals:
istioctl authn tls-check; cert expiry; SAN mismatch.
- Signals:
Scoring rubric:
| Dimension | Strong | Weak |
|---|---|---|
| Architecture | CP/DP, identity, routing | "Encrypts microservices" |
| Tradeoffs | Cost, latency, ops | Mesh always good |
| Security | mTLS + authz | mTLS alone = zero trust |
22. Interview Follow-Ups
-
Multi-cluster mesh topologies?
- Signals: Primary-remote, multi-primary, locality load balancing.
-
Migrate from PERMISSIVE to STRICT?
- Signals: Staged namespace rollout; monitor plaintext failures.
-
Mesh with Kafka/gRPC?
- Signals: TCP tunneling; protocol detection; some features L7-specific to HTTP.
-
How reduce sidecar memory on Java workloads?
- Signals: Right-size proxy; ambient mode; fewer WASM filters; review access log verbosity.
-
Zero-trust without mesh?
- Signals: mTLS at app layer, SPIRE, or service-to-service certs—higher per-team burden.
22A. Production Low-Level Design (Interview + Game Day)
East-west mesh LLD for order-service → payment-service with STRICT mTLS, sidecar circuit breaking, and retry budget. Production LLD and Game Day Standard.
Control plane vs data plane
| Plane | Component | Role |
|---|---|---|
| Control | Istiod (xDS, CA) | Push VirtualService, DestinationRule, PeerAuthentication |
| Data | Envoy sidecars | mTLS, retries, outlier detection, telemetry |
Policy LLD
| Policy | Setting sketch | Why |
|---|---|---|
| PeerAuthentication | STRICT in payment namespace | No plaintext east-west |
| AuthorizationPolicy | Allow order-service SA → payment-service only | Zero-trust beyond encryption |
| VirtualService | attempts: 2, per-try timeout 250ms, retry on GET only | Bound amplification; POST needs app idempotency |
| DestinationRule | Outlier detection: 5 consecutive 5xx → eject 30s | Sidecar circuit break |
| Retry budget | Max 10% extra load vs baseline RPS on payment route | Prevent metastable failure |
Numbered request path
Step-by-step flow:
| Step | Detail |
|---|---|
| 1 | App unchanged—speaks plain HTTP to sidecar |
| 2 | Deny if caller identity not in allow list; drop retry if budget exhausted |
| 3 | Mutual cert verify; SAN matches destination service account |
| 4–5 | Outlier detection ejects unhealthy payment pods |
| 6–7 | W3C trace context injected for burn-rate dashboards |
Canary LLD (payment v2)
Step-by-step flow:
| Step | Action |
|---|---|
| 1 | VirtualService routes by DestinationRule subsets |
| 2 | Weight shift without client redeploy |
| 3 | Rollback = set v2 weight to 0 |
| 4 | Abort canary if error budget burn on v2 subset |
One SLO
Payment route availability 99.95% at sidecar (5xx rate); page on mTLS handshake failure >0.1% or outlier ejection sustained.
22B. Game Day Playbooks
| # | Drill | Inject | Detect | Mitigate | Verify |
|---|---|---|---|---|---|
| GD-1 | STRICT mTLS break | Expire cert / wrong SA | Handshake failure metric | Roll PeerAuthentication; re-issue | East-west restored <15m |
| GD-2 | Retry storm on POST | Global retry=5 on mutating route | Payment RPS 4× baseline | Cut retry budget; disable POST retry | Load normalizes |
| GD-3 | Sidecar OOM | Spike traffic on under-provisioned proxy | Proxy restarts, 503 blips | Raise memory limit; scale pods | p99 stable |
| GD-4 | AuthZ misconfig | Deny rule blocks order→payment | 403 spike on payment | GitOps revert AuthorizationPolicy | Checkout succeeds |
GD-2 — Retry budget exhaustion
23. Strong Answer Example
Question: "Should we adopt Istio for 80 microservices?"
Answer this as a 45-minute greenfield design using the PRACTICE framework. Below is how a strong student sounds aloud—criteria and phased rollout, not "yes because best practice."
Student interview script (PRACTICE)
P — Problem framing
"Eighty services across five languages with inconsistent TLS, retries, and canary practices. The question is whether a service mesh is the right platform default for east-west policy—or whether library standards plus an API gateway suffice.
Non-goals for v1: multi-cluster mesh, ambient mode production cutover, or replacing ingress. I'll focus tier-1 payment + PII namespaces first."
R — Requirements
| Type | Requirement |
|---|---|
| Security | STRICT mTLS east-west; AuthorizationPolicy deny-by-default on payment |
| Traffic | Canary by weight without client changes |
| Resilience | Timeouts + bounded retries; no unsafe POST retry |
| Ops | GitOps policies; HA control plane; sidecar resource limits explicit |
| NFR | Checkout path budget includes ~2ms/hop mesh overhead |
A — Assumptions (state aloud)
| Assumption | Why it matters |
|---|---|
| Kubernetes on EKS/GKE | Sidecar injection model |
| Platform SRE team exists (0.5–1 FTE) | Mesh ops cannot be ad hoc per team |
| Apps not idempotent on all POSTs | Mesh retry policy must be route-scoped |
| Existing ALB ingress for north-south | Mesh complements, not replaces |
| SLOs + burn alerts already defined | Canary abort tied to error budget |
C — Capacity (back-of-envelope)
Pods meshed phase-1 → ~200 (payment + PII namespaces)
Sidecar memory floor → 128Mi × 200 ≈ 25Gi cluster tax (verify)
Extra latency/hop → ~2ms budget on checkout (measure in pilot)
Control plane → 2× Istiod HA; xDS push scoped by namespace
Retry budget cap → +10% max load on failing dependency
Pilot duration → 4 weeks before expanding namespaces
T — Topology (draw this)
Rollout phases: PERMISSIVE observe → STRICT per namespace → AuthorizationPolicy → canary VirtualService.
I — Invariants (safety)
"1. Idempotency stays in application code—mesh retries amplify bugs. 2. Circuit break at sidecar (outlier detection) plus app breaker for business logic. 3. Retry budget platform-wide cap—never unbounded mesh retries. 4. Control plane tier-0—compromise = policy tampering. 5. holdApplicationUntilProxyStarts on tier-1 pods."
C — Constraints (second C)
| Constraint | Response |
|---|---|
| Latency-sensitive checkout | Measure p99 with/without sidecar; keep aggregation path optimized |
| Sidecar memory tax >15% cluster | Evaluate ambient/eBPF in phase-2 ADR |
| Polyglot teams | Document golden-path VirtualService templates |
| CP upgrade risk | One-replica-at-a-time; smoke mTLS after each |
| Global retry=5 anti-pattern | GitOps lint blocks mutating-route retries |
E — Evolution
| Phase | Deliverable |
|---|---|
| M1 | Observability-only mesh (PERMISSIVE) in staging |
| M2 | STRICT mTLS payment namespace + authz |
| M3 | Canary payment v2 by weight; abort on burn |
| M4 | Expand to PII namespaces; dashboard panels |
| M5 | Quarterly game day GD-2 retry budget drill |
Closing line (interview)
"With 80 services and polyglot stacks, mesh wins on uniform mTLS and canary—but I'd namespace-scope, STRICT tier-1 first, no global POST retries, explicit retry budget, and pilot four weeks measuring latency and memory tax. If sidecar cost breaks SLO, revisit ambient mesh or library golden path—documented in ADR, not religion."
Scoring signals
| Strong | Weak / red flag |
|---|---|
| CP/DP, SPIFFE, phased STRICT | "Istio is best practice" |
| Retry budget + idempotency | Global retry on all routes |
| Latency and memory cost | "Zero overhead" |
| AuthorizationPolicy + mTLS | mTLS alone = zero trust |
| Game day for retry storm | Day-1 cluster-wide STRICT |
Compact outline (if time-boxed to 2 minutes)
"80 services, 5 languages → mesh for uniform east-west policy. Start payment namespace: STRICT mTLS, deny-by-default authz, HA Istiod, GitOps. Canary via VirtualService weights. No POST retries; retry budget 10%. Budget 2ms/hop; pilot 4 weeks. Expand if ROI clear; else libraries + ingress."
Additional strong answer
Question: "How do you debug intermittent 503s between meshed services?"
"Traces filtered to 503 → compare
istioctl proxy-config routeson both sidecars →istioctl authn tls-check→ sidecar memory/OOM → VirtualService weight drift → AuthorizationPolicy deny spike → upstream app readiness. Document whether 503 is mesh or app before tuning retries."
24. Weak Answer Example
Question: "Should we adopt Istio for 80 microservices?"
"Yes, Istio is best practice for Kubernetes microservices."
Why weak: No tradeoff analysis, rollout plan, cost, or security policy detail.
25. Hands-On Exercise
- Install Istio or Linkerd on local KinD cluster.
- Enable automatic sidecar injection for one namespace.
- Deploy two versions of a service; configure 50/50 traffic split.
- Enforce STRICT mTLS; verify with
istioctl authn tls-check. - Capture trace from Jaeger/Zipkin across two meshed services.
- Measure latency with and without sidecar on load test.
- Document authorization policy allowing only one caller.
- Compare sidecar memory and p99 latency with mesh disabled on identical load test.
- Draft mTLS migration runbook from PERMISSIVE to STRICT for one namespace including rollback steps.
- Present mesh ROI analysis to mock principal panel: include cost, latency, and security benefits quantified where possible.
26. Knowledge Check
- Data plane component? (Envoy sidecar proxy.)
- Canary mechanism in Istio? (VirtualService weights + DestinationRule subsets.)
- Sidecar listens how? (Transparent redirect from app container.)
- mTLS provides? (Encryption + mutual authentication.)
- CP outage typically affects? (New config/certs more than existing flows.)
- VirtualService purpose? (L7 routing and traffic weights.)
- STRICT mTLS mode? (Encrypted east-west; no plaintext.)
- Sidecar memory risk? (OOMKill if under-provisioned.)
- AuthorizationPolicy without mTLS? (Insufficient for zero trust.)
- Ambient mesh benefit? (Reduced per-pod proxy overhead.)
27. Flashcards
| # | Front | Back |
|---|---|---|
| 1 | Service mesh | Infrastructure layer for service-to-service comms. |
| 2 | Sidecar | Colocated proxy intercepting pod traffic. |
| 3 | Control plane | Config, certs, discovery (e.g., Istiod). |
| 4 | Data plane | Proxies handling actual requests (Envoy). |
| 5 | mTLS | Mutual TLS with both peer certificates. |
| 6 | VirtualService | L7 routing rules in Istio. |
| 7 | DestinationRule | Subsets, TLS mode, load balancing policy. |
| 8 | SPIFFE | Workload identity standard. |
| 9 | xDS | Envoy dynamic configuration APIs. |
| 10 | Ambient mesh | eBPF-based mesh reducing sidecars. |
28. Cheat Sheet
ARCHITECTURE
App → localhost → Sidecar (Envoy) → mTLS → Peer sidecar → App
ISTIO KEY CRDs
VirtualService — routing, weights, faults
DestinationRule — subsets, TLS, LB
PeerAuthentication — mTLS mode
AuthorizationPolicy — allow/deny by identity
ROLLOUT
Namespace opt-in → PERMISSIVE → STRICT
Canary via subset weights
COSTS
~50-100MB RAM per sidecar
~1-3ms latency per hop
CP HA required
DON'T
Global retry on POST
Mesh day-1 for tiny fleets
Skip authorization with mTLS only
29. Related Concepts
- Resilience Patterns — retries, breakers (app vs mesh)
- Kubernetes Architecture — pod networking foundation
- Platform Engineering and GitOps — mesh policy delivery
- Security Architecture Fundamentals — zero-trust context
- Observability Fundamentals — mesh-generated telemetry
- SLOs, SLIs, and Error Budgets — latency budget impact
These topics interconnect in production platform design: Kubernetes provides the compute substrate; GitOps delivers mesh policies; resilience patterns remain application responsibility even with Istio retries; observability validates all layers under chaos and DR exercises.
30. References
Primary sources
- Istio Documentation — Architecture, Security.
- Envoy Proxy Documentation — Introduction.
- SPIFFE Specification — spiffe.io.
Engineering blogs
- Buoyant (Linkerd) — sidecar vs ambient comparisons (vendor perspective—verify claims).
- Google Cloud — Istio on GKE operational guides.
Distinction
| Claim type | Source |
|---|---|
| mTLS, xDS, SPIFFE | Official Istio/Envoy/SPIFFE specs |
| Latency overhead | Workload-dependent—benchmark required |
| Ambient mesh benefits | Vendor docs and early adopter reports |