Kubernetes offers two default paths for scaling Nodejs workloads, and both have structural limitations. The Horizontal Pod Autoscaler scales on CPU utilization, which does not directly measure event loop saturation: a Node.js pod can queue requests and miss latency SLOs while CPU reports moderate usage. KEDA extends HPA with richer triggers, including event-loop metrics, but inherits the same reactive control loop, detecting overload only after it has begun. By the time new pods start and absorb traffic, the system may already be degraded. Lowering thresholds shifts the operating point but does not change the dynamic: the scaler still reacts to a value it has already crossed, at the cost of permanent over-provisioning. We propose a predictive scaling algorithm that forecasts where load will be by the time new capacity is ready and scales proactively based on that forecast. Per-instance metrics are corrupted by the scaler's own actions: adding an instance redistributes load and changes every metric, even if external traffic is unchanged. We observe that operating on a cluster-wide aggregate that is approximately invariant under scaling eliminates this feedback loop, producing a stable signal suitable for short-term extrapolation. We define a metric model (a set of three functions that encode how a specific metric relates to scaling) and a five-stage pipeline that transforms raw, irregularly-timed, partial metric data into a clean prediction signal. In benchmarks against HPA and KEDA under steady ramp and sudden spike, the algorithm keeps per-instance load near the target threshold throughout. Under the steady ramp, median latency is 26ms, compared to 154ms for KEDA and 522ms for HPA.


翻译:Kubernetes为Node.js工作负载提供两种默认扩缩容方案,但两者均存在结构性局限。水平Pod自动伸缩器(HPA)以CPU利用率为缩放依据,这无法直接衡量事件循环饱和程度:当CPU显示中等负载时,Node.js Pod可能已开始排队请求并违反延迟SLO。KEDA通过引入事件循环指标等更丰富的触发条件扩展了HPA,但继承了相同的反应式控制循环——仅在过载发生后才能检测到问题。当新Pod启动并开始承接流量时,系统可能已经降级。降低阈值仅改变运行基准点却未改变动态机制:该伸缩器仍会对已超限的指标值做出反应,代价是永久性过度预配。我们提出一种预测性缩放算法,该算法预测新容量就绪时的负载水平,并基于该预测主动进行扩缩容。实例级指标会被缩放器自身操作所干扰:添加实例会重新分配负载并改变所有指标,即使外部流量未发生变化。我们观察到,对集群范围聚合指标(该指标在缩放操作下近似保持不变)进行处理可消除该反馈循环,从而生成适合短期外推的稳定信号。我们定义了一个指标模型(包含三个编码特定指标与缩放关系的函数)和一个五阶段流水线,用于将原始、非规则时间采样的不完整指标数据转换为干净的预测信号。在与HPA和KEDA的基准测试中(涵盖稳态爬坡和突发峰值两种场景),该算法始终能将实例负载维持在目标阈值附近。在稳态爬坡场景下,中位延迟为26毫秒,而KEDA为154毫秒,HPA为522毫秒。

0
下载
关闭预览

相关内容

【ICML 2024】零阶优化器微调大模型,大幅降低内存
专知会员服务
32+阅读 · 2024年7月8日
【2020新书】使用Kubernetes开发高级平台,519页pdf
专知会员服务
70+阅读 · 2020年9月19日
TensorFlowLite:端侧机器学习框架
专知会员服务
34+阅读 · 2020年8月27日
基于Prometheus的K8S监控在小米的落地
DBAplus社群
16+阅读 · 2019年7月23日
谷歌EfficientNet缩放模型,PyTorch实现登热榜
机器学习算法与Python学习
11+阅读 · 2019年6月4日
浅谈 Kubernetes 在生产环境中的架构
DevOps时代
11+阅读 · 2019年5月8日
干货| PyTorch相比TensorFlow,存在哪些自身优势?
全球人工智能
15+阅读 · 2017年10月4日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
最新内容
机器的崛起:美海军陆战队组建机器人营思考
专知会员服务
1+阅读 · 今天15:44
无面之战:人工智能如何重绘权力版图
专知会员服务
0+阅读 · 今天15:25
《最强大的军事网状网络》
专知会员服务
7+阅读 · 9月7日
《预测陆军征兵任务分配》110页
专知会员服务
6+阅读 · 9月7日
相关资讯
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员