Understanding Kong: An Open-Source API Gateway

Introduction:

Kong is a powerful open-source API gateway designed to streamline and secure API management. It acts as a mediator between clients and backend services, offering a range of functionalities including traffic routing, rate limiting, authentication, and more.

Components of Kong:

  • Routes
  • Services
  • Upstreams
  • Targets
  • Consumers
  • Plugins

Working of Kong:

When a client initiates an API request, Kong manages the routing process as follows:

  • The request is directed to a specified path configured in Kongโ€™s route instead of directly hitting the microservices.
  • Route: Defines the exposed path for clients and maps it to backend services.
  • Service: Specifies the actual path of the backend microservice API.
  • Upstream: Contains backend microservicesโ€™ machine details, health checks, and load balancing configurations.
  • Targets: Individual microservice IP and port added to upstreams for load balancing.
  • Consumers: Users or applications consuming the APIs.
  • Plugins: Adds additional features to Kongโ€™s workflow.

Our Current Architecture of Kong:

  • When a customer hits the API of openapi.example.in, the request is forwarded to Accamai GTM, then to F5 Load Balancer.
  • F5 Load Balancer utilizes path-based routing to divert traffic to the respective Kong clusters based on the API path.

Paths Mentioned in irule in my setup:

A list of paths configured in F5โ€™s irule for as per the Teamโ€™s.

Kong Admin API:

Kong provides an admin API exposed on port 8001, allowing users to monitor Kong, create routes, services, and modify Kong cluster components.

Konga:

Konga is a third-party tool that offers a user-friendly interface to interact with Kong, facilitating the creation of routes and other Kong components.

Conclusion:

Kong plays a vital role in managing and securing APIs, providing a robust infrastructure for routing and controlling API traffic. With its flexible architecture and rich feature set, Kong is a preferred choice for modern API management.

Next Steps:

  • Explore Kong documentation for in-depth configuration options.
  • Experiment with Kong Admin API and Konga for managing Kong instances effectively.

References:

Feel free to reach out for any further assistance or queries.

--

--

๐’๐š๐ค๐ž๐ญ ๐‰๐š๐ข๐ง

๐ƒ๐ž๐ฏ๐Ž๐ฉ๐ฌ/๐’๐‘๐„/๐‚๐ฅ๐จ๐ฎ๐ /๐ˆ๐ง๐Ÿ๐ซ๐š๐ฌ๐ญ๐ซ๐ฎ๐œ๐ญ๐ฎ๐ซ๐ž /๐’๐ฒ๐ฌ๐ญ๐ž๐ฆ ๐„๐ง๐ ๐ข๐ง๐ž๐ž๐ซ