Whitepaper Service Mesh and API Management
Whitepaper Service Mesh and API Management
Executive summary .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Conclusion .. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
2
Executive summary
3
01. What microservices got right
4
Monolith Microservices
Large blocks of code Small services composing an application
5
02. Where microservices alone fall short
99%
of organizations
Secure
inter-service
adopting microservices communications
report challenges* Traffic control
and fault
tolerance
Web experience
SAP
6
complicate the situation the AAA needs may differ from
one network call to another.
2. Traffic control and fault tolerance: A form of traffic
management is needed to prioritize all your inter-service
network calls. For a variety of reasons, some paths
between services might not be available. In these
situations, your network must cater for failure situations or
fault tolerance.
3. Management and monitoring: In a microservices
architecture, services are owned and managed by multiple
teams. These silos often result in inconsistent policy
enforcement and governance. Furthermore, each of these
teams might use a disparate set of DevOps tools for
management and monitoring.
Martin Fowler, a prominent author and speaker on software
development, provides a good comparison of the advantages
and challenges that come with adopting microservices. One
challenge he highlights is the operational complexity
microservices can bring. While each service may be easier to
understand compared to a monolith, complexity isn’t eliminated.
To solve these challenges, many organizations are forced to
custom code governance considerations behind microservices
into the service code itself. This complexity can stifle innovation
and agility, negating the promise of microservices.
7
03. How a service mesh solves
microservices challenges
Kubernetes cluster
Control plane
8
sidecars. These are lightweight reverse-proxy processes
deployed alongside each service process in a separate container.
Sidecars intercept the inbound and outbound traffic of each
service, and act according to the security and communication
rules as specified by a control plane. The developer can
configure and add policies at the control plane level, and
abstract the governance considerations behind microservices
from the service code, regardless of the technology used to
build. Common policies include circuit breakers, timeout
implementation, load balancing, service discovery, and security
(transport layer security and mutual authentication).
Service mesh as a concept has evolved over time. Initially,
microservices adopters embraced the “smart endpoints and
dumb pipes” principle for all functionality. They soon realized
that it made more sense to provide system-wide policies for
common capabilities like routing, rate limiting, and security.
Netflix was the first to separate out the application networking
layer, creating their famous OSS stack including Hystrix, Eureka,
and Ribbon among others. This was followed by Envoy, a high-
performance, distributed proxy originally developed at Lyft. Such
technologies provided the foundations for the service mesh.
Most service mesh offerings, such as Istio, are deployed into a
Kubernetes cluster. While there are many open source service
mesh projects and other commercial offerings available, Istio
thus far has emerged as the defacto market standard.
9
04. Is a service mesh enough? What
role does API management play?
10
For security reasons, it is best practice to apply an API gateway
in front of services with external consumers. Without any edge-
or gateway-level security, a malicious user that directly calls a
service within a Kubernetes cluster can easily obtain the
identity of the cluster namespace and service. For example, a
web user can identify this information using the “inspect
element” feature on a web browser.
We can then apply API-level security on these gateways. We
might apply an OAuth policy to enforce external facing user
authentication, XML/JSON threat protection to validate
potential malicious payloads, or policies to protect the cluster
from DoS and WaF attacks.
Applying the appropriate protections to external facing services
opens the door to making these services discoverable.
Developers can reuse microservices to avoid any duplication of
business logic across multiple services. Ideally, this involves a
centralized and secure location through which developers can
publish and discover services to use in future projects.
Let’s look at an example of a bank to illustrate this. A bank
typically has several departments (e.g. mortgage, personal
banking, corporate banking, insurance), but has similar needs
for services in each department (e.g. credit checks, bank
physical locations, etc.). The bank doesn’t want to duplicate
effort just because these services are used by different
departments or exposed to different channels. Ideally, this
bank, and any organization using microservices, will have a
developer portal or some location where they can publish and
reuse these services.
11
For most organizations, it will take years to break the monolith
components that currently exist in their software landscape
into microservices. It’s likely that both monoliths and
microservices will coexist for some time. Remaining monoliths
still need to be managed and secured, along with all other
microservices in an enterprise.
Channels
Ecommerce monolith
Figure 6: Banks serve their various channels using both monoliths and microservices.
12
05. Building an application network
on MuleSoft’s Anypoint Platform
13
Order status
API
Customer
data API
Product Transaction
info history
SAP
SAP
14
06. Anypoint Service Mesh —
Extending the application network
Internal and
external APIs
Anypoint Platform
Discover Manage Secure
API-led connectivity for microservices
Kubernetes cluster
Mule applications
Figure 9: Extend the benefits of an application network with Anypoint Service Mesh.
15
those built leveraging the Mule runtime engine. This
allows customers to:
› Discover and leverage any service in any architecture
y Visualize microservice dependencies using the
application network graph.
y Empower innovation teams to build with technologies
that best align to their skillsets.
y Maximize adoption and reuse by adding microservices
to Anypoint Exchange.
16
Conclusion
17
18
About MuleSoft