Cloud Native 15 min read

When Does an API Gateway Become a Service Mesh? Exploring Their Convergence

This article examines the evolving relationship between Service Mesh and API Gateway, clarifying their original responsibilities, discussing traffic direction semantics, and detailing how sidecar integration, BFF layers, and real‑world Ant Financial practices are driving a convergence toward more decentralized, cloud‑native API management.

21CTO
21CTO
21CTO
When Does an API Gateway Become a Service Mesh? Exploring Their Convergence

Original Clear Boundaries: Position and Responsibility

Service Mesh provides internal service‑to‑service communication, while API Gateway exposes services as APIs to external clients.

Service Mesh: network infrastructure for intra‑system service communication.

API Gateway: external entry point for business APIs.

Deployment Differences

Service Mesh is deployed inside the system; API Gateway sits at the edge, exposing APIs outward and also accessing internal services.

East‑West vs North‑South Traffic

East‑West traffic stays within the mesh; North‑South traffic crosses the system boundary via the gateway.

Philosophical Question

When an API Gateway acts as a client to internal services, is that traffic east‑west or north‑south? The answer depends on whether the gateway is viewed as a whole or split into inbound and outbound parts.

Two Approaches

1. Strict separation – the gateway implements its own client logic independent of the mesh. 2. Compatibility – the gateway reuses the mesh’s client mechanisms.

Sidecar Overlap

Both approaches share many capabilities (service discovery, load balancing, routing, circuit breaking, rate limiting, fault injection, logging, monitoring, tracing, access control, encryption, authentication), making the gateway essentially another internal client.

Fusion with Sidecar

Modern designs embed gateway functionality into a sidecar deployed with each service, merging API management with mesh capabilities. This reduces the need for a separate gateway cluster and enables decentralized deployment.

BFF (Backend For Frontend)

Adding a BFF layer between the gateway and internal services further concentrates external traffic, allowing the sidecar‑enhanced gateway to serve BFF instances directly.

Practical Experience

Ant Financial (Alipay) has implemented a mesh‑based, sidecar‑driven gateway (SOFA Gateway built on MOSN), evolving from monolithic to decentralized, mesh‑enabled architecture.

Conclusion

Service Mesh and API Gateway have clear functional boundaries, but the trend is toward convergence: code reuse, sidecar‑based gateways, and BFF integration, leading to more flexible, cloud‑native API management.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Cloud Nativeapi-gatewayBFFService MeshSidecar
21CTO
Written by

21CTO

21CTO (21CTO.com) offers developers community, training, and services, making it your go‑to learning and service platform.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.