Skip to content

Architecture pattern

Service mesh with an edge gateway

Use a gateway for north-south traffic entering your platform and a service mesh for east-west traffic between services, each doing the job it is built for.

Service mesh with an edge gateway. Architecture diagram, with the numbered flow listed below it.
Service mesh with an edge gatewayExternal clients enter through an edge gateway, which handles north-south concerns such as authentication and rate limits. Inside the cluster a service mesh handles east-west traffic between services, with a mesh control plane distributing certificates and routing policy.External clientsNorth-southEast-west (mesh)Mesh controlPublic clientsApps and browsersPartnersAPI consumersEdge gatewayAuth, limits, API productsService AWith sidecar proxyService BWith sidecar proxyService CWith sidecar proxyMesh control planeCertificates, policy11234555
  • Caller
  • Gateway
  • Component you run
  • Control, identity or policy
  • Request
  • Configuration or credentials

How it flows

  1. Public clients and Partners to Edge gatewayExternal API calls arrive at the edge (north-south traffic).
  2. Edge gateway to Service AThe gateway authenticates, applies limits, and forwards into the mesh over mTLS.
  3. Service A to Service BService-to-service calls go through the sidecars (east-west traffic).
  4. Service B to Service CThe mesh adds retries, timeouts, mTLS and traffic splitting without code changes.
  5. Mesh control plane to Service A, Service B and Service C (control)Pushes certificates and routing policy to every proxy.

The problem

Teams often ask whether they need an API gateway or a service mesh. They solve different problems. External consumers need products, keys, rate limits and documentation. Internal services need encrypted, observable, resilient calls to each other. Forcing one tool to do both leads to either a gateway in every service hop or a mesh exposed to the internet.

When to use it

  • Many services on Kubernetes or across clusters, owned by different teams.
  • You need mutual TLS and consistent retries and timeouts between services without changing application code.
  • External consumers need a curated API surface with authentication, quotas and a developer portal.
  • You want traffic splitting for canary releases inside the platform.

When not to

  • A handful of services. A mesh adds proxies, control plane components and concepts that small estates do not need; a gateway plus good client libraries may be enough.
  • Teams new to Kubernetes. Get the basics stable before adding a mesh.
  • When the mesh is adopted only for encryption, and the platform already offers transparent encryption between nodes.

Key components

  • Edge gateway. Terminates external TLS, authenticates consumers, applies rate limits and exposes versioned API products.
  • Sidecar or node proxies. Intercept service-to-service calls to add mTLS, retries, timeouts and metrics.
  • Mesh control plane. Issues workload certificates and distributes routing and authorisation policy to every proxy.
  • Shared observability. Traces that follow a request from the edge through every internal hop.

Trade-offs

  • Two systems to run. Separate upgrade cycles, configuration models and failure modes. Some vendors offer both under one control plane to reduce this.
  • Resource overhead. Per-pod sidecars use memory and CPU; sidecar-less or node-level proxy designs reduce this but change the security model.
  • Overlapping features. Both layers can retry and time out. Decide which layer owns each policy, or retries multiply during an incident.
  • Learning curve. Engineers must understand where a request was rejected: at the edge, in a sidecar, or in the service.

Explore further

Weighing this up for your platform?