Kong/kong
7 articles
Prerequisites
- ›Basic understanding of reverse proxies and API gateways
- ›Familiarity with Nginx concepts (worker processes, configuration directives, upstream/downstream)
- ›Basic Lua syntax (tables, metatables, require/module system)
Kong Gateway Architecture: How an API Gateway Lives Inside Nginx
A comprehensive introduction to Kong's architecture, explaining how it embeds itself into Nginx via OpenResty's lua-nginx-module and the phase-driven lifecycle model.
From `kong start` to Serving Traffic: The Boot Sequence
Traces Kong's complete initialization pipeline from CLI dispatch through configuration loading, Nginx spawn, and the init/init_worker phases.
Anatomy of a Request: Kong's Runloop from Rewrite to Log
A detailed walkthrough of a single HTTP request's journey through every Nginx phase inside Kong, covering the runloop handler's before/after pattern and the request context lifecycle.
The Plugin System: Resolution, Execution, and the Art of the Iterator
Explores Kong's plugin architecture from discovery through execution, covering the plugins iterator's collecting/collected pattern and 8-level configuration resolution.
Schema-Driven Design: Kong's Database Layer from Validation to Query
Examines the schema system that drives Kong's entire data layer — from the metaschema through entity definitions to auto-generated DAOs and Admin API endpoints.
Hybrid Mode: Control Planes, Data Planes, and Configuration Sync
Explores Kong's distributed deployment architecture where Control Planes push configuration to Data Planes via WebSocket connections.
Kong as an AI Gateway: The LLM Driver Architecture
Examines Kong's AI/LLM gateway subsystem with its driver-based provider abstraction, streaming support, and the ai-proxy plugin family.