Skip to main content
XenonStack

Deployment Automation

XenonStack Insights What Is a Service Mesh? Architecture and Tools

and | Published | Updated

What is a service mesh: proxies, control plane and adoption guidance shown as a four-layer stack from Kubernetes services to uniform security and telemetry

Key takeaway

  • What a service mesh is, how proxies and the control plane work, sidecar vs ambient, Istio vs Linkerd, adoption steps and when not to use one.

A service mesh is a dedicated infrastructure layer that handles service-to-service communication, so that mutual TLS, retries, timeouts, routing and telemetry are applied by the platform and not coded into every application. Traffic passes through proxies that a central control plane configures. Envoy describes itself as "an L7 proxy and communication bus designed for large modern service oriented architectures" (Envoy docs), and it is the data-plane proxy in Istio.

For enterprise architects the decision is rarely "mesh or no mesh". It is where to enforce identity and policy for east-west traffic, and what operating cost you accept for it. This guide covers how a mesh works, the sidecar and ambient models, Istio and Linkerd, a decision table, and when not to adopt one. For related reading see our guides to Istio service mesh architecture, Linkerd and service-oriented architecture versus microservices.

What problem does a service mesh solve?

When an application is split into many services, every call between them needs the same things: encryption, caller identity, timeouts, retries, load balancing and a record of what happened. Without a mesh each team re-implements these in its own language and library, and they drift apart. A mesh moves them into the platform so that they are configured once and applied the same way everywhere, usually without changes to service code.

ConcernWithout a meshWith a mesh
Encryption between servicesEach service manages its own TLSProxies perform mutual TLS and the control plane issues workload certificates
Caller identity and accessNetwork location or app-level checksPolicy by workload identity, enforced at the proxy
Retries, timeouts, traffic splittingLibraries in each codebaseDeclared as routing rules and pushed to proxies
TelemetryInstrumentation per serviceProxies emit request metrics, logs and traces uniformly

How does a service mesh work?

A mesh has two parts. The data plane is the set of proxies that carry the traffic. The control plane configures them. In Istio, according to its architecture documentation, the control plane (istiod) provides service discovery, configuration and certificate management, converts high-level routing rules into Envoy configuration and acts as a certificate authority for mutual TLS. Linkerd takes the same split: you install a control plane on the cluster, then add its data plane to workloads, which its docs call "meshing" or "injecting" (Linkerd overview).

Two-column diagram: left lists encryption, caller identity, retries and telemetry handled per service; right lists mutual TLS, authorization policy, routing rules and uniform metrics from the mesh.

Envoy, according to its docs, offers L3/L4 filtering, HTTP L7 routing, service discovery, dynamic configuration through APIs and statistics for its subsystems. That is why a mesh can route by path, retry failed calls and report per-route metrics without touching the application.

Which proxy models does a service mesh use?

There are three common places to put the proxy, and the choice shapes cost, isolation and upgrade effort.

ModelHow it worksWhere it fitsTrade-off
Sidecar per podA proxy runs beside every application instance and handles its trafficStrong per-workload isolation; the default data plane in both Istio and LinkerdExtra containers per pod, and proxies are upgraded with workload restarts
Per-node proxyOne proxy per node serves all workloads on itSimple L4 needsShared by many workloads, so less isolation
Ambient (Istio)A per-node L4 proxy (ztunnel), plus optional per-namespace L7 waypoint proxiesTeams that want mTLS first and L7 features only where neededNewer model; check the Istio docs for the current support status of each feature

Istio's ambient overview says it uses "a per-node Layer 4 (L4) proxy, and optionally a per-namespace Layer 7 (L7) proxy". The ztunnel is written in Rust and handles mTLS, authentication, L4 authorization and telemetry, but does not parse HTTP. Waypoint proxies are Envoy deployments that run outside application pods and are needed for L7 features such as L7 authorization and VirtualService routing. Sidecar and ambient workloads can co-exist in one mesh, so adoption can be gradual.

What does a service mesh add for security and observability?

A mesh is most often adopted for two reasons: identity-based security and uniform telemetry.

Security: identity and mutual TLS

According to the Istio security documentation, proxies perform a mutual TLS handshake, Istio provisions each workload with X.509 certificates and rotates them automatically, and mutual TLS can be enabled without changing service code. PeerAuthentication has PERMISSIVE (accepts mutual TLS and plain text, suited to migrations), STRICT (mutual TLS only) and DISABLE modes. Authorization is expressed as AuthorizationPolicy with ALLOW, DENY and CUSTOM actions, and a matching DENY takes precedence over ALLOW. The same page notes that workloads with no authorization policy allow all requests, and that mesh-wide peer authentication defaults to PERMISSIVE when unset. A mesh therefore gives you the controls, but you still have to configure and test them. It is one building block of a zero trust security architecture, not a substitute for one.

Observability: uniform request telemetry

Because every request crosses a proxy, the mesh can report request rates, errors and latency per service pair, and support distributed tracing, without each team adding instrumentation. Envoy documents statistics for all subsystems and tracing through third-party providers. You still need a backend to store and view the data, and the application must propagate trace headers for traces to join up.

Which service mesh should you choose?

OptionWhat it isStatus (read from its own site)Fits when
IstioMesh built on Envoy; sidecar and ambient data-plane modesCNCF graduated on 12 July 2023 (CNCF project page)You need rich L7 traffic management, a large feature set and can staff its operation
LinkerdKubernetes mesh with Rust micro-proxies; does not use EnvoyCNCF graduated on 28 July 2021; open source under Apache v2, created by Buoyant (Linkerd docs and CNCF)You want a smaller surface and a Kubernetes-focused mesh; confirm current release and licensing terms on linkerd.io
Kubernetes Gateway API for mesh (GAMMA)Route resources such as HTTPRoute attach to a Service to configure mesh trafficSupport in the Standard Channel since v1.1.0 and considered GA (Gateway API docs)You want mesh routing expressed in a portable Kubernetes API; check which mesh implements it
No meshLibraries, ingress and network policyNot applicableYou run a handful of services and do not need uniform mTLS or L7 policy

Sources: CNCF Istio, CNCF Linkerd, Gateway API mesh guide.

How do you adopt a service mesh?

  1. Check the prerequisites. Workloads should already run on Kubernetes with health endpoints, and your team should have a clear first goal, such as mutual TLS or request telemetry.

  2. Start with observability and permissive mode. Mesh one non-critical namespace and watch the telemetry before enforcing anything.

  3. Turn on enforcement gradually. Move from permissive to strict mutual TLS only when every client of a service is meshed, then add authorization policy.

  4. Automate injection and upgrades. Use automatic proxy injection in the CI/CD path and plan how proxy and control-plane versions are upgraded.

  5. Add L7 routing only where it earns its place. Retries and traffic splitting can hide or amplify failures, so set timeouts and retry budgets deliberately.

Kubernetes itself already provides service discovery and basic load balancing, so the mesh builds on the platform described in our guide to Kubernetes architecture and components. For smaller footprints, see how services are deployed in microservices at the edge.

When should you not use a service mesh?

SituationWhy a mesh may not helpAlternative
A small number of servicesProxies and a control plane add operating cost for little gainIngress, TLS at the edge, Kubernetes network policy
Teams without platform skillsMesh upgrades, policy and debugging need skilled ownersManaged offering or start with libraries
Latency-critical pathsEach proxy hop adds work; measure it in your environmentTest with your own workload before committing
Governance of AI agent actionsA mesh governs network calls, not the business meaning of a decisionA decision layer above agents, see below

A mesh answers "may service A call service B, and was the call encrypted?". It does not record why an automated decision was made. Teams running AI agents on top of microservices often pair network controls with a decision layer. ElixirData describes its Context OS as keeping governed context, versioned policy and decision traces in one decision layer above AI agents, and AgentGRC as keeping autonomous agent actions inside policy, with the audit trail risk teams need. ElixirClaw is described as an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control.

To map one service-to-service decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop.

FAQ

What is a service mesh in simple terms?

A service mesh is an infrastructure layer in which proxies handle service-to-service traffic and a control plane configures them, so security, routing and telemetry are applied by the platform and not by each application.

What is the difference between a sidecar and ambient mode?

In sidecar mode a proxy runs beside every pod. In Istio ambient mode, according to its docs, a per-node L4 proxy (ztunnel) handles mTLS and L4 functions, and optional per-namespace waypoint proxies provide L7 features. Both can co-exist in one mesh.

Is Istio or Linkerd better?

It depends on your needs. Istio is built on Envoy and offers broad L7 traffic management. Linkerd uses its own Rust micro-proxies and focuses on Kubernetes. Both are CNCF graduated projects. Confirm current releases and licensing on each project site.

Does a service mesh replace an API gateway?

No. A gateway manages traffic entering the platform from outside, while a mesh manages traffic between services inside it. Kubernetes Gateway API also defines how routes can attach to Services for mesh use (GAMMA).

Does a mesh enforce mutual TLS by default?

Not necessarily. According to the Istio docs, mesh-wide peer authentication defaults to PERMISSIVE when unset, and workloads without authorization policy allow all requests. Move to STRICT and add policies deliberately.

When is a service mesh not worth it?

When you run only a few services, lack platform skills to operate the control plane, or only need TLS at the ingress. Start with the simplest control that meets the requirement.

Table of Contents

navdeep-singh-gill

Navdeep Singh Gill

Global CEO and Founder of XenonStack

LinkedIn profile

Navdeep Singh Gill is serving as Chief Executive Officer and Product Architect at XenonStack. He holds expertise in building SaaS Platform for Decentralised Big Data management and Governance, AI Marketplace for Operationalising and Scaling. His incredible experience in AI Technologies and Big Data Engineering thrills him to write about different use cases and its approach to solutions.

Get the latest articles in your inbox

Subscribe Now

Interested in solving your challenges with the XenonStack team?
Get Started

Tell us about you and your priorities so we can prepare the right conversation. It takes about 2 minutes.

Please Select your Industry
Banking
Fintech
Payment Providers
Wealth Management
Discrete Manufacturing
Semiconductor
Machinery Manufacturing / Automation
Appliances / Electrical / Electronics
Elevator Manufacturing
Defense & Space Manufacturing
Computers & Electronics / Industrial Machinery
Motor Vehicle Manufacturing
Food and Beverages
Distillery & Wines
Beverages
Shipping
Logistics
Mobility (EV / Public Transport)
Energy & Utilities
Hospitality
Digital Gaming Platforms
SportsTech with AI
Public Safety - Explosives
Public Safety - Firefighting
Public Safety - Surveillance
Public Safety - Others
Media Platforms
City Operations
Airlines & Aviation
Defense Warfare & Drones
Robotics Engineering
Drones Manufacturing
AI Labs for Colleges
AI MSP / Quantum / AGI Institutes
Retail Apparel and Fashion

Continue