Back to all scenarios
Scenario #103
Networking
K8s v1.18, AWS EKS
Network Latency Due to Misconfigured Service Type
High network latency occurred because a service was incorrectly configured as a NodePortinstead of a LoadBalancer.
Find this helpful?
What Happened
Services behind a NodePort experienced high latency due to traffic being routed through each node instead of through an optimized load balancer.
Diagnosis Steps
- 1Checked the service configuration and identified that the service type was set to NodePort.
- 2Verified that traffic was hitting every node, causing uneven load distribution and high latency.
Root Cause
Incorrect service type that did not provide efficient load balancing.
Fix/Workaround
• Changed the service type to LoadBalancer, which properly routed traffic through a managed load balancer.
• Traffic was distributed evenly, and latency was reduced.
Lessons Learned
Choose the correct service type based on traffic patterns and resource requirements.
How to Avoid
- 1Review service types based on the expected traffic and scalability.
- 2Use a LoadBalancer for production environments requiring high availability.