Articles

What Is a Service Mesh? Microservices Networking Explained

A service mesh is a dedicated infrastructure layer that handles service-to-service traffic, retries, and encryption without changing app code.

Chisato Chisato · · 4 min read
Abstract blue network mesh visualization

A service mesh is a dedicated infrastructure layer that manages communication between services in a distributed system — handling retries, timeouts, load balancing, encryption, and observability at the network level, without requiring any of that logic to live in application code. It typically works by deploying a lightweight network proxy alongside every service instance, so all traffic between services flows through proxies that enforce policy consistently.

The problem it solves

A microservices architecture replaces a few in-process function calls with many network calls between independently deployed services. Every one of those calls can fail, time out, or need to be load-balanced across replicas — and if each service reimplements its own retry logic, circuit breaking, and TLS handling, you get inconsistent behavior and a lot of duplicated code scattered across every service, usually in whatever language that service happens to be written in.

A service mesh centralizes that concern. Instead of each service handling retries and encryption itself, a sidecar proxy sits next to it and handles that traffic transparently — the application code just makes a normal network call, and the proxy takes care of the rest.

The sidecar pattern

Most service meshes work by injecting a proxy container into the same pod or host as each service instance — this is the “sidecar” pattern. All inbound and outbound traffic for that service is routed through its sidecar rather than going directly over the network. This gives the mesh a consistent enforcement point regardless of what language or framework the service itself is written in.

The mesh is typically split into two planes:

  • Data plane — the sidecar proxies themselves, which actually intercept and route every request, applying policies like retries, timeouts, and mutual TLS.
  • Control plane — a central component that configures all the proxies, distributes routing rules, certificates, and policy, and collects telemetry from across the mesh.

This split means an operator changes routing or security policy in one place — the control plane — and it propagates to every proxy in the mesh, rather than requiring a redeploy of every individual service.

What a service mesh actually handles

  • mTLS between services — the mesh can automatically encrypt and authenticate every service-to-service connection with mutual TLS, without any application code needing to manage certificates.
  • Retries and timeouts — transient failures get retried according to a policy defined once, rather than differently in every service’s HTTP client.
  • Traffic shaping — canary releases, weighted routing between two versions of a service, and circuit breaking to stop cascading failures.
  • Observability — because every request passes through a proxy, the mesh can uniformly emit latency, error rate, and traffic metrics for every service pair, without each team instrumenting their own code.

Service mesh vs API gateway

These are often confused because both sit in the request path, but they solve different problems. An API gateway sits at the edge, handling traffic coming into the system from outside clients — authentication, rate limiting, routing to the right backend. A service mesh handles traffic between services once it’s already inside the system.

API gatewayService mesh
Traffic directionNorth-south (client to service)East-west (service to service)
Typical concernsAuth, rate limiting, external routingmTLS, retries, internal load balancing
DeploymentSingle or few instances at the edgeA sidecar per service instance

Many production systems run both: a gateway at the perimeter and a mesh handling everything behind it.

Is a service mesh worth the complexity

A service mesh adds real operational weight — another control plane to run, another proxy hop adding latency to every call, and a learning curve for anyone debugging traffic issues. For a handful of services, hand-rolled retry logic and a shared HTTP client library often cover the same ground with far less infrastructure. The tradeoff tends to favor a mesh once you’re running enough services, on enough teams, that consistent policy enforcement and uniform observability stop being nice-to-haves and start being the only way anyone can reason about the system. This is closely related to why teams building platform engineering internal developer platforms often bundle mesh adoption in as a paved-road default rather than asking each team to opt in individually — most service meshes are deployed on top of Kubernetes, where the sidecar pattern maps naturally onto pods.

The takeaway

A service mesh moves retries, encryption, load balancing, and observability for service-to-service traffic out of application code and into a dedicated proxy layer, typically deployed as a sidecar alongside every service instance and configured centrally through a control plane. It solves a real problem for large microservices deployments, but the added latency and operational surface mean it’s worth adopting once policy consistency across many services becomes the bottleneck — not by default for every distributed system.

Chisato Chisato · · 4 min read

What Is a NAT Gateway?

A NAT gateway lets private-subnet resources reach the internet outbound while staying unreachable from it, translating private IPs to a public one.

#Cloud #Networking #DevOps
Chisato Chisato · · 4 min read

What Is a VPC? Virtual Private Clouds Explained

A VPC is an isolated, software-defined network inside a public cloud. How subnets, routing, and security groups fit together to keep resources private.

#Cloud #Networking #DevOps
Chisato Chisato · · 5 min read

What Is a Reverse Proxy? How It Works, Explained

A reverse proxy sits in front of servers, forwarding client requests and hiding backend topology. TLS termination, caching, and load balancing explained.

#Networking #Cloud #DevOps