Glossary termArchitectural pattern

Service Mesh

Infrastructure layer that manages communication between microservices, handling routing, encryption, retries and telemetry outside application code.

A service mesh is a layer of networking infrastructure for applications built from many cooperating services. In a microservices system, a single user request may pass through many services, and every call needs routing, timeouts, retries, authentication and monitoring. Rather than implementing those concerns in each service's code, a mesh moves them into the platform. Applications send ordinary network traffic, and the mesh decides how that traffic is delivered, secured and measured, giving operators consistent control over service-to-service communication across programming languages and teams.

Most meshes have two parts. The data plane consists of proxies that intercept traffic, classically deployed as a sidecar container next to each service instance; Envoy, originally built at Lyft, is a widely used proxy. The control plane configures those proxies with routing rules, security policies and certificates. Linkerd, released by the company Buoyant in 2016, and Istio, announced by Google, IBM and Lyft in 2017, popularized the pattern on Kubernetes. Later designs reduce overhead by replacing per-service sidecars with shared per-node proxies or by using eBPF programs in the Linux kernel.

Service meshes make it easier to apply zero trust principles inside a cluster, since they can encrypt and authenticate every connection with mutual TLS without changing application code. They also provide uniform metrics and traces that support observability, and they enable traffic splitting for canary releases. The trade-offs are added latency, resource use and operational complexity, and teams running a handful of services often find that a mesh costs more than it saves. Whether to adopt one is usually a question of scale.

Key points

  • A service mesh moves retries, timeouts, encryption and telemetry out of application code and into infrastructure.
  • The data plane is a set of proxies; the control plane configures them with policies and certificates.
  • Mutual TLS in a mesh can authenticate and encrypt every service-to-service connection.
  • Meshes add latency and complexity, so they suit large deployments more than small ones.

Related entries

Glossary term

Microservices

ProgrammingDevOps

Architectural style that builds an application as a suite of small, independently deployable services, each running its own process and owning its data.

Technology

Kubernetes

DevOpsFOSS

Open-source system for automating deployment, scaling and management of containerized applications across clusters of machines.

Glossary term

Zero Trust

CybersecurityDevOps

Security model that treats no user, device or network location as trusted by default and verifies every access request continuously.

Glossary term

Degree to which a system's internal state can be inferred from its outputs, and the practices and tools that make software systems understandable.

Glossary term

Device or software that distributes incoming network traffic across multiple servers to improve capacity, responsiveness and availability.

Glossary term

Reverse Proxy

DevOpsCybersecurity

Server that sits in front of one or more backend servers, receiving client requests on their behalf and forwarding them to the right destination.

Organization

Linux Foundation organization that hosts Kubernetes and other cloud native open-source projects and promotes their adoption.

Referenced by

Other entries that discuss or point to Service Mesh.