The Hidden Egress Traps in Kubernetes
Most cloud bills spike from data transfer, not compute. Map your east-west and egress paths before they drain your margin.
The great debate: Should you set CPU limits in Kubernetes? We dive into CFS quotas, throttling latency, and why 'Requests Only' might be the better FinOps move.
In the Kubernetes world, there’s a piece of advice that gets repeated like gospel: “Always set Requests and Limits for everything.”
It sounds logical. Requests guarantee resources; Limits prevent a rogue pod from eating the whole node. Safety first, right?
But for CPU, setting limits can actually hurt your performance and waste money.
Kubernetes implements CPU limits using the Linux kernel’s CFS (Completely Fair Scheduler) Bandwidth Control.
Here is how it works:
1000m (1 core).100ms).100ms of runtime every period.The Trap: If your app receives a burst of traffic and tries to use 20ms of CPU in the first 5ms of the cycle, it might get throttled for the rest of that period—even if the host machine is completely idle!
This is called Micro-bursting.
Many Kubernetes experts (including folks at Zalando and Buffer) now advocate for removing CPU limits entirely for latency-sensitive workloads.
The Setup:
Why it works:
Request share.The fear is that one runaway process will starve everyone else.
But remember: Requests provide a guarantee. Even without a limit, if Pod A requests 1 core and Pod B goes rogue, the kernel ensures Pod A still gets its 1 core. Pod B only eats the spare capacity.
Note: This logic applies to CPU (a compressible resource). For Memory (incompressible), you MUST set limits equal to requests, or you risk OOM kills.
Stop blindly setting CPU limits.
container_cpu_cfs_throttled_seconds_total metric.Your users don’t care about your “fairness” policy. They care about speed. Give your apps the breathing room they need.
Founder & CEO
Most cloud bills spike from data transfer, not compute. Map your east-west and egress paths before they drain your margin.
Pair latency and availability targets with spend guardrails so reliability does not blow up your cloud bill.
Before you trust ML to resize pods, fix your signals, budgets, and guardrails. Otherwise AI just automates bad guesses.
Get Kubernetes and ECS cost tactics delivered weekly.