WHY GARTNER’S “CONTEXT MESH” CHANGES EVERYTHING AI CONNECTIVITY: THE ROAD AHEAD DON’T MISS API + AI SUMMIT 2026 SEPT 30 – OCT 1
  • [Why Kong](/company/why-kong)Why Kong
    • Explore the unified API Platform
        • BUILD APIs
        • [
          Kong Insomnia](/products/kong-insomnia)
          Kong Insomnia
        • [
          API Design](/products/kong-insomnia/api-design)
          API Design
        • [
          API Mocking](/products/kong-insomnia/api-mocking)
          API Mocking
        • [
          API Testing and Debugging](/products/kong-insomnia/api-testing-and-debugging)
          API Testing and Debugging
        • [
          MCP Client](/products/kong-insomnia/mcp-client)
          MCP Client
        • RUN APIs
        • [
          API Gateway](/products/kong-gateway)
          API Gateway
        • [
          Context Mesh](/products/kong-konnect/features/context-mesh)
          Context Mesh
        • [
          AI Gateway](/products/kong-ai-gateway)
          AI Gateway
        • [
          Event Gateway](/products/event-gateway)
          Event Gateway
        • [
          Kubernetes Operator](/products/kong-gateway-operator)
          Kubernetes Operator
        • [
          Service Mesh](/products/kong-mesh)
          Service Mesh
        • [
          Ingress Controller](/products/kong-ingress-controller)
          Ingress Controller
        • [
          Runtime Management](/products/kong-konnect/features/runtime-management)
          Runtime Management
        • DISCOVER APIs
        • [
          Developer Portal](/products/kong-konnect/features/developer-portal)
          Developer Portal
        • [
          Service Catalog](/products/kong-konnect/features/api-service-catalog)
          Service Catalog
        • [
          MCP Registry](/products/mcp-registry)
          MCP Registry
        • GOVERN APIs
        • [
          Metering and Billing](/products/kong-konnect/features/usage-based-metering-and-billing)
          Metering and Billing
        • [
          APIOps and Automation](/products/apiops-automation)
          APIOps and Automation
        • [
          API Observability](/products/kong-konnect/features/api-observability)
          API Observability
        • [Why Kong?](/company/why-kong)Why Kong?
      • CLOUD
      • [Cloud API Gateways](/products/kong-konnect/features/dedicated-cloud-gateways)Cloud API Gateways
      • [Need a self-hosted or hybrid option?](/products/kong-enterprise)Need a self-hosted or hybrid option?
      • COMPARE
      • [Considering AI Gateway alternatives? ](/performance-comparison/ai-gateway-alternatives)Considering AI Gateway alternatives?
      • [Kong vs. Postman](/performance-comparison/kong-vs-postman)Kong vs. Postman
      • [Kong vs. MuleSoft](/performance-comparison/kong-vs-mulesoft)Kong vs. MuleSoft
      • [Kong vs. Apigee](/performance-comparison/kong-vs-apigee)Kong vs. Apigee
      • [Kong vs. IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs. IBM
      • GET STARTED
      • [Sign Up for Kong Konnect](/products/kong-konnect/register)Sign Up for Kong Konnect
      • [Documentation](https://developer.konghq.com/)Documentation
      • FOR PLATFORM TEAMS
      • [Developer Platform](/solutions/building-developer-platform)Developer Platform
      • [Kubernetes and Microservices](/solutions/build-on-kubernetes)Kubernetes and Microservices
      • [Observability](/solutions/observability)Observability
      • [Service Mesh Connectivity ](/solutions/service-mesh-connectivity)Service Mesh Connectivity
      • [Kafka Event Streaming](/solutions/kafka-stream-api-management)Kafka Event Streaming
      • FOR EXECUTIVES
      • [AI Connectivity](/ai-connectivity)AI Connectivity
      • [Open Banking](/solutions/open-banking)Open Banking
      • [Legacy Migration](/solutions/legacy-api-management-migration)Legacy Migration
      • [Platform Cost Reduction](/solutions/api-platform-consolidation)Platform Cost Reduction
      • [Kafka Cost Optimization](/solutions/reduce-kafka-cost)Kafka Cost Optimization
      • [API Monetization](/solutions/api-monetization)API Monetization
      • [AI Monetization](/solutions/ai-monetization)AI Monetization
      • [AI FinOps](/solutions/ai-cost-governance-finops)AI FinOps
      • FOR AI TEAMS
      • [AI Governance](/solutions/ai-governance)AI Governance
      • [AI Security](/solutions/ai-security)AI Security
      • [AI Cost Control](/solutions/ai-cost-optimization-management)AI Cost Control
      • [Agentic Infrastructure](/solutions/agentic-ai-workflows)Agentic Infrastructure
      • [MCP Production](/solutions/mcp-production-and-consumption)MCP Production
      • [MCP Traffic Gateway](/solutions/mcp-governance)MCP Traffic Gateway
      • FOR DEVELOPERS
      • [Mobile App API Development](/solutions/mobile-application-api-development)Mobile App API Development
      • [GenAI App Development](/solutions/power-openai-applications)GenAI App Development
      • [API Gateway for Istio](/solutions/istio-gateway)API Gateway for Istio
      • [Decentralized Load Balancing](/solutions/decentralized-load-balancing)Decentralized Load Balancing
      • BY INDUSTRY
      • [Financial Services](/solutions/financial-services-industry)Financial Services
      • [Healthcare](/solutions/healthcare)Healthcare
      • [Higher Education](/solutions/api-platform-for-education-services)Higher Education
      • [Insurance](/solutions/insurance)Insurance
      • [Manufacturing](/solutions/manufacturing)Manufacturing
      • [Retail](/solutions/retail)Retail
      • [Software & Technology](/solutions/software-and-technology)Software & Technology
      • [Transportation](/solutions/transportation-and-logistics)Transportation
      • [See all Solutions](/solutions)See all Solutions
  • [Pricing](/pricing)Pricing
      • DOCUMENTATION
      • [Kong Konnect](https://developer.konghq.com/konnect/)Kong Konnect
      • [Kong Gateway](https://developer.konghq.com/gateway/)Kong Gateway
      • [Kong Mesh](https://developer.konghq.com/mesh/)Kong Mesh
      • [Kong AI Gateway](https://developer.konghq.com/ai-gateway/)Kong AI Gateway
      • [Kong Event Gateway](https://developer.konghq.com/event-gateway/)Kong Event Gateway
      • [Kong Insomnia](https://developer.konghq.com/insomnia/)Kong Insomnia
      • [Plugin Hub](https://developer.konghq.com/plugins/)Plugin Hub
      • EXPLORE
      • [Blog](/blog)Blog
      • [Learning Center](/blog/learning-center)Learning Center
      • [eBooks](/resources/e-book)eBooks
      • [Reports](/resources/reports)Reports
      • [Demos](/resources/demos)Demos
      • [Customer Stories](/customer-stories)Customer Stories
      • [Videos](/resources/videos)Videos
      • EVENTS
      • [API + AI Summit](/events/conferences/api-ai-summit)API + AI Summit
      • [Agentic Era World Tour](/agentic-era-world-tour)Agentic Era World Tour
      • [Webinars](/events/webinars)Webinars
      • [User Calls](/events/user-calls)User Calls
      • [Workshops](/events/workshops)Workshops
      • [Meetups](/events/meetups)Meetups
      • [See All Events](/events)See All Events
      • FOR DEVELOPERS
      • [Get Started](https://developer.konghq.com/)Get Started
      • [Community](/community)Community
      • [Certification](/academy/certification)Certification
      • [Training](https://education.konghq.com)Training
      • COMPANY
      • [About Us](/company/about-us)About Us
      • [We're Hiring!](/company/careers)We're Hiring!
      • [Press Room](/company/press-room)Press Room
      • [Contact Us](/company/contact-us)Contact Us
      • [Kong Partner Program](/partners)Kong Partner Program
      • [Enterprise Support Portal](https://support.konghq.com/s/)Enterprise Support Portal
      • [Documentation](https://developer.konghq.com/?_gl=1*tphanb*_gcl_au*MTcxNTQ5NjQ0MC4xNzY5Nzg4MDY0LjIwMTI3NzEwOTEuMTc3MzMxODI2MS4xNzczMzE4MjYw*_ga*NDIwMDU4MTU3LjE3Njk3ODgwNjQ.*_ga_4JK9146J1H*czE3NzQwMjg1MjkkbzE4OSRnMCR0MTc3NDAyODUyOSRqNjAkbDAkaDA)Documentation
  • [](/search)
  • [Login](https://cloud.konghq.com/login)Login
  • [Book Demo](/contact-sales)Book Demo
  • [Get Started](/products/kong-konnect/register)Get Started
[Blog](/blog)Blog
  • [AI Gateway](/blog/tag/ai-gateway)AI Gateway
  • [AI Security](/blog/tag/ai-security)AI Security
  • [AIOps](/blog/tag/aiops)AIOps
  • [API Security](/blog/tag/api-security)API Security
  • [API Gateway](/blog/tag/api-gateway)API Gateway
|
    • [API Management](/blog/tag/api-management)API Management
    • [API Development](/blog/tag/api-development)API Development
    • [API Design](/blog/tag/api-design)API Design
    • [Automation](/blog/tag/automation)Automation
    • [Service Mesh](/blog/tag/service-mesh)Service Mesh
    • [Insomnia](/blog/tag/insomnia)Insomnia
    • [View All Blogs](/blog/page/1)View All Blogs
We're Entering the Age of AI Connectivity [Read more](/blog/news/the-age-of-ai-connectivity)Read moreProducts & Agents:
    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong API Gateway](/products/kong-gateway)Kong API Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Metering & Billing](/products/usage-based-metering-and-billing)Kong Metering & Billing
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
  • [Documentation](https://developer.konghq.com)Documentation
  • [Book Demo](/contact-sales)Book Demo
  1. Home
  2. Blog
  3. Engineering
  4. From Kinesis to Kafka
[Engineering](/blog/engineering)Engineering
March 24, 2023
5 min read

# From Kinesis to Kafka

Zhong Chen

Real-time Data Analytics Platform from Zero to One

At the beginning of 2021, a brand new data team was assembled to build a real-time data platform for Kong’s SaaS platform, Konnect. Our mission is to provide top-notch real-time API analytics features for Konnect customers.

alt_text

V1 platform architecture

The initial backend consisted of three main components: an ingestion service to handle incoming telemetry requests, an intermediate message queue, and a real-time OLAP data storage.

After evaluating multiple technologies, we settled on Apache Druid for our backend data storage. For streaming ingestion, Druid supports both AWS Kinesis and Kafka. We chose to use the former as our message queue because the following reasons:

  • We prefer fully managed services to minimize operational overheads
  • We wanted to have a solution running in production quickly, and it is easier and faster to set up Kinesis.
  • Some team members had prior experience of using Kinesis

In two months, we successfully rolled out the V1 version of the platform in production.

The Inception of Kafka Migration

Once we had our initial data pipeline running in production, we started working on additional capabilities to support new use cases. We introduced a new data enhancement service in our stack which was responsible for extending the original dataset with additional metadata.

alt_text

Enhancer service added

As time passed on, we did encounter some pain points and limitations that prompted us to look for better solutions.

  • Compared to Kafka, Kinesis doesn’t support [transaction write across multiple topics](https://www.confluent.io/blog/transactions-apache-kafka/)transaction write across multiple topics, without which it is impossible to fully implement exactly once semantics.
  • We use Go for building our backend service, but there are not many actively maintained Go Kinesis libraries in the community. In the end, we chose [Kinsumer](https://github.com/twitchscience/kinsumer)Kinsumer after comparing different options.
  • Kinsumer provides two options for storing Kinesis offsets, DynamoDB and RDS. Despite it is very easy to set up DynamoDB, we still prefer not managing additional infrastructure resources.

Furthermore, as Konnect became more sophisticated as a SaaS product, other teams also had new use cases that required a message queue in the overall architecture. The company reached the point where it would be more cost effective to run a Kafka cluster ourselves, so our SRE team started to work on offering Kafka as a shared service for all internal teams. We quickly decided that it was a good time for us to move away from Kinesis and switch to use the internal Kafka cluster.

AWS MSK Integration

When it comes to integrating AWS MSK with our Druid cluster, it requires more infrastructure setup for Kafka than Kinesis. There are two main reasons for that. First, our Druid cluster lives in a separate AWS account because we use a third party for managing our cluster, while our Kafka cluster lives in our main AWS account. Second, although MSK is a managed AWS service, the Kafka cluster is still deployed in our own VPC and additional network setup is required for our Druid cluster to access it.

MSK Private Link Setup

There are [several connectivity patterns](https://aws.amazon.com/blogs/big-data/secure-connectivity-patterns-to-access-amazon-msk-across-aws-regions/)several connectivity patterns for accessing AWS MSK clusters. In our case, we need a setup to bridge two VPCs across two different AWS accounts. We chose to use AWS Private Link as it was the most suitable solution for our network setup. Luckily, the end to end setup was well explained in an AWS [blog post](https://aws.amazon.com/blogs/big-data/how-goldman-sachs-builds-cross-account-connectivity-to-their-amazon-msk-clusters-with-aws-privatelink/)blog post, so we didn’t have too much trouble to get everything wired up. We wanted to avoid modifying brokers’ advertised ports as pointed out in the post, so we picked the pattern where we fronted a dedicated interface point for each broker.

alt_text

Front each MSK broker with a unique dedicated interface endpoint

MSK Authentication Setup

AWS IAM is used extensively in our infrastructure to enforce access control, and a dedicated IAM role was created for our Druid cluster to access a set of topics. There is an explicit option for configuring an AWS IAM role for Kinesis ingestion jobs. However, this part is not well documented for Kafka ingestion jobs.

There are two key steps for setting up AWS IAM authentication for Druid Kafka ingestion jobs.

  1. Installing the additional AWS MSK IAM jar on Druid nodes. The jar needs to be placed inside the Druid kafka indexing service.
  2. Configuring the Kafka ingestion job to use the right IAM role

We have the below script to install the additional jar file as part of the node bootstrap process.

MSK_JAR=aws-msk-iam-auth-1.1.4-all.jar
JAR_REMOTE_REPO=https://github.com/aws/aws-msk-iam-auth/releases/download/v1.1.4
KAFKA_EXT_DIR=/opt/extensions/druid-kafka-indexing-service
JAR_REMOTE_LOC=$JAR_REMOTE_REPO/$MSK_JAR
JAR_LOCAL_LOC=$KAFKA_EXT_DIR/$MSK_JAR

if ! [[ -f "${JAR_LOCAL_LOC}" ]]
  then
  wget $JAR_REMOTE_LOC -P $KAFKA_EXT_DIR
fi

Here is a sample consumer property configuration for the Druid Kafka ingestion job.

"consumerProperties": {
 "bootstrap.servers": "",
 "security.protocol": "SASL_SSL",
 "sasl.mechanism": "AWS_MSK_IAM",
 "sasl.jaas.config": "software.amazon.msk.auth.iam.IAMLoginModule required awsRoleArn=&#039;arn:aws:iam::<account>:role/<role name>&#039;;",
 "sasl.client.callback.handler.class": "software.amazon.msk.auth.iam.IAMClientCallbackHandler"
},

Zero Downtime Live Data Migration

Our goal is having zero downtime for our services during the data migration process. To that end, we opted for a double-writing strategy where we double-write our incoming data in both Kinesis and Kafka, and created a separate Kafka data source for each corresponding Kinesis data source in Druid.

Druid Data Migration

In order to make sure we have data parity between the existing Kinesis data sources and the new Kafka data sources, we followed the below migration steps for Druid:

  1. Pick a specific date X as our cutoff point
  2. Drop all the existing data for Kafka data source until X. This can be easily achieved in Druid by dropping all the segments before X.
  3. Replicate all data from Kinesis data source to Kafka data source until X. We ran a single batch indexing job for data migration for each data source.

The below two images illustrate the overall migration process for our Druid data sources.

alt_text

Before the data migration

alt_text

After the data migration

Feature Flag Controlled UI Rollout

On the frontend, we added a feature flag to switch between using Kinesis data sources and using Kafka data sources. The flag allowed us to test the new feature with our internal organizations before carefully rolling it out to all customers.

Overall the migration went very smooth for us. The whole migration process roughly took 2 months to complete from beginning to end.

Into to the New Era

We have been running our Kafka ingestion in production for some time now and found several areas we really like, including:

  • [Kafka-go](https://github.com/segmentio/kafka-go)Kafka-go from Segment is much better than Kinsumer library. It has more active development and community support.
  • Kafka-UI allows us to examine each individual message of any Kafka topics, which is a productive boost in the development phase.
  • For local development, we don’t have to depend on an external service like AWS Kinesis, since we can spin up a local Kafka cluster easily.
  • Better resource utilization. Kinesis is charged based on the number of shards for each used Kinesis stream, while MSK cost mostly depends on provisioned compute and storage regardless how many topics and partitions you have. As a result, we have realized higher resource utilization and achieved better engineering efficiency by leveraging the multi-tenancy nature of AWS MSK.
- [Automation](/blog/tag/automation)Automation- [Kafka](/blog/tag/kafka)Kafka- [API Development](/blog/tag/api-development)API Development

## More on this topic

_Videos_

## From Zero to Hero: A Roadmap for Automating the Development Lifecycle Across Any Environment with GitOps

_Demos_

## API Security Automation: From Development to Deployment

## See Kong in action

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

[Get a Demo](/contact-sales)Get a Demo
**Topics**
- [Automation](/blog/tag/automation)Automation- [Kafka](/blog/tag/kafka)Kafka- [API Development](/blog/tag/api-development)API Development
Zhong Chen

Recommended posts

# Docs as Code: Screenshot Automation at Kong

[Engineering](/blog)EngineeringOctober 24, 2023

Imagine this: You're documenting an unreleased feature, and your documentation requires screenshots. However, you're working in an internal environment that includes features you don't want to reveal to the public. What do you do? We faced this exac

Angel Guarisma
[](https://konghq.com/blog/engineering/docs-as-code-screenshot-automation)

# Use ChatGPT to Develop a SOAP/XML Custom Kong Konnect Plugin

[Engineering](/blog)EngineeringAugust 1, 2023

Today, APIs are based on modern communication patterns: REST, GraphQL, or gRPC. But two decades ago, the majority of Web Services were developed with SOAP/XML. In this blog, we’ll explain how Kong Konnect can manage SOAP/XML Web Services by creat

Jerome Guillaume
[](https://konghq.com/blog/engineering/chatgpt-soap-xml-kong-plugin)

# Cut Costs, Boost Speed: The AI Proxy Revolution for Developers

[Enterprise](/blog)EnterpriseFebruary 14, 2025

The AI Proxy Revolution has changed the way developers operate, helping save money and speed up development. This new approach improves how systems talk to each other and allows for quicker, more efficient data exchange. Modern software development

Kong
[](https://konghq.com/blog/enterprise/how-ai-proxies-cut-development-costs)

# Bringing Identity-Aware Security & Policy Enforcement to Event Streaming

[Product Releases](/blog)Product ReleasesMarch 25, 2026

The widespread adoption of Kafka and event streaming platforms is evident across several enterprises, where they serve as the backbone of critical operations, ranging from financial transactions to AI inference pipelines. However, in the domains of

Hugo Guerrero
[](https://konghq.com/blog/product-releases/kong-event-gateway-1-1)

# Exposing Kafka to the Internet: Solving External Access

[Enterprise](/blog)EnterpriseFebruary 20, 2026

Your Kafka Doesn't Have to Live Behind a Wall When teams resort to VPC peering or PrivateLink to expose Kafka, they're not solving the problem — they're managing it, one network topology decision at a time. Every new external consumer adds compl

Anthony Gatti
[](https://konghq.com/blog/enterprise/kafka-external-access)

# Guide to API Testing: Understanding the Basics

[Engineering](/blog)EngineeringSeptember 1, 2025

Key Takeaways API testing is crucial for ensuring the reliability, security, and performance of modern applications. Different types of testing, such as functional, security, performance, and integration testing, should be employed to cover all aspe

Adam Bauman
[](https://konghq.com/blog/engineering/api-testing-understanding-the-basics)

# 6 Reasons Why Kong Insomnia Is Developers' Preferred API Client

[Engineering](/blog)EngineeringAugust 8, 2025

So, what exactly is Kong Insomnia? Kong Insomnia is your all-in-one platform for designing, testing, debugging, and shipping APIs at speed. Built for developers who need power without bloat, Insomnia helps you move fast whether you’re working solo,

Juhi Singh
[](https://konghq.com/blog/engineering/why-kong-insomnia-is-developers-preferred-api-client)

## 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](/contact-sales)Get a Demo
Ask AI for a summary of Kong
  • [](https://chatgpt.com/s/t_69b981cfa37081919ce25ce107c431c1)
  • [](https://share.google/aimode/hyefOiNwl8pg8W99d)
  • [](https://www.perplexity.ai/search/what-solutions-does-kong-offer-VsYWPddxQjajgvLA4B9hjQ)
Stay connected

## step-0

    • Company
    • [About Kong](/company/about-us)About Kong
    • [Customers](/customer-stories)Customers
    • [Careers](/company/careers)Careers
    • [Press](/company/press-room)Press
    • [Events](/events)Events
    • [Contact](/company/contact-us)Contact
    • [Pricing](/pricing)Pricing
    • Legal
    • [Terms](/legal/terms-of-use)Terms
    • [Privacy](/legal/privacy-policy)Privacy
    • [Trust and Compliance](https://trust.konghq.com)Trust and Compliance
    • Platform
    • [Kong AI Gateway](/products/kong-ai-gateway)Kong AI Gateway
    • [Kong Konnect](/products/kong-konnect)Kong Konnect
    • [Kong Gateway](/products/kong-gateway)Kong Gateway
    • [Kong Event Gateway](/products/event-gateway)Kong Event Gateway
    • [Kong Insomnia](/products/kong-insomnia)Kong Insomnia
    • [Documentation](https://developer.konghq.com)Documentation
    • [Book Demo](/contact-sales)Book Demo
    • Compare
    • [AI Gateway Alternatives](/performance-comparison/ai-gateway-alternatives)AI Gateway Alternatives
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
    • [Kong vs IBM](/performance-comparison/ibm-api-connect-vs-kong)Kong vs IBM
    • [Kong vs Postman](/performance-comparison/kong-vs-postman)Kong vs Postman
    • [Kong vs Mulesoft](/performance-comparison/kong-vs-mulesoft)Kong vs Mulesoft
    • Explore More
    • [Open Banking API Solutions](/solutions/open-banking)Open Banking API Solutions
    • [API Governance Solutions](/solutions/api-governance)API Governance Solutions
    • [Istio API Gateway Integration](/solutions/istio-gateway)Istio API Gateway Integration
    • [Kubernetes API Management](/solutions/build-on-kubernetes)Kubernetes API Management
    • [API Gateway: Build vs Buy](/campaign/secure-api-scalability)API Gateway: Build vs Buy
    • [Kong vs Apigee](/performance-comparison/kong-vs-apigee)Kong vs Apigee
    • Open Source
    • [Kong Gateway](https://developer.konghq.com/gateway/install/)Kong Gateway
    • [Kuma](https://kuma.io/)Kuma
    • [Insomnia](https://insomnia.rest/)Insomnia
    • [Kong Community](/community)Kong Community

Kong enables the connectivity layer for the agentic era – securely connecting, governing, and monetizing APIs and AI tokens across any model or cloud.

  • Japanese
  • Frenchcoming soon
  • Spanishcoming soon
  • Germancoming soon
© Kong Inc. 2026
Interaction mode