首页 | 水果短剧 | 博客 | 论坛 | 交友 | 黄页 | 聊天室 | 游戏 | 寄快递 | 登入邮箱 用户中心 | 云浏览器 | ClaudeBot [Bot] | 退出 | 简体 | English
首页 > 时政 > Trending News

Why Kubernetes autoscalers keep fighting each other (and why the solution must be autonomous)

🤖 AI 辅助采编👤 编辑部筛查📄 原文来源见正文
PHP 安全服务 · 免费扫描网站 PHP 漏洞 → 一键修复 → 修复验证报告(PHP Patch Assurance) 免费扫描 →
🔊
每篇文章,都有双人深度解读 Every Article Gets a Two-Host Deep Dive
听到焦点,听出门道,发现新闻价值! Discover the Real Value Behind the News
试听 →
简体版 繁体版 分页: 1 / 1
华人空间新闻 官方账号 ✍️ 周二 10月 27, 2026 6:57 am #1
Summary
Their Helm values specify replicas: 3, cpu: 1000m, and memory: 2Gi. But the live cluster tells a different story: HPA has scaled the app to 11 replica…
Ask an SRE a deceptively simple question: What is the right size for checkout-api, and how many replicas should it run right now?

Their Helm values specify replicas: 3, cpu: 1000m, and memory: 2Gi. But the live cluster tells a different story: HPA has scaled the app to 11 replicas on CPU load; VPA insists it is over-provisioned, recommending cpu: 350m and memory: 3.1Gi; KEDA demands 24 replicas due to an upstream Kafka lag spike; and Karpenter has provisioned two new nodes, sizing physical capacity strictly against declared requests rather than actual usage.

“Five sources yield five contradictory answers. Each controller acts logically in isolation, but none sees the complete picture.”

Five sources yield five contradictory answers. Each controller acts logically in isolation, but none sees the complete picture. This gap between isolated observations and actual workload needs represents a core architectural failure in modern Kubernetes operations.

The breakdown of the Unix philosophy in elastic systems

Kubernetes and its components were built on the Unix philosophy: build small, modular tools that do one thing well. For container orchestration, this principle seemed intuitive:

In standard Unix environments, tools like grep and awk compose cleanly because they process immutable streams of text sequentially. One tool finishes and hands its output to the next.

Autoscaling controllers do not operate sequentially. They execute concurrently, acting on the same target workload and mutating the same API fields: .spec.replicas, .resources.requests, and the underlying node pool. Each runs in an independent reconciliation loop, assuming exclusive control over workload sizing without visibility into adjacent tools.

“Determining workload capacity is a single, coupled mathematical equation. Splitting it across decoupled controllers creates thrashing instead of modular efficiency.”

Determining workload capacity is a single, coupled mathematical equation. Splitting it across decoupled controllers creates thrashing instead of modular efficiency.

The four collisions: how autoscalers fight

When independent control loops manipulate interdependent variables, feedback loops destabilize into four common failure modes.

1. The denominator collapse: HPA vs. VPA

HPA calculates target replicas using pod CPU utilization as a percentage of declared requests:

current metric = total actual usage / total declared requests

Declared resource requests serve as the denominator. When VPA operates concurrently, it lowers CPU requests to eliminate waste. This shrinks the denominator. A minor traffic increase now pushes percentage utilization past HPA’s threshold, triggering an aggressive horizontal scale-out. As more pods split the traffic, per-pod usage drops, prompting VPA to shrink requests even further. The workload enters a death spiral: VPA continuously shrinks pod size while HPA creates an unmanageable fleet of microscopic containers.

2. Multi-writer race condition: native HPA vs. KEDA

When teams combine queue-based scaling via KEDA with standard CPU-based HPA, two controllers target the same deployment’s /scale sub-resource. If an event queue spikes, KEDA scales the deployment up to drain the backlog. However, if those worker pods are I/O-heavy with low CPU usage, the standalone HPA evaluates the low utilization, concludes the app is over-provisioned, and scales it back down. The API server records alternating rescale events while actual processing throughput stalls.

3. GitOps drift ping-pong: declarative IaC vs. dynamic runtime

GitOps engines enforce Git repositories as the source of truth. When HPA scales a deployment during a traffic spike, Argo CD flags the application as OutOfSync. If auto-sync is enabled, GitOps resets the live deployment back to its baseline, starving the application of capacity during peak demand. While engineers often configure GitOps to ignore replica differences, this breaks declarative infrastructure: Git no longer reflects production reality, and future rollouts risk quietly restoring outdated baselines.

4. The multiplier effect at the node layer

Node autoscalers like Karpenter make placement decisions based strictly on declared container requests, not actual consumption. If a container requests 1000m CPU but consumes only 150m, the scheduler still reserves the entire core. Karpenter provisions physical instances to satisfy phantom demand, multiplying upstream sizing inefficiencies into massive cloud bills. Across production fleets, average cluster CPU utilization hovers around 8% despite heavy node provisioning.

The path to a better autoscaler

Every traditional autoscaler answers a narrow question: “What should my individual setting be?” But the real operational requirement is broader: What combination of replicas, resource requests, limits, and scaling thresholds satisfies latency SLOs at the lowest cost, and when should that configuration change?

Horizontal and vertical sizing are interlinked variables of a single optimization problem. A true autoscaler cannot rely on reactive, single-metric heuristics. It must function as a unified control plane defined by five core capabilities:

From reactive reflexes to true autonomy

The cloud-native ecosystem routinely conflates “automated” and “autonomous.”

Today’s autoscalers are automated: they act like biological reflexes, measure an isolated telemetry signal, and fire a predefined response. When an event occurs, HPA triggers, KEDA scales, or Karpenter provisions. But reflexes lack a central nervous system. When five independent reflexes fire simultaneously on the same limb, the system thrashes.

“Today’s autoscalers are automated: they act like biological reflexes. But reflexes lack a central nervous system. When five independent reflexes fire simultaneously on the same limb, the system thrashes.”

Autonomy requires a closed loop that observes the entire operating environment, understands the tradeoffs between performance and cost, and assumes end-to-end accountability for the outcome.

The Unix philosophy remains the right blueprint for the execution layer: HPA, VPA, KEDA, and Karpenter should continue executing the specific API mutations they were designed to handle. What Kubernetes fundamentally lacks is the central intelligence layer that decides what those actuators should do.

The next time your platform team debates whether to implement HPA or VPA, step back and ask a broader question: Who decides this workload’s size, and do they have the full picture?

In modern clusters, nobody does. Solving Kubernetes rightsizing requires building a system that finally does.

Source: The New Stack
扫码分享
扫码分享本文
打赏给华人空间
打赏
有粉丝喜欢你的作品,你就能收到打赏!
创作者平台 点击了解,加入,创作,圈粉,有赏!
简体版 繁体版 分页: 1 / 1
eBay拍卖狙击神器 — 最后一秒自动出价,永远不超价获胜
华人空间用户专享:前100名6个月免费 · 30天免费试用,随时取消
免费试用 →