Cases3 cases
1 to 3 of 3
IL-0462Some MySQL pods on Shopify's GKE clusters took up to 30 minutes to start, slowing instance replacementShopify2021- Symptoms
In 2021 Shopify's KateSQL, a database-as-a-service platform that runs several hundred production MySQL instances on GKE, found that some MySQL pods started and shut down much more slowly than similar pods with the same data set. Instance replacement, the procedure that creates a new MySQL replica pod and stops the old one, showed pod creation times ranging from 10 to 30 minutes, which held up maintenance such as configuration changes and upgrades.
- Root cause
- Component
- Contributing factor
- Detection
KateSQL's instance replacement operations showed inconsistent MySQL pod creation times, and the team then measured the mysql-init container and MySQL startup times across pods.
- Remediation
- Cordoned older nodes, moved MySQL pods to new nodes through instance replacement and drained the old nodes
- Forced the kubepods memory cgroup to empty its dead cgroups on an affected node to test the fix
- Created new GKE 1.18 clusters and started creating MySQL pods on them
- Lessons
The investigation was one of the longest the Database Platform group had carried out, because of the nature of the problem, how hard it was to reproduce and the lack of an established method to follow; once the cause was known, there were several ways to fix it.
IL-0029Slow user-facing services from CPU throttling on containers that used far less CPU than their limitBuffer2020- Symptoms
Services on Buffer's kops-managed cluster on AWS (about 60 nodes and 1500 containers) answered more slowly than they should have. The container throttling metric showed that many containers were being throttled whatever their CPU usage was, including containers that never came close to their CPU limit.
- Trigger
CPU limits on user-facing services, enforced through CFS quota by a Linux kernel with a bug that throttled containers even when they were well under their limit.
- Root cause
- Component
- Contributing factor
- Detection
While reviewing the container throttling metric, the team noticed many containers being throttled even though their CPU usage stayed far below their limits.
- Remediation
- removed CPU limits from all services directly or indirectly on the users' critical path
- moved those services to dedicated tainted nodes and gave them matching tolerations
- set each service's CPU request to its peak usage over a few months plus a margin of more than 20%, and set memory requests the same way
- Action items
- Move nodes to a kernel that contains the CFS throttling fix (4.19 or later), which for Buffer means a kops version whose host image is Ubuntu 20.04
- After the kernel upgrade, check whether throttling is fully gone and update the post
- Lessons
A CPU limit can slow a service down even when the service uses a small part of it, because of how the kernel enforces CFS quota on older kernels; the throttling metric shows it, the CPU usage graph does not. Upgrading the kernel is the safer fix. Removing limits works for latency, but only together with honest CPU and memory requests, isolation of the unbounded services, and monitoring of node usage, since unbounded containers can starve the kubelet.
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.
These 3 cases involve Linux kernel and Node operating system image. 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 cause2
Software defect2 cases
- Contributing factor
DNS or network fault1 case
- Contributing factor
- Organisation