Urgent.News

What's breaking now, across thousands of outlets.

Tech

Kubernetes Resource Requests and Limits (2026): Set Them Right and Prevent OOMKilled & FailedScheduling

TL;DR Requests are what the scheduler spends; limits are what the kernel enforces. A pod is placed based on its requests, and killed or throttled based on its limits. CPU and memory fail differently: exceed your CPU limit and you get throttled (slow); exceed your memory limit and you get killed (OOMKilled, exit code 137). Two of the most common Kubernetes errors are born here: FailedScheduling…

Requests represent the minimum resources that a container is assured, while limits cap the maximum resources a container can consume. When creating a pod, the scheduler uses requests to determine where it can fit within the node's available capacity, and the kernel enforces limits via cgroups to prevent runaway resource usage.

In the context of CPU, containers can request a portion of a core or specify a specific value like 500m (0.5 core). The kernel can throttle a container if it exceeds its request but is not fully utilized. Memory, on the other hand, is incompressible and cannot be slowed down by the kernel, so exceeding a memory limit results in immediate OOMKilled, indicated by an exit code of 137.

A common mistake is to guess resource numbers without measuring actual usage. This often leads to pods stuck in a Pending state due to FailedScheduling, where requests exceed the node's capacity, or containers dying with OOMKilled because limits were set arbitrarily. Measuring resource usage over a full traffic cycle and setting requests near typical peak values, while giving memory a limit with appropriate headroom, helps avoid these pitfalls.

The scheduler is primarily concerned with requests, placing new pods only where their requests can be accommodated. However, the kernel strictly enforces limits. CPU is compressible – the kernel can delay a container, while memory is incompressible, meaning the kernel must kill the process when it exceeds its limit. This fundamental difference makes memory limits particularly critical.

When setting memory requests and limits, it's essential to base them on measured peak usage plus a safety margin for unexpected spikes. A limit set at the average usage level will only trigger OOMKilled during the busiest periods. Additionally, some runtimes, like JVMs, may configure their own heap size independently of cgroup limits, leading to unexpected OOMKilled events. Therefore, it's crucial to ensure that runtimes respect the container's memory constraints to avoid surprises.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Find companies that just raised money, straight from SEC Form D filings

When a startup raises a round, its press release is optional. Its SEC filing usually is not. A US company that sells securities under Regulation D (most seed, Series A/B, SAFE and convertible-note…

  • Stardust Semiconductors Inc. raised $2.7M in seed funding
  • Company filed Form D on October 29, 2026
  • Stardust Semiconductors categorized as hot with 80 signal score

We submitted a Bangla POS app to 50 directories. Here is what actually happened.

Tukri is a point-of-sale, stock and dues-book app for small shops in Bangladesh. It has a free plan and works offline. When we wrote our outreach plan on 21 October, Search Console showed a single…

  • Tukri submitted to 50 directories, aiming for listings.
  • Six directories featured live Tukri pages, including Crunchbase and GitLab.
  • Submission process faced delays, rejections, and CAPTCHA issues.

Realtime Event Retention Policy: Scaling Delivery Tracking Maps Through 3 Recovery Windows

Short answer: keep a short, lossless stream for reconnects, a compact snapshot for backfill, and discard movement noise once the map has caught up.

  • Realtime event retention crucial for scaling delivery tracking maps
  • Three recovery windows: short lossless stream, compact snapshot, and discarding noise
  • Retention tiers based on usage patterns and monotonically increasing sequence

More from Saturday 31 October →