Cilium ENI Mode + Gateway API Deep-dive Configuration
This document is a deep-dive guide for the Gateway API Adoption Guide. It provides a practical guide for combining Cilium ENI mode with Gateway API for high-performance networking.
Cilium ENI mode is a high-performance networking solution that directly utilizes AWS Elastic Network Interfaces to assign VPC IP addresses to pods. Combined with Gateway API, it achieves both standardized L7 routing and eBPF-based ultra-low latency processing.
1. What is Cilium ENI Mode?
Cilium ENI mode directly uses AWS ENI to assign VPC IP addresses to pods. Key features:
- AWS ENI Direct Use: Each pod receives a real VPC IP, fully integrating with AWS networking (Security Groups, NACLs, VPC Flow Logs)
- eBPF-based High-Performance Networking: 10x+ performance improvement over iptables with minimal CPU overhead
- Native Routing: No overlay encapsulation (VXLAN/Geneve), using VPC routing tables directly
2. Architecture Overview
NLB (L4) → eBPF TPROXY (transparent proxy) → Cilium Envoy (L7 Gateway) → Backend Pods (ENI IPs)
Key Components
- NLB: Managed L4 load balancer, microsecond latency
- eBPF TPROXY: XDP-level packet interception, lock-free per-CPU processing
- Cilium Envoy: L7 processing, HTTPRoute/TLSRoute implementation
- Cilium Operator: ENI lifecycle management, IP pool management
- Cilium Agent (DaemonSet): eBPF program management, CNI plugin
- Hubble: Real-time network flow observability, L7 protocol visibility
3. Prerequisites
4. Installation Flow
For new clusters: disable VPC CNI → install Gateway API CRDs → install Cilium via Helm → create Gateway resources.
For existing clusters: downtime required (5-10 min) for VPC CNI removal and Cilium installation.
5. Gateway API Resource Configuration
Standard HTTPRoute, traffic splitting (canary), header-based routing, URL rewrite, and role separation patterns are all supported identically to other Gateway API implementations.
6. Performance Optimization
- NLB + Cilium Envoy: ~3.5ms total vs ~15ms with ALB+NGINX
- Prefix Delegation: 16x fewer ENI attach operations
- BPF tuning: Pre-allocated maps, Maglev load balancing
- XDP acceleration: 10x packet filtering, 80% CPU reduction for DDoS
| 인스턴스 타입 | vCPU | 메모리 | 네트워크 대역폭 | ENI | IP/ENI | 권장 용도 |
|---|---|---|---|---|---|---|
m7g.xlarge | 4 | 16GB | 최대 12.5Gbps | 4 | 15 | 범용, 비용 효율 |
c7gn.xlarge | 4 | 8GB | 최대 30Gbps | 4 | 15 | 고성능 게이트웨이 |
m7g.2xlarge | 8 | 32GB | 최대 15Gbps | 4 | 15 | 중규모 워크로드 |
c7gn.4xlarge | 16 | 32GB | 최대 50Gbps | 8 | 30 | 대규모 트래픽 |
m7g.8xlarge | 32 | 128GB | 25Gbps | 8 | 30 | 고밀도 파드 |
c7gn.12xlarge | 48 | 96GB | 100Gbps | 15 | 50 | 초고성능 |
7. Operations & Observability
Hubble provides real-time flow observation, service maps, L7 protocol visibility (HTTP, gRPC, Kafka, DNS), and Prometheus metric export.
8. BGP Control Plane v2
For hybrid environments needing on-premises to EKS traffic routing via BGP. Not required when using NLB in pure AWS environments.
9. Hybrid Nodes Architecture and AI/ML Workloads
For EKS Hybrid Nodes combining cloud and on-premises GPU nodes, Cilium serves as a unified CNI. Recommended architecture: Cilium CNI + Cilium Gateway API + llm-d for minimized component count with optimal performance.