EKS NLB — Traffic flow (IP mode vs instance mode)
So sánh đường đi traffic từ client qua NLB tới Pod: IP mode (khuyến nghị) và instance mode (legacy).
IP modeRecommendedAWS LBC required
Traffic path: Client → NLB → Pod IP trực tiếp (bypass Node/kube-proxy)
Target type:
Tại sao dùng:
Annotation cần thiết:
Traffic path: Client → NLB → Pod IP trực tiếp (bypass Node/kube-proxy)
Target type:
nlb-target-type: "ip" — NLB register Pod IP vào target groupTại sao dùng:
- Không có DNAT extra hop qua kube-proxy
- Preserve source IP của client đến tận Pod
- Kết hợp được Zonal Affinity + disable cross-zone LB → AZI hoàn chỉnh
- Latency thấp hơn instance mode
- Dùng tốt cho TCP, UDP, TLS passthrough, gRPC
Annotation cần thiết:
aws-load-balancer-type: "external"
aws-load-balancer-nlb-target-type: "ip"