From Core Architecture to AI-Powered LLM Orchestration
Preface
- Who Should Read This Book
- How This Book Is Organized
- What Is Not in This Book
- Conventions Used in This Book
- OSS versus Enterprise Features
- Software Versions
- Feedback and Corrections
Introduction: Why Kong Matters
Chapter 1: Architecture and Core Concepts
- OpenResty and the Nginx + Lua Foundation
- The Kong Request Lifecycle
- Services, Routes, Upstreams, and Consumers
- Configuration Models: Database-Backed, DB-less, Hybrid
- The Plugin System Architecture
Chapter 2: Installation and Deployment
- Prerequisites and Environment Setup
- Docker and Docker Compose Deployments
- Database-Backed Mode with PostgreSQL
- DB-less Mode with YAML Configuration
- Hybrid Mode: Control Plane and Data Plane
- Kong Konnect Cloud Deployment
- Choosing Your Deployment Model
- Kong Manager: The Web UI for Kong Administration
Chapter 3: Routing, Services, and Traffic Management
- Defining Services and Routes
- Route Matching Strategies
- Upstreams and Load Balancing Algorithms
- Health Checks: Active and Passive
- Service Discovery Integration
- API Versioning Strategies
Chapter 4: Authentication and Authorization
- API Keys and Basic Authentication
- HMAC Authentication
- JWT Validation and Issuance
- OAuth 2.0 and OIDC Flows
- OpenID Connect with Keycloak
- LDAP and Active Directory Integration
- Access Control Lists (ACL)
- Custom Authentication with Lua Plugins
Chapter 5: Rate Limiting, Throttling, and Traffic Shaping
- Rate Limiting Algorithms: Local, Redis, Cluster, Sentinel
- Per-Consumer and Per-Route Limits
- Burst Handling and Token Bucket
- Load Shedding Strategies
- Rate Limit Response Headers
Chapter 6: Plugins Ecosystem
- Plugin Phases and the Request Lifecycle
- Built-in Plugins Overview
- Configuring and Chaining Plugins
- Plugin Priority and Execution Order
- Writing Custom Lua Plugins
- Third-Party Plugins from Kong Hub
Chapter 7: Security, TLS, and API Governance
- Mutual TLS (mTLS) Configuration
- Certificate Management and Auto-Renewal
- IP Restriction and Geo-Blocking
- Bot Detection and Abuse Prevention
- Request/Response Body Filtering
- CORS, CSRF, and Cross-Origin Security
- Vulnerability Scanning Integration
Chapter 8: Observability, Logging, Monitoring, and Analytics
- Access Logs and Structured Logging
- Prometheus Metrics and Grafana Dashboards
- Distributed Tracing with OpenTelemetry
- Log Streaming to ELK, Splunk, Datadog
- Kong Analytics and Konnect Insights
- Custom Metrics with Plugins
Chapter 9: Kubernetes Integration
- Kong Ingress Controller Architecture
- Helm Chart Installation and Configuration
- Ingress Resources and Annotations
- Kong Gateway API Implementation
- Plugin Configuration via Custom Resources
- Multi-Cluster and Edge Deployment Patterns
Chapter 10: Automation, CI/CD, and GitOps
- The Admin API Reference
- decK Configuration Management
- Declarative Config and Version Control
- Terraform Provider for Kong
- CI/CD Pipeline Patterns
Chapter 11: Performance Tuning, Scalability, and High Availability
- OpenResty and Nginx Tuning Parameters
- Connection Pooling and Keep-Alive Optimization
- Horizontal Scaling Strategies
- High Availability Architecture
Chapter 12: Kong AI Gateway and LLM Orchestration
- The AI Gateway Problem
- Getting Started with AI Gateway
- Intelligent Model Routing Strategies (Enterprise)
- Multi-Provider Orchestration
- Fallback and Retry Mechanisms
- Prompt Transformation and Template Management
- Response Caching for AI Workloads (Enterprise)
- Guardrails, Safety, and Content Moderation
- Token Tracking and Cost Optimization
- AI Observability and Governance
Chapter 13: AI Integrations and Framework Patterns
- OpenAI and Azure OpenAI Integration
- Anthropic Claude Integration
- Google Gemini Integration
- AWS Bedrock Model Access
- Self-Hosted Models: Ollama, vLLM, Hugging Face
- LangChain Orchestration with Kong
- LlamaIndex and RAG Patterns
- Streaming Responses and SSE
Chapter 14: Production Patterns, Migrations, and Troubleshooting
- Application Integration Patterns
- gRPC and GraphQL Gateway Patterns
- Kafka Event Streaming with Kong
- Common Failure Modes and Troubleshooting
- Upgrade Strategies and Version Migration
- Real-World Migration Case Study: From Nginx Ingress to Kong
- Configuration Auditing and Compliance
- Production Checklist
Conclusion: The Future of API Infrastructure
- Key Takeaways
- Emerging Trends in API Architecture
- Where Kong Is Heading
- Final Recommendations
References
- Core Kong Documentation
- Kong Manager and RBAC
- AI Gateway and AI Plugins
- Installation and Deployment
- Kubernetes Integration
- Automation and Configuration Management
- Observability and Monitoring
- Underlying Technologies
- Community and Support
Index
- A
- B
- C
- D
- E
- F
- G
- H
- I
- K
- L
- M
- N
- O
- P
- R
- S
- T
- U
- V
- W