Architecture, Configuration, Operations and Advanced Patterns for Cloud-Native Infrastructure and AI Workloads
Introduction: Why Envoy Matters
- The Proxy Problem in Modern Infrastructure
- How Envoy Got Here: From Lyft to CNCF
- What Envoy Is (and What It Is Not)
- Who Should Read This Book
- How This Book Is Organized
Chapter 1: Architecture and Core Design Principles
- The Filter Chain: Envoy’s Central Abstraction
- Threading Model and Event Loop Architecture
- Memory Management and Resource Constraints
- Process Isolation and Sandboxing Patterns
- Comparing Envoy to NGINX, HAProxy and Traefik
Chapter 2: Request Lifecycle and Networking Model
- Connection Lifecycle: From SYN to FIN
- Protocol Detection and Upgrading
- The Request Path Through Listeners and Filters
- Response Handling and Connection Reuse
- Graceful Shutdown and Draining
Chapter 3: Configuration Fundamentals - Listeners, Filter Chains and Routes
- The Bootstrap Configuration File
- Listeners: Accepting Connections
- Filter Chains and Protocol Matching
- The HTTP Connection Manager
- Routes, Virtual Hosts and Route Actions
Chapter 4: Clusters, Endpoints and Service Discovery
- Clusters: Logical Upstream Groupings
- Endpoint Types and Resolution Modes
- Static and File-Based Discovery
- DNS-Based Service Discovery
- EDS and the xDS Protocol Suite
Chapter 5: Load Balancing Algorithms and Strategies
- Round Robin and Weighted Variants
- Least Connection Load Balancing
- Ring Hash Consistent Hashing
- Maglev and Random Strategies
- Locality-Aware and Multi-Zone Routing
Chapter 6: Reliability Patterns - Health Checking, Retries and Circuit Breaking
- Active and Passive Health Checking
- Outlier Detection and Ejection Policies
- Retry Policies and Backoff Strategies
- Circuit Breaking and Resource Quotas
- Timeout Configuration and Deadline Propagation
Chapter 7: Traffic Management - Rate Limiting, Fault Injection and Canaries
- Local Rate Limiting Filters
- Global Rate Limiting Service Integration
- Fault Injection for Chaos Testing
- Traffic Splitting and Canary Deployments
- Shadow Traffic and Request Mirroring
Chapter 8: Security - TLS, mTLS, Authentication and Authorization
- TLS Termination and Configuration
- Mutual TLS (mTLS) in Service Meshes
- Certificate Management and Rotation
- JWT Authentication and Validation
- RBAC and External Authorization
Chapter 9: Observability - Logging, Metrics and Distributed Tracing
- Access Logging: Formats and Destinations
- Structured Logging for Machine Parsing
- Metrics Collection with Prometheus
- Distributed Tracing Integration
- Building Observability Dashboards
Chapter 10: Extensibility - WebAssembly, Custom Filters and Plugins
- The Filter Architecture Deep Dive
- WebAssembly (WASM) Filter Development
- Lua Scripting for Lightweight Extensions
- External Processing Filters
- Choosing the Right Extension Mechanism
Chapter 11: Dynamic Configuration and the xDS APIs
- The xDS Protocol Architecture
- Discovery Services: CDS, LDS, RDS, EDS, SDS
- Resource Versioning and Incremental Updates
- Control Plane Design Patterns
- Building a Custom xDS Control Plane
- Configuration Validation and Rollout Strategies
Chapter 12: Service Mesh Integration and Kubernetes Deployments
- Envoy as a Service Mesh Data Plane
- Istio Integration Patterns
- Sidecar Proxy Deployment Models
- Kubernetes Ingress and Gateway API
- Egress Gateway Patterns
Chapter 13: Edge Proxies, API Gateways and Multi-Region Deployments
- Envoy as an Edge Proxy
- API Gateway Patterns and Capabilities
- Multi-Region Traffic Routing
- Global Load Balancing and Geo-Routing
- CDN Integration and Caching Strategies
Chapter 14: AI and LLM Workloads - Building Intelligent Inference Gateways
- The AI Gateway Pattern: Why Envoy Fits
- Routing to Multiple LLM Providers and Self-Hosted Models
- Intelligent Request Routing and Model Selection
- Prompt-Aware Routing Strategies
- A/B Testing, Canary Deployments and Traffic Splitting for Models
- Streaming Responses and Long-Running Inference
- Caching Strategies for AI Inference
- Cost Optimization and Vendor Diversification
- Latency-Aware Routing and Multi-Region AI Deployments
- Observability for AI Inference Workloads
- Securing AI Workloads with Envoy
- Implementing AI Gateway Patterns with Vanilla Envoy
Chapter 15: Performance Tuning, High Availability and Production Operations
- Performance Tuning: Threads, Buffers and Connection Pools
- Scalability Patterns and Horizontal Scaling
- High Availability Architectures
- Debugging Envoy in Production
- Troubleshooting Common Issues
- Advanced Troubleshooting: Complex Incident Walkthroughs
- Migration Strategies from Other Proxies
- Production Best Practices
- Real-World Case Studies
Conclusion: The Future of Envoy and Proxy Architecture
- Key Principles Recap
- Emerging Patterns in Proxy Architecture
- Envoy’s Role in AI-Native Infrastructure
- Staying Current with the Ecosystem
