Kubernetes offers two default paths for scaling Node.js 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自动扩缩器基于CPU利用率进行扩缩,但CPU利用率并不能直接反映事件循环饱和度:在CPU显示中等使用率时,Node.js Pod可能已出现请求排队并违反延迟服务等级协议。KEDA通过引入事件循环指标等更丰富的触发信号扩展了HPA,但继承了相同的反应式控制循环——只有在过载发生后才能检测到。当新Pod启动并吸收流量时,系统性能可能已经恶化。降低阈值虽能改变运行点,却无法改变动态特性:扩缩器仍会对已越界的数值做出反应,且需以永久性过度预置为代价。我们提出一种预测性扩缩算法,该算法可预测新容量就绪时的负载水平,并基于该预测主动进行扩缩。实例级指标会被扩缩器自身行为所干扰:即使外部流量不变,增加实例也会重新分配负载并改变所有指标。我们观察到,采用集群范围且近似不随扩缩变化的聚合指标,可消除此反馈回路,产生适合短期外推的稳定信号。我们定义了一个指标模型(三组编码特定指标与扩缩关系的函数)和一个五阶段流水线,可将原始、非定时、不完整的指标数据转化为清晰的预测信号。在与HPA及KEDA的基准测试中(涵盖稳定递增流量和突发流量场景),该算法始终将实例级负载维持在目标阈值附近。在稳定递增场景下,中位数延迟为26毫秒,而KEDA为154毫秒,HPA为522毫秒。

0
下载
关闭预览

相关内容

【2020新书】使用Kubernetes开发高级平台,519页pdf
专知会员服务
70+阅读 · 2020年9月19日
基于 SonarQube 的增量代码扫描
DevOps时代
12+阅读 · 2019年7月18日
谷歌EfficientNet缩放模型,PyTorch实现登热榜
机器学习算法与Python学习
11+阅读 · 2019年6月4日
浅谈 Kubernetes 在生产环境中的架构
DevOps时代
11+阅读 · 2019年5月8日
Github 项目推荐 | 用 Pytorch 实现的 Capsule Network
AI研习社
22+阅读 · 2018年3月7日
干货| PyTorch相比TensorFlow,存在哪些自身优势?
全球人工智能
15+阅读 · 2017年10月4日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 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会员
最新内容
《无人机对海面作战影响评估》
专知会员服务
5+阅读 · 7月21日
印度精确打击与指挥架构的断层
专知会员服务
4+阅读 · 7月20日
美空军AI完成F-16战斗机自主空战历史性试飞
专知会员服务
6+阅读 · 7月20日
深入Project Maven:为何人工智能在战场上依然失灵
锻造未来士兵:外骨骼、基因工程与赛博格
专知会员服务
7+阅读 · 7月19日
相关VIP内容
【2020新书】使用Kubernetes开发高级平台,519页pdf
专知会员服务
70+阅读 · 2020年9月19日
相关资讯
基于 SonarQube 的增量代码扫描
DevOps时代
12+阅读 · 2019年7月18日
谷歌EfficientNet缩放模型,PyTorch实现登热榜
机器学习算法与Python学习
11+阅读 · 2019年6月4日
浅谈 Kubernetes 在生产环境中的架构
DevOps时代
11+阅读 · 2019年5月8日
Github 项目推荐 | 用 Pytorch 实现的 Capsule Network
AI研习社
22+阅读 · 2018年3月7日
干货| PyTorch相比TensorFlow,存在哪些自身优势?
全球人工智能
15+阅读 · 2017年10月4日
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 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会员