arXiv:2501.18734cs.SEcs.DC2025-01被引 5

为微服务设计自适应弹性框架,实时优化资源分配降低延迟

STaleX: A Spatiotemporal-Aware Adaptive Auto-scaling Framework for Microservices

  • 基于时空特征与动态权重PID控制器实现细粒度自动伸缩
  • 在K8s上实测比HPA减少26.9%资源消耗,降低SLO违规率
  • 适合高并发微服务系统运维,尤其关注性能与成本平衡的场景

尽管云环境和自动伸缩方案广泛应用于传统单体应用,但在微服务架构下仍面临显著挑战。微服务具有动态且时空特性,需更高效、专用的伸缩策略。对整个应用采用集中式伸缩不足,因服务链中各服务规格与性能需求各异,需独立伸缩器并考虑彼此依赖关系与整体应用影响。本文提出STaleX框架,融合控制理论、机器学习与启发式方法,利用时空特征实现微服务的自适应弹性伸缩,支持实时资源调整以最小化SLO违反。该框架为每个服务配置加权比例-积分-微分(PID)控制器,权重由集成时空特征的监督单元动态调节,持续监控并优化资源分配。同时考虑服务规格、依赖关系等空间特征及工作负载时间变化,确保资源分配持续优化。在基于Kubernetes集群部署的微服务演示应用上实验表明,相比传统伸缩方法如HPA,STaleX在提升性能的同时实现26.9%的资源使用量降低。

原文摘要 · Abstract (English)

While cloud environments and auto-scaling solutions have been widely applied to traditional monolithic applications, they face significant limitations when it comes to microservices-based architectures. Microservices introduce additional challenges due to their dynamic and spatiotemporal characteristics, which require more efficient and specialized auto-scaling strategies. Centralized auto-scaling for the entire microservice application is insufficient, as each service within a chain has distinct specifications and performance requirements. Therefore, each service requires its own dedicated auto-scaler to address its unique scaling needs effectively, while also considering the dependencies with other services in the chain and the overall application. This paper presents a combination of control theory, machine learning, and heuristics to address these challenges. We propose an adaptive auto-scaling framework, STaleX, for microservices that integrates spatiotemporal features, enabling real-time resource adjustments to minimize SLO violations. STaleX employs a set of weighted Proportional-Integral-Derivative (PID) controllers for each service, where weights are dynamically adjusted based on a supervisory unit that integrates spatiotemporal features. This supervisory unit continuously monitors and adjusts both the weights and the resources allocated to each service. Our framework accounts for spatial features, including service specifications and dependencies among services, as well as temporal variations in workload, ensuring that resource allocation is continuously optimized. Through experiments on a microservice-based demo application deployed on a Kubernetes cluster, we demonstrate the effectiveness of our framework in improving performance and reducing costs compared to traditional scaling methods like Kubernetes Horizontal Pod Autoscaler (HPA) with a 26.9% reduction in resource usage.

微服务自动伸缩资源优化Kubernetes

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。