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. Engineering
  4. Rapid Application Modernization With Kong Konnect and Apache Camel (Part 1)
Engineering
January 6, 2022
5 min read

Rapid Application Modernization With Kong Konnect and Apache Camel (Part 1)

Simon Green

Here's a story about a developer surviving in a world of APIs, Kubernetes and rapid application modernization.

developer-APIs

Meet Josh (a pseudonym). Josh is your typical developer. He's good at writing code in his native language, hates documentation and REALLY hates the "drag and drop" approach to developing software found in bloated API management platforms. Josh would rather write code, weave in some docs and avoid worrying about security, networking, deployment and reliability. Josh avoids venturing into newer networking technologies like Istio, labeling them unnecessarily complicated to configure and maintain. He would rather write everything in Java, Groovy or his go-to integration library: Apache Camel.

Recently Josh stumbled across an open source API platform called Kong. After 30 minutes of playing around, Josh discovered how easy it was to:

  • Support both legacy and modern clients accessing different versions of the same application.
  • Migrate existing apps to Kubernetes, using declarative automation to deliver immutability of the application and infrastructure.

He was so impressed with the developer-centric approach of Kong that he decided to showcase Konnect, Kong's enterprise SaaS platform, to his immediate team. The team agreed that Konnect was exactly what they needed to modernize their legacy applications and provide a consistent, shared policy layer to all enterprise APIs. And so their journey began.

Modernizing a Legacy Application

Thanks to his stellar demonstration, Josh was tasked with modernizing a legacy application that was slow and cumbersome. The application, a Pig Latin translator, is detailed in this blog post written by David La Motta. David does a great job at improving high availability and disaster recovery (HADR) using Zero Load Balancing (ZeroLB)—a design pattern implemented with Kong Mesh. Although this solved the network redundancy and HADR concerns with ZeroLB, the performance was slow. The legacy application was written in Ansible and Python scripts using asynchronous calls and takes many seconds to return a response.

How can Josh modernize this application in the most efficient way possible, improving the performance and giving it a new lease on life in a multi-cloud, platform-agnostic environment like Kubernetes? Read on or watch the below video to find out.

Design and Develop

Apache Camel has been around for 14 years. It's one of Apache's most mature projects, with over 4,000 stars on GitHub and almost 100 committers from many different vendors (Red Hat, Talend, SAP) and individuals. It is based on the concept of Enterprise Integration Patterns (EIPs) and fits nicely into the service layer tier—responsible for routing, transformation and any other integration heavy lifting.

What Camel lacks is an API gateway layer—a gap often filled by an API management or service mesh platform. Camel has a very nice RESTful Domain Specific Language (DSL) called "Rest DSL." In a couple of lines of code (either Java or XML), you can write a RESTFul service in minutes. Our developer friend Josh is a big fan of REST DSL and was able to quickly knock out the following RESTful endpoint for the Pig Latin application:

The beauty of REST DSL is that it's self-documenting. This makes it easy to include OpenAPI (Swagger) as part of his build. The runtime of choice for Camel is Spring Boot. Other choices are Quarkus or Knative, but unfortunately, they're both in their infancy with limited enterprise support. On the other hand, Spring Boot is portable and easy to get up and running in any environment.

Now that Josh has tested his new Pig Latin endpoint locally, he's inadvertently exposed Swagger documentation. Using his API design tool of choice, Insomnia, Josh's team can import the Swagger and start testing the API.

pig-latin-translator

Although Josh practices the developer-centric "code-first approach" to implementing his application, he's actually created an API contract—the starting point for our API lifecycle journey:

kong-gateway-runtime

As a result, the team completed the Design and Develop phases of our API lifecycle.

Deployment

Next up, we need to deploy our application somewhere. Currently, the existing application is written in Python and calls a RESTful API exposed in Ansible Tower, running on a bunch of VM's on Azure. Although we have network redundancy using Kong Mesh, the performance is slow due to the asynchronous architecture of the Ansible API. Unfortunately, the python client needs to make multiple requests to a) run the Pig Latin playbook and b) retrieve the result. Luckily, Josh has written the RESTful API in Camel using Spring Boot, and the design is inherently synchronous, requiring only a single call from the client.

Since the runtime is Spring Boot, we can easily deploy this to Kubernetes. An extra feature we could use is Terraform to stand up our Kubernetes cluster wherever we want. Josh decided that EKS on AWS was a good place to start this exercise. Terraform allowed Josh to declaratively specify exactly what our deployment should look like, regardless of the cloud provider. Additionally, we now have an immutable deployment that can spool up/tear down with a terraform apply or a terraform destroy.

Phase in New Version

Now that we deployed our modernized application on Kubernetes, it's time to phase in our new version. Typically we'd use the canary deployment technique, but in Josh's case, shifting from an asynchronous to synchronous architecture requires a client code change. Instead, Josh uses API versioning in Kong Konnect to include a new version of the application while guaranteeing backward compatibility for older client versions. Konnect is Josh's favorite API management platform, as it's developer-centric and leaves out the "drag and drop" nonsense that his manager craves. Perfect for any ninja developer!

Now that Josh has configured Konnect to route two different versions of David's Pig Latin application, he's able to test it out. Below you can see the Vitals for multiple versions running through Konnect:

AAP-for-DR-Blog

As a result of Josh's application modernization project, the team experienced the following key improvements:

  • 100 fold performance increase (from a latency of 3 seconds per request down to 30 milliseconds)
  • Ability to seamlessly modernize legacy applications while supporting legacy clients

Josh's manager was so impressed that he decided to decommission the existing legacy architecture and migrate to a more microservices-based architecture using Kong Konnect and Apache Camel.

Further Reading

Hopefully, you found Josh's experience with Kong Konnect useful. Part Two of this series will focus on:

  • Using Kong Mesh to decouple applications from VMs, enabling a seamless migration to any cloud provider.
  • Improving HADR concerns of our newly modernized Pig Latin application.

For more information on this example, or to try it out yourself, visit my GitHub repo.

Lastly, to learn more about Kong Konnect, try one of our hands-on exercises at Kong Academy. Kong Konnect is a single platform that delivers end-to-end connectivity and visibility for services in multi-cloud environments, making application modernization seamless.

API ManagementKong KonnectApplications

More on this topic

Videos

Service Catalog: Unifying Discovery for API Consumers and Producers

Videos

Rapid Application Modernization With Kong Konnect and Apache Camel

See Kong in action

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

Get a Demo
Topics
API ManagementKong KonnectApplications
Share on Social
Simon Green

Recommended posts

Konnect Wins InfoWorld's 2025 Technology of the Year for API Management

Kong Logo
NewsDecember 16, 2025

InfoWorld’s annual awards recognize the most innovative software development, DevOps, cloud, data management, and AI/ML products on the information technology landscape. We are extremely proud to see Kong Konnect recognized for its role in unifying

Kong

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

On-Call Oasis: Creating a Peaceful Experience, Especially During the Holidays

Kong Logo
EngineeringDecember 12, 2024

Kong Konnect and our code in production Kong Konnect is Kong’s infrastructural SaaS solution. We run the control planes and API management applications for the data planes (API gateway and mesh) that are run by our customers to power their APIs. So

Krzysztof Słonka

Exposing and Controlling Apache Kafka® Data Streaming with Kong Konnect and Confluent Cloud

Kong Logo
EngineeringNovember 19, 2024

We announced the Kong Premium Technology Partner Program at API Summit 2024, and Confluent was one of the first in the program. This initial development was all about ensuring that the relationship between Kong and Confluent — from a business an

Claudio Acquaviva

Getting Started With Kong Konnect in 10 Minutes

Kong Logo
EngineeringJuly 7, 2023

In this Kong Konnect tutorial, you'll learn how to leverage the platform to manage your API ecosystem from a single easy-to-use interface. We’ll run through how to: Use Konnect Runtime Manager to set up your own Kong Gateway runtime instance i

Adam Bauman

Implementing a Hybrid Kong Konnect Data Plane in Amazon ECS

Kong Logo
EngineeringMarch 22, 2023

Application Modernization projects often require their workloads to run on multiple platforms which requires a hybrid model. Kong Konnect is an API lifecycle management platform delivered as a service. The Control Plane, responsible for admin tasks,

Claudio Acquaviva

Enabling Multi-Region for Kong Konnect Cloud

Kong Logo
EngineeringOctober 5, 2022

Since the initial launch of Kong Konnect Cloud, one common feature request has (unsurprisingly) been Multi-Region support. Many customers look for SaaS solutions that support a distributed service architecture. Even at its inception, our goal was to

Nick Anderson

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. 2026