DevOps.com

AWS BugBust Challenge
  • Latest
    • Articles
    • Features
    • Most Read
    • News
    • News Releases
  • Topics
    • AI
    • Continuous Delivery
    • Continuous Testing
    • Cloud
    • Culture
    • DevSecOps
    • Enterprise DevOps
    • Leadership Suite
    • DevOps Practice
    • ROELBOB
    • DevOps Toolbox
    • IT as Code
  • Videos/Podcasts
    • DevOps Chats
    • DevOps Unbound
  • Webinars
    • Upcoming
    • On-Demand Webinars
  • Library
  • Events
    • Upcoming Events
    • On-Demand Events
  • Sponsored Communities
    • AWS Community Hub
    • CloudBees
    • IT as Code
    • Rocket on DevOps.com
    • Traceable on DevOps.com
    • Quali on DevOps.com
  • Related Sites
    • Techstrong Group
    • Container Journal
    • Security Boulevard
    • Techstrong Research
    • DevOps Chat
    • DevOps Dozen
    • DevOps TV
    • Digital Anarchist
  • Media Kit
  • About
  • AI
  • Cloud
  • Continuous Delivery
  • Continuous Testing
  • DevSecOps
  • Leadership Suite
  • Practices
  • ROELBOB
  • Low-Code/No-Code
  • IT as Code
  • More Topics
    • Application Performance Management/Monitoring
    • Culture
    • Enterprise DevOps

Home » Blogs » How Are API Management and Service Mesh Different?

How Are API Management and Service Mesh Different?

By: Bill Doerrfeld on January 18, 2022 Leave a Comment

The use of APIs and microservices is increasing—a recent study from F5 estimated that the industry is approaching 200 million total APIs. As organizations expand their use of APIs and microservices, they inevitably require some form of service management architecture. There are primarily two major design options for implementing this: An API management system or a service mesh.

The key distinction between API management and service mesh can be framed using the four cardinal directions. API management is typically adopted for REST services that face external developers—referred to as north-south traffic. On the other hand, service mesh is more commonly used by internal suites of microservices to help control lateral, or east-west, communication. There are more nuances between each, as we’ll cover below, but this is essentially how they’re adopted in practice.

However, this binary is becoming blurred as collections of enterprise digital applications expand and access to cross-company business domains begins to look and feel more like consuming a third-party SaaS. Furthermore, some suggest that with the right controls, service mesh can cater to external users in the same way API management does. What’s more, service mesh and API management are complementary—they can coexist within the same organization and even be deployed in the same projects.

I recently chatted with Mark Cheshire, director of product at Red Hat, about the emergence of both API management and service mesh. According to Cheshire, both approaches accomplished similar goals but evolved very differently. Below, we’ll revisit why these two paradigms emerged and compare and contrast them. In a separate article, we’ll consider when it’s best to integrate them both.

What is API Management?

API management is most often associated with north-south traffic. By exposing your API to the outside world, you enable other developers to connect it to their systems and leverage your data and functionality like building blocks.

API management arose in response to the rise of web APIs. API management is a broad concept encompassing many functions required to expose an API endpoint to the outside world. This can include authentication, authorization, request routing, documentation, rate limiting, monitoring, logging, monetization and life cycle management. A key goal is to make integration easier for the developer consumer. Architecturally, API management follows a gateway pattern. Consumers issue requests to the gateway which then performs routing to the underlying services.

For APIs, the big catalyst was the emergence of Web 2.0, Cheshire explained. Numerous startups began consuming RESTful APIs to connect their web properties and partner ecosystems. Companies also found REST APIs to be a much more straightforward integration approach than SOAP and SOA. They also saw the ease-of-use benefits and adopted API-first designs within their internal infrastructure.

As of 2021, over 70% of APIs are built for internal use. So, do all these services need API management? It depends. “If you communicate externally, you need API management,” explained Cheshire. But, it’s a grey area for services within an enterprise, he says, though inter-domain traffic often could benefit from API management.

A diagram of API management capabilities, from 3scale
A diagram of API management capabilities, from 3scale

Strengths

  • Can enable north-south traffic
  • Protects the boundary of an application
  • Designed to ease external developer consumption
  • Potential for monetization, subscription plans
  • Typically plug-and-play; easier to support
  • Many solutions on the market
  • Developer experience and docs
  • Analytics and reporting

Weaknesses

  • May be heavier than service mesh
  • Fewer open source options; vendor lock-in
  • Analysis paralysis in comparing solutions

What is Service Mesh?

Service mesh is most often associated with controlling east-west communication between internal services. Service meshes like Linkerd, Istio and Kuma make it easier to reimplement similar logic—such as networking, observability, traffic management, security policies and routing—across many microservices from a single control plane.

Service mesh was born to address slightly different challenges than API management. “The transition from monolithic to microservices is all about east-west traffic,” Cheshire said. Companies found it slower to innovate monolithic applications and thus broke them up into microservices that communicate via APIs. But these microservices all needed similar operational capabilities, which would be cumbersome to repeat over and over for each service.

“For one monolithic app blown into microservices, you may not even need a service mesh,” said Cheshire. “However, when you have hundreds or thousands, that’s when applying service mesh becomes critical.”

Istio service mesh architecture
Istio service mesh architecture

Architecturally, service mesh is typically divided into a data plane and a control plane. The service mesh deploys a sidecar proxy that sits alongside each individual service. Istio, for example, utilizes the Envoy proxy. Other meshes like Linkerd use their own proxy.

Strengths

  • Fits the microservices architecture paradigm well
  • Good for traffic routing; improving resiliency
  • NIST-recommended architecture for achieving zero-trust
  • Many open source options
  • Fits large microservices deployments

Weaknesses

  • Requires a more hands-on approach
  • Potentially more maintenance to support
  • Unnecessary for a single service
  • Requires filter chain add-ons for north-south abilities

Comparing API Management and Service Mesh

API management is predominantly aligned with externalizing APIs to partners. When you do so, maintaining the contract with a consumer is more important to meet SLAs. Thus, API management commonly delivers life cycle management abilities, such as versioning. API management is necessary even if you are exposing a single API, as this service needs to be adequately documented and secured. That being said, these tenants can also be relevant to developers reusing software within an organization—there’s something to be said for adopting a product mindset when dealing with internal APIs.

On the other hand, service mesh is more aligned with controlling internal networks. Microservices are rarely deployed alone; typically, multiple microservices make up an application. And, many more might exist throughout an organization for unique purposes. Service mesh thus helps maintain consistency throughout large networks of decoupled microservices. Service mesh is also a rapidly growing field, experiencing an explosion of new development and production use. A Cloud Native Computing Foundation (CNCF) report found that service mesh use rose in production by 50% in 2020 alone.

To put the comparison another way, William Morgan, CEO, Buoyant described how API management is more about business logic, whereas service mesh handles intra-cluster operations:

“API gateways typically handle ingress concerns, not intra-cluster concerns, and often deal with a certain amount of business logic, e.g. ‘User X is only allowed to make 30 requests a day’. By contrast, a service mesh like Linkerd is focused on operational concerns (e.g. instrument these calls and report their success rate; secure this communication between these pods) and purposefully avoids the mixing of business and operational logic; and focuses on communication between the services on the cluster.”

Though service mesh and API management achieve slightly different aims, both layers make it easier to reuse web-based services. And, they certainly can be used in conjunction. For example, you could build API-first microservices with service mesh and simultaneously use API management to expose certain domains. In another article, we’ll consider when it’s best to integrate the two technologies.

Recent Posts By Bill Doerrfeld
  • When to Use API Management and Service Mesh Together
  • Trends in Blockchain for 2022
  • Best of 2021 – 11 Open Source DevOps Tools We Love For 2021
More from Bill Doerrfeld
Related Posts
    Related Categories
  • API
  • Blogs
  • Cloud Management
  • DevOps
  • DevOps and Open Technologies
  • DevOps Practice
  • Enterprise DevOps
  • Features
  • Promo
    Related Topics
  • API management
  • APIs
  • managing microservices
  • REST APIs
  • service mesh
Show more
Show less

Filed Under: API, Blogs, Cloud Management, DevOps, DevOps and Open Technologies, DevOps Practice, Enterprise DevOps, Features, Promo Tagged With: API management, APIs, managing microservices, REST APIs, service mesh

Sponsored Content
Featured eBook
The State of Open Source Vulnerabilities 2020

The State of Open Source Vulnerabilities 2020

Open source components have become an integral part of today’s software applications — it’s impossible to keep up with the hectic pace of release cycles without them. As open source usage continues to grow, so does the number of eyes focused on open source security research, resulting in a record-breaking ... Read More
« Infrastructure as Code (IaC): Why Collaboration Is Key
Using Open Source to Secure Software Supply Chains »

TechStrong TV – Live

Watch latest episodes and shows

DevOps.com Poll

Get The Top Stories of the Week

  • View DevOps.com Privacy Policy
  • This field is for validation purposes and should be left unchanged.

Upcoming Webinars

GitOps
Monday, January 24, 2022 - 1:00 pm EST
How to Fix NPM Vulnerabilities Quickly and Painlessly
Tuesday, January 25, 2022 - 11:00 am EST
DevSecOps Best Practices: Automating K8s Network Security Policy
Tuesday, January 25, 2022 - 11:00 am EST

Latest from DevOps.com

CircleCI Adds Free Unlimited Access Tier to CI/CD Service
January 21, 2022 | Mike Vizard
Infrastructure Access Management a Growing DevOps Priority
January 21, 2022 | Nathan Eddy
Securing Software with Intelligent Pipelines
January 20, 2022 | Gunnar Braun
When to Use API Management and Service Mesh Together
January 20, 2022 | Bill Doerrfeld
Zoom-Layoff CEO is Back | Bill Bans Targeted Ads | More FAA 5G Stupidity
January 19, 2022 | Richi Jennings

Most Read on DevOps.com

How Are API Management and Service Mesh Different?
January 18, 2022 | Bill Doerrfeld
Innovation With Software Architectural Excellence
January 17, 2022 | Deepak Gupta
Drumroll, Please! The Winners of the 2021 DevOps Dozen² Awar...
January 19, 2022 | Alan Shimel
Infrastructure as Code (IaC): Why Collaboration Is Key
January 17, 2022 | Veronica Haggar
Zoom-Layoff CEO is Back | Bill Bans Targeted Ads | More FAA ...
January 19, 2022 | Richi Jennings

On-Demand Webinars

DevOps.com Webinar ReplaysDevOps.com Webinar Replays

Download Free eBook

The State of the CI/CD/ARA Market: Convergence
https://library.devops.com/the-state-of-the-ci/cd/ara-market
  • Home
  • About DevOps.com
  • Meet our Authors
  • Write for DevOps.com
  • Media Kit
  • Sponsor Info
  • Copyright
  • TOS
  • Privacy Policy

Powered by Techstrong Group, Inc.

© 2022 ·Techstrong Group, Inc.All rights reserved.