-
Notifications
You must be signed in to change notification settings - Fork 742
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
setting AWS_VPC_K8S_CNI_EXTERNALSNAT=false adds latency #1087
Comments
Hi @bhaveshph, If you have a peered VPC, you can set I'm not sure where the increased latency comes from though, it used to not work at all with peered VPCs if SNAT was enabled, so it is possible that using SNAT triggers some alternate routing that adds additional latency. This blog post on the subject is pretty good: https://kubernetes.io/blog/2019/03/29/kube-proxy-subtleties-debugging-an-intermittent-connection-reset/ |
Hi @mogren I see, awslabs/amazon-eks-ami#505 I try following options for cni and still latency remains same.
Let me also mention, when I set, |
@mogren Now doing that exclude ( So back to square one, we still facing latency issue with Thanks, |
We have also experienced increased latency with |
Just a quick update @bhaveshph and @CarloColumna. We have done some testing and narrowed it down to a kernel issue affecting the connection tracking when doing SNAT. When running our tests, things look fine with We still have to bisect down to the exact change that is triggering this which will take some more time, just letting you know that we are not ignoring the issue. |
Hi @mogren Hope this gets to resolution; as it helps big time in CIDR expansion without much overhead. Thanks, |
Hi @mogren and @SaranBalaji90 , Thanks, |
@bhaveshph We're going to discuss this with the AmazonLinux team to get some help. We'll post any updates here if we can narrow down the issue. Once we identify the issue, we can fix it and release new AMIs. |
Hi @mmerkes Thanks, |
Hi @bhaveshph Can you please upgrade to latest AMI and see if the issue is resolved? If not we can debug this further. Thank you. |
From internal support ticket, I get to know that, fix has went into amzn-2 linux Kernel version 5.4 (5.4.58-32.125.amzn2.x86_64) [kernel-ng, 5.9] and there is plan to back-port this fix on amzn-2 linux kernel version, 4.14. So can you please let me know, which amzn-eks-ami comes with kernel that has fix. My bandwidth to try this out is low for now, but once ami is available, I can definitely make some time. Thanks, |
Hi, The current EKS ami kernel version is 4.14.203 (https://github.com/awslabs/amazon-eks-ami/releases). |
Hi, Closing this issue for now. Please try the latest AMI and feel free to reach out if the issue still exists. |
EKS / k8s version : 1.16
aws-vpc-cni version : 1.6.1
calico version (using this only for network policy) : 3.8.1
iptables --version => iptables v1.8.2 (legacy)
Following has been noticed with using Primary IP range and also Secondary IP range (where, AWS_VPC_K8S_CNI_CUSTOM_NETWORK_CFG=true) for pods.
setting AWS_VPC_K8S_CNI_EXTERNALSNAT=false (will use iptable rule to SNAT)
egress calls to peered vpc, take 0.300 ms, as per 'traceroute -T -p 443 app1-dns'
setting AWS_VPC_K8S_CNI_EXTERNALSNAT=true (will not use iptable rule to SNAT)
egress calls to peered vpc, takes 0.019 ms, as per 'traceroute -T -p 443 app1-dns'
I also tried setting, AWS_VPC_K8S_CNI_RANDOMIZESNAT=prng. iptables rules are added fine (without node reboot) and seems to be working correctly; But latency remains same as mentioned above.
Has anyone seen this before?
Am I missing something ?
Is it outstanding issue where SNATing with iptable from ec2 node adds up to latency ?
The text was updated successfully, but these errors were encountered: