Kong Gateway Architecture
What you'll learn: How Kong's plugin-based design and dual-plane architecture enables scalable, flexible API management.
The Two-Plane Separation
Kong separates concerns using a data plane and control plane architecture, similar to service mesh design patterns you've seen:
- Data Plane: Lightweight proxies that handle all request traffic, routing, authentication, and plugin execution. These are stateless and horizontally scalable.
- Control Plane: Manages configuration, plugin settings, routes, and services. Typically backed by a database (PostgreSQL or Cassandra) or runs in DB-less mode using declarative config files.
Think of the data plane as airport security checkpoints (processing travelers) and the control plane as the central management system (setting policies and schedules).
Plugin-Based Architecture
Kong's superpower is its plugin system. Instead of monolithic gateway logic, Kong uses composable plugins for:
- Authentication (
key-auth,jwt,oauth2) - Rate limiting and throttling
- Request/response transformation
- Logging and monitoring
- Circuit breaking
Plugins execute in a pipeline for each request, allowing you to configure only what you need. This keeps the core lightweight while enabling extensibility through Lua (Kong's plugin language) or external services.
Horizontal Scalability
Because Kong's data plane is stateless, you can deploy multiple Kong nodes behind a load balancer. Each node:
- Pulls configuration from the control plane (or config file)
- Processes requests independently
- Shares no runtime state with other nodes
This allows linear scaling: need more throughput? Add more Kong instances. The control plane scales separately based on configuration change frequency.
Key Takeaway: Kong's plugin-based architecture with data/control plane separation enables flexible, composable API management that scales horizontally by adding stateless proxy nodes without shared state bottlenecks.