Cases2 cases
1 to 2 of 2
IL-0057Higher p99 latency after moving a reverse proxy to EKS, from outgoing connections delayed by a SNAT conntrack racePrezi2019- Symptoms
Prometheus alerts fired on tail latency: from 7/24, the p99 response time of a few services went up after Prezi moved its Nginx-based reverse proxy, smartgateway, from dedicated Elastic Beanstalk machines onto shared Kubernetes worker nodes. The bump affected only the tail, so the earlier monitoring of average response times would most certainly have missed it.
- Trigger
Moving the reverse proxy onto shared EKS worker nodes, where its outgoing connections went through source NAT on the node and some SYN packets were dropped by a race in Netfilter's conntrack.
- Root cause
- Component
- Contributing factor
- Detection
Prometheus alerts on p99 latency fired after the reverse proxy migration.
- Remediation
- added AWS X-Ray tracing and an $upstream_connect_time trace attribute to locate the delay
- ran more pods of the service on more nodes, which reduced but did not end the delays
- set AWS_VPC_K8S_CNI_EXTERNALSNAT=true on the AWS VPC CNI to turn off SNAT on the nodes
- Lessons
Alerting on tail latency instead of averages caught a problem that would otherwise have gone unnoticed, and tracing turned a vague slowdown into a measured connect delay. Delays of exactly 1 or 3 seconds on new outgoing connections point to dropped SYN packets, and on EKS the SNAT done by the VPC CNI is where to look.
IL-0047Pod-to-pod requests delayed by 5, 10 or 15 seconds because of DNS lookups lost to a conntrack raceMindTickle2019- Symptoms
Pod-to-pod calls were intermittently slow and the web application felt slow overall. A request that pod A sent at time x reached pod B at x + 5s, x + 10s or x + 15s, always a multiple of five seconds.
- Trigger
The C library resolver sent the A and AAAA queries for each lookup on the same port; where DNAT or SNAT translation takes place, a race condition in conntrack sometimes left one of the queries unanswered, and the resolver waited 5 seconds before retrying.
- Root cause
- Component
- Contributing factor
- Detection
The team noticed intermittent delays in pod-to-pod calls and slowness in the web application, and that the delays were always multiples of five seconds.
- Remediation
- added the single-request-reopen option to dnsConfig in the deployment specs
- set GRPC_DNS_RESOLVER=native in the Dockerfiles of gRPC applications so they used the libc resolver
- checked with tcpdump port 53 that A and AAAA queries left from different ports
- Lessons
Delays that are exact multiples of five seconds point to DNS lookups being retried after the resolver's 5-second timeout. A resolver option set in the pod spec only helps processes that use the libc resolver; runtimes with their own resolver, such as gRPC with c-ares, ignore it.
These 2 cases involve conntrack table and Linux kernel. kubegap audits a Kubernetes cluster for gaps like these, read-only, from Claude Code or Codex; its checks cite public reports like the ones in this library.
By root cause1
DNS or network fault2 cases
- Component
- Contributing factor
- Organisation