By WalkingTree   October 07 , 2020

The role of Service Mesh and API Gateways in Microservice Architecture

If you’re into microservices, you might’ve heard about Service Mesh and API gateways multiple times. Often people get confused between these two. Let’s take a look at service meshes and API gateways in detail and see when to use it. 

Service Mesh 

A service mesh manages service-to-service communications in a distributed software system. These network communications are the east-west type – indicating the flow of traffic inside a data center, Kubernetes cluster, or a distributed system.

Service meshes have many advantages in microservice architecture. They allow you to perform dynamic service discovery thus aiding with networking and traffic management. 

Further, by providing health checks, retires, and circuit breaking, they improve the baseline reliability of applications. Additionally, they allow mutual TLS which increases the security of service to service communications.

When to use Service Mesh? 

  • When you need to achieve L4/L7 service communication 
  • When you can deploy sidecar proxies for every single service instance 
  • When services can share the same CA certificate in order to establish secure communication

API Gateway 

An API Gateway acts as a single entry point into a cluster, data center, or a group of distributed services. In the network topology, it is referred to as north-south traffic. More often than not, it is the mobile clients who fall into this type of network traffic.

An API Gateway takes calls from clients and routes those to appropriate services and it can also translate protocols. Other benefits of using an API gateway include abstraction, authentication, traffic control, and API monitoring/ monetization. 

When to use API Gateway?

  • When you need to achieve L7 service communication with security 
  • When you want to expose the API as a product with/without the monetization 
  • When you want to provide the API full lifecycle management to the developers 
  • When you need to translate the protocols of service communications

Read on to know more about the role of Service Mesh and API Gateway in a Microservices architecture.


Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.