The Difference Between API Gateways and Service Mesh
The Difference Between API Gateways and Service Mesh
by marco palladino
The Difference
Between API Gateways
and Service Mesh
Why API Management and Service Mesh are
Complementary Patterns for Different Use Cases
1
The Difference Between API Gateways and Service Mesh
Content
Introduction 3
API Gateways 5
1. APIs as a Product 7
2. Service Connectivity 9
Service Mesh 13
1. Service Connectivity 17
Cheat Sheet 22
2
The Difference Between API Gateways and Service Mesh
Introduction
For many years, API Management (APIM) — and
the adoption of API gateways — was the primary
technology used to implement modern API use
cases both inside and outside the data center. API
gateway technology has evolved a lot in the past
decade, capturing bigger and more comprehensive
use cases in what the industry calls “full lifecycle
API management.” It’s not just the runtime that
connects, secures and governs our API traffic on
the data plane of our requests but also a series
of functionalities that enable the creation, testing,
documentation, monetization, monitoring and
overall exposure of our APIs in a much broader
context — and target a wider set of user personas
from start to finish. That is, there is a full lifecycle
of creating and offering APIs as a product to users
and customers, not just the management of the
network runtime that allows us to expose and
consume the APIs (RESTful or not).
3
The Difference Between API Gateways and Service Mesh
4
The Difference Between API Gateways and Service Mesh
API Gateways
The API gateway pattern describes an additional
hop in the network that every request will have
to go through in order to consume the underlying
APIs. In this context, some people call the API
gateway a centralized deployment.
5
The Difference Between API Gateways and Service Mesh
6
The Difference Between API Gateways and Service Mesh
1. APIs as a Product
7
The Difference Between API Gateways and Service Mesh
8
The Difference Between API Gateways and Service Mesh
2 - Service Connectivity
9
The Difference Between API Gateways and Service Mesh
10
The Difference Between API Gateways and Service Mesh
11
The Difference Between API Gateways and Service Mesh
12
The Difference Between API Gateways and Service Mesh
Service Mesh
With service mesh, we are identifying a pattern
that fundamentally improves how we build
service-to-service connectivity among two or
more services running in our systems. Every
time a service wants to make a network request
to another service (for example, a monolith
consuming the database or a microservice
consuming another microservice), we want to take
care of that network request by making it more
secure and observable, among other concerns.
13
The Difference Between API Gateways and Service Mesh
Prior to service mesh, the teams are writing and maintaining code
to manage the network connectivity to third-party services. Different
implementations will exist to support different
languages/frameworks.
14
The Difference Between API Gateways and Service Mesh
We run one instance of the proxy (in peach) alongside every instance
of our services.
15
The Difference Between API Gateways and Service Mesh
16
The Difference Between API Gateways and Service Mesh
1. Service Connectivity
17
The Difference Between API Gateways and Service Mesh
18
The Difference Between API Gateways and Service Mesh
19
The Difference Between API Gateways and Service Mesh
20
The Difference Between API Gateways and Service Mesh
21
The Difference Between API Gateways and Service Mesh
Cheat Sheet
It is clear by looking at the use cases that there
is an area of overlap between API gateways
and service meshes, and that is the service
connectivity use case.
22
The Difference Between API Gateways and Service Mesh
23
The Difference Between API Gateways and Service Mesh
24
The Difference Between API Gateways and Service Mesh
25
Konghq.com
Kong Inc.
contact@konghq.com