Microservice architecture has transformed traditional monolithic applications into lightweight components. Scaling these lightweight microservices is more efficient than scaling servers. However, scaling microservices still faces the challenges resulted from the unexpected spikes or bursts of requests, which are difficult to detect and can degrade performance instantaneously. To address this challenge and ensure the performance of microservice-based applications, we propose a status-aware and elastic scaling framework called StatuScale, which is based on load status detector that can select appropriate elastic scaling strategies for differentiated resource scheduling in vertical scaling. Additionally, StatuScale employs a horizontal scaling controller that utilizes comprehensive evaluation and resource reduction to manage the number of replicas for each microservice. We also present a novel metric named correlation factor to evaluate the resource usage efficiency. Finally, we use Kubernetes, an open-source container orchestration and management platform, and realistic traces from Alibaba to validate our approach. The experimental results have demonstrated that the proposed framework can reduce the average response time in the Sock-Shop application by 8.59% to 12.34%, and in the Hotel-Reservation application by 7.30% to 11.97%, decrease service level objective violations, and offer better performance in resource usage compared to baselines.
翻译:微服务架构已将传统的单体应用转变为轻量级组件。对这些轻量级微服务进行伸缩比伸缩服务器更为高效。然而,微服务伸缩仍面临由难以检测且可能瞬时导致性能下降的突发请求峰值所带来的挑战。为应对此挑战并确保基于微服务的应用性能,我们提出了一种名为StatuScale的状态感知弹性伸缩框架。该框架基于负载状态检测器,能够为垂直伸缩中的差异化资源调度选择合适的弹性伸缩策略。此外,StatuScale采用了一个水平伸缩控制器,该控制器利用综合评估与资源削减来管理每个微服务的副本数量。我们还提出了一种名为关联因子的新指标,用于评估资源使用效率。最后,我们使用开源容器编排与管理平台Kubernetes以及来自阿里巴巴的真实追踪数据来验证我们的方法。实验结果表明,与基线方法相比,所提出的框架能将Sock-Shop应用的平均响应时间降低8.59%至12.34%,将Hotel-Reservation应用的平均响应时间降低7.30%至11.97%,减少服务等级目标违反情况,并在资源使用方面提供更优的性能。