# Service Mesh

> Move service-to-service concerns like mTLS, retries and traffic splitting out of code and into infrastructure. Free notes, key concepts, resources and a mini...

Canonical: https://www.internhack.in/roadmaps/tracks/backend/service-mesh
Last updated: 2026-11-28

Move service-to-service concerns like mTLS, retries and traffic splitting out of code and into infrastructure.

Advanced · about 3 hours · difficulty 4/5

Learn first: [Microservices and Service-Oriented Architecture](https://www.internhack.in/roadmaps/tracks/backend/microservices-soa), [Kubernetes Basics for Backend Developers](https://www.internhack.in/roadmaps/tracks/backend/kubernetes-basics)

In a system with dozens of microservices, every service needs the same plumbing: encrypted connections, retries, timeouts, metrics and gradual rollouts. A **service mesh** provides this at the infrastructure layer so application code does not have to.

### How it works

- A **data plane** of proxies (usually **Envoy** sidecars next to each pod, or node-level proxies in newer "ambient" or sidecarless modes) intercepts all traffic between services.
- A **control plane** (Istio, Linkerd, Consul) configures those proxies from high-level policies.

### What you get

- **Mutual TLS** between services automatically, with identity per service, enabling zero-trust networking.
- **Traffic management**: retries, timeouts, circuit breaking and **traffic splitting** for canary releases (send 5 percent to v2).
- **Observability**: golden metrics (requests, errors, latency) and trace propagation for every call without code changes.
- **Authorization policies**: "only the checkout service may call the payments service".

### The cost

A mesh adds latency per hop, memory per proxy and a significant amount of operational complexity. Debugging now includes the mesh configuration. For a handful of services, a good HTTP client library with timeouts and retries plus a gateway is usually enough.

### When it is worth it

Many services owned by many teams on Kubernetes, compliance requirements for encrypted internal traffic, or a platform team ready to own it.

You are ready to move on when you can explain what a sidecar proxy does to a request, and list two problems a mesh solves and two it creates.

## Key concepts

- **Data plane and control plane**
- **Sidecar proxies (Envoy)**
- **Mutual TLS between services**
- **Traffic splitting and canaries**
- **Istio vs Linkerd**
- **Sidecarless and ambient modes**

## Mini project

Install Linkerd on a local kind cluster with two services, confirm mTLS is active, and run a 90/10 traffic split between two versions.

## Check yourself

What does a service mesh give you that a shared HTTP client library cannot?

## Free resources

- [Istio documentation](https://istio.io/latest/docs/) (Istio)
- [Linkerd documentation](https://linkerd.io/docs/) (Linkerd)
- [Envoy proxy documentation](https://www.envoyproxy.io/docs) (Envoy)

Previous: [Twelve-Factor Apps and Cloud-Native Habits](https://www.internhack.in/roadmaps/tracks/backend/twelve-factor-apps) · Next: [Design Patterns for Backend Code](https://www.internhack.in/roadmaps/tracks/backend/design-patterns-gof)

## More in Architecture and Design Patterns

- [Monoliths and Modular Monoliths](https://www.internhack.in/roadmaps/tracks/backend/monolith-modular)
- [Microservices and Service-Oriented Architecture](https://www.internhack.in/roadmaps/tracks/backend/microservices-soa)
- [Serverless and Functions as a Service](https://www.internhack.in/roadmaps/tracks/backend/serverless)
- [Twelve-Factor Apps and Cloud-Native Habits](https://www.internhack.in/roadmaps/tracks/backend/twelve-factor-apps)
- [Service Mesh](https://www.internhack.in/roadmaps/tracks/backend/service-mesh)
- [Design Patterns for Backend Code](https://www.internhack.in/roadmaps/tracks/backend/design-patterns-gof)
- [Domain-Driven Design](https://www.internhack.in/roadmaps/tracks/backend/domain-driven-design)
- [CQRS and Event Sourcing](https://www.internhack.in/roadmaps/tracks/backend/cqrs-event-sourcing)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Backend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/backend)
