Blog
  • AI Gateway
  • AI Security
  • AIOps
  • API Security
  • API Gateway
|
    • API Management
    • API Development
    • API Design
    • Automation
    • Service Mesh
    • Insomnia
    • View All Blogs
  1. Home
  2. Blog
  3. Enterprise
  4. The Next Generation of API Connectivity: Apache Kafka, API Gateway and Service Mesh
Enterprise
December 17, 2021
5 min read

The Next Generation of API Connectivity: Apache Kafka, API Gateway and Service Mesh

Viktor Gamov
Topics
KafkaAPI GatewayCloud
Share on Social

More on this topic

Videos

End-to-End Tracing with OpenTelemetry and Kong

Videos

APIs + AI: Enterprise Modernization Blueprint

See Kong in action

Accelerate deployments, reduce vulnerabilities, and gain real-time visibility. 

Get a Demo

Let's boldly go where no one has gone before. Get ready, Star Trek fans! Jean-Luc Picard will be representing our microservice.

Jean-Luc Picard

Once we have Jean-Luc in our ship (microservice in production), what happens on day 2? We still need to add authorization, load balancing, rate limiting, etc.

microservice-in-production

With an API gateway, like Kong Gateway, you don't have to know how to do this because a set of program components, called plugins, allow you to implement this without any problem. Kong Gateway is the system that provides you with some additional augmentation, like in Star Trek's Borg Collective. They were pursuing perfection in terms of how this species would communicate.

star-trek-plugins-chart

If you want to have a fancy augmentation for your faceplate, you can get it. If you're going to have a fancy augmentation for your arm, you will get it free from the Borg Collective. Similarly, we get all these superpowers of the Kong Gateway for free.

Gateway Admits!

With Kong Gateway, we can enable all this required functionality on the side of the API gateway. That way, your consumer API calls engage through the API gateway, and Kong translates specific calls to your service. There are hundreds of plugins available with Kong.

kong-plugins-chart

What happens when you have thousands of services? They'll need to communicate with each other. That's where a service mesh comes into play in this log.

Road to Service Mesh

Resistance is futile. You will be assimilated. What I mean by that is all of our microservices, including Jean-Luc Picard, will be a part of the Borg Collective hive mind via a service mesh, like Kuma. That way, they'll always be connected and leverage a unified set of tools.

star-trek-plug-and-play

All these components are plug-and-play. Kuma supports deployments across multiple platform types as an open source service mesh.

star-trek-borg-queen

A service mesh manages communication and configurations via a data plane, like Envoy. Data planes, in this case, are the Borg queen, and the microservices are her drones.

borg-queen

Kuma Mesh Architecture

The control plane is the brain of the microservices operation. It can operate over multiple zones or multiple work Kubes. Communications happen over a proxy, which provides a similar set of functionalities as the API gateway, such as authentication and rate limiting. New microservices, or Borg Collective members, don’t need to know anything going on behind the scenes because the control plane provides it automatically.

kuma-database-chart

Within the service mesh, you can create fancy mutations, enable advanced policies around communication, have submerges. Everything can happen through the control plane.

And this is where we go into space with different quadrants within our service mesh global control plane. We could have some on AWS, Azure or somewhere else. No matter where we're hosting it, our applications will communicate with each other. The drones from one Kube can communicate to drones through another Kube via proxy.

star-trek-cubes

From the real-world perspective, you can have deployments in different places, and you'll see them all in the same UI.

multi-zone-mode-chart

What About Kafka?

Kafka can be used as a bus to help microservices communicate in a data-aware mode.

star-trek-kafka

My friend and former colleague, Gwen Shapira, compared service mesh to Kafka. She mentioned that communicating between microservices can quickly become a tangled mess. And one of the approaches to untangle this communication is providing a unified bus.

microservice-chart-gwen-shapria

For example, events are happening in this log, and we can restore the system's history based on those events. Each event will have a time and be stored somewhere.

log-history

The same concept of a log that you’re using in your application development was taken as a data structure and implemented as a distributed log inside Kafka. Kafka captures all events that happened in the system, providing indirect communication with the consumers of your service.

gwen-shapria-microservice-chart

For example, if service 1 pushes into topic 1, there would be multiple interested consumers. Instead of getting data from service 1, they communicate through the topic. Therefore, they don’t need to know about each other.

Let's Talk Patterns

Event Collaboration Pattern

Most Kafka developers are likely using the event collaboration pattern. Essentially, you have a message box that stores events and services that provide data to the different topics.

shopping-basket-service-flowchart

That's OK, but it's not enough in today's microservices world where you need to have control of the communication between systems. What you need now is an API gateway as an external conduit proxy to allow things to enter your system. Once inside your application ecosystem, you'll need a service mesh to communicate between applications.

application-ecosystem

You could run Kafka and your data awareness services inside the service mesh. Some filters allow the service mesh proxy to understand Kafka protocol. You don’t go in for your adventure without friends, so bring in friends, like your service mesh and API gateway, to have observable and reliable connectivity.

Event Gateway Pattern

In the future, we may be interested in data that we produced through this event gateway pattern. With Kong's new Kafka plugin, we can produce the Kafka topic and systems that we may not have yet. We'll read and process the data from the beginning of time from the event store.

Event Gateway Pattern chart

Conclusion

For those looking for the tl;dr version of this blog, here it is: API gateway admits. Service mesh connects. Kafka streams.

Gateway Admits!

Kong Gateway brings traffic from outside clients to our applications. It's a fancy door to our application functionality that brings traffic to and from the clients of our application.

Mesh Connects!

Kuma provides connectivity between microservices. It connects your application's microservices to allow reliable communication and policy enforcement.

Kafka Streams!

Kafka streams your data, allowing asynchronous communication for use cases where you don’t know the consumer or the data they'll need. Publish it in a Kafka topic to handle.

Feel free to reach out to me on Twitter if you have any questions as you get started with these three solutions @gAmUssa.

Are you interested in learning more about Kong's products? Check out our Kong Summit session demos and recordings.

Topics
KafkaAPI GatewayCloud
Share on Social
Viktor Gamov

Recommended posts

Stay Vendor Agnostic: Using an Abstraction Layer to Navigate Acquisitions

Kong Logo
EnterpriseDecember 12, 2025

The challenges of an acquisition frequently appear in a number of critical areas, especially when dealing with a platform as important as Kafka: API Instability and Change : Merged entities frequently rationalize or re-architect their services, whic

Hugo Guerrero

What is Apache Kafka? Guide for Beginners

Kong Logo
Learning CenterDecember 8, 2025

Apache Kafka is a distributed, fault-tolerant, high-throughput event-streaming platform. LinkedIn originally developed it to handle massive data pipelines. The Apache Software Foundation now maintains this open-source project. The Commit Log Mental

Kong

Kong Event Gateway: Unifying APIs and Events in a Single API Platform

Kong Logo
Product ReleasesMay 13, 2025

Kong customers include some of the most forward-thinking, tech-savvy organizations in the world. And while we’re proud to help them innovate through traditional APIs, the reality is that their ambitions don’t stop there. Increasingly, our customers a

Umair Waheed

Kong Konnect Dedicated Cloud Gateways Add Azure Support

Kong Logo
Product ReleasesSeptember 11, 2024

It’s no secret that building global API infrastructure is a daunting task. In April, we announced the general availability of Kong Konnect Dedicated Cloud Gateways — a fully managed, multi-region API management solution that makes setting up globa

Josh Wigginton

API Gateway vs Load Balancer: Which is Right for Your Application?

Kong Logo
EngineeringApril 25, 2023

API gateways and load balancers are useful tools for building modern applications. While they have some functionality overlaps, they're distinct tools with different purposes and use cases. In this article, we'll discuss the differences between API

Ahmed Koshok

Migration Options for IBM Cloud API Gateway Customers

Kong Logo
EngineeringDecember 14, 2022

IBM recently announced the deprecation of its Cloud API Gateway, a service used to create and manage APIs by placing a gateway in front of existing IBM Cloud endpoints. With this move, IBM Cloud Functions and IBM Cloud Foundry are no longer able to

Syed Mahmood

Building Kong Clusters in AWS with the Terraform API Gateway Module

Kong Logo
EngineeringJanuary 15, 2021

We created the Terraform API gateway module to help you follow DevOps best practices while implementing Kong using infrastructure as code (IaC). Terraform is an open source tool that allows you to implement IaC using a declarative declaration defini

Kong

Ready to see Kong in action?

Get a personalized walkthrough of Kong's platform tailored to your architecture, use cases, and scale requirements.

Get a Demo
Powering the API world

Increase developer productivity, security, and performance at scale with the unified platform for API management, AI gateways, service mesh, and ingress controller.

Sign up for Kong newsletter

    • Platform
    • Kong Konnect
    • Kong Gateway
    • Kong AI Gateway
    • Kong Insomnia
    • Developer Portal
    • Gateway Manager
    • Cloud Gateway
    • Get a Demo
    • Explore More
    • Open Banking API Solutions
    • API Governance Solutions
    • Istio API Gateway Integration
    • Kubernetes API Management
    • API Gateway: Build vs Buy
    • Kong vs Postman
    • Kong vs MuleSoft
    • Kong vs Apigee
    • Documentation
    • Kong Konnect Docs
    • Kong Gateway Docs
    • Kong Mesh Docs
    • Kong AI Gateway
    • Kong Insomnia Docs
    • Kong Plugin Hub
    • Open Source
    • Kong Gateway
    • Kuma
    • Insomnia
    • Kong Community
    • Company
    • About Kong
    • Customers
    • Careers
    • Press
    • Events
    • Contact
    • Pricing
  • Terms
  • Privacy
  • Trust and Compliance
  • © Kong Inc. 2025