The trend towards transitioning from monolithic applications to microservices has been widely embraced in modern distributed systems and applications. This shift has resulted in the creation of lightweight, fine-grained, and self-contained microservices. Multiple microservices can be linked together via calls and inter-dependencies to form complex functions. One of the challenges in managing microservices is provisioning the optimal amount of resources for microservices in the chain to ensure application performance while improving resource usage efficiency. This paper presents ChainsFormer, a framework that analyzes microservice inter-dependencies to identify critical chains and nodes, and provision resources based on reinforcement learning. To analyze chains, ChainsFormer utilizes light-weight machine learning techniques to address the dynamic nature of microservice chains and workloads. For resource provisioning, a reinforcement learning approach is used that combines vertical and horizontal scaling to determine the amount of allocated resources and the number of replicates. We evaluate the effectiveness of ChainsFormer using realistic applications and traces on a real testbed based on Kubernetes. Our experimental results demonstrate that ChainsFormer can reduce response time by up to 26% and improve processed requests per second by 8% compared with state-of-the-art techniques.
翻译:从单体应用向微服务迁移已成为现代分布式系统及应用领域广泛采用的发展趋势。这一转变催生了轻量级、细粒度且自包含的微服务。多个微服务可通过调用和相互依赖关系连接,形成复杂功能。管理微服务的挑战之一在于为链条中的微服务提供最优资源量,以兼顾应用性能与资源使用效率。本文提出ChainsFormer框架,该框架通过分析微服务间依赖关系识别关键链条与节点,并基于强化学习进行资源供应。在链条分析方面,ChainsFormer采用轻量级机器学习技术以应对微服务链条及工作负载的动态特性。在资源供应方面,采用结合垂直与水平扩展的强化学习方法,确定资源分配量及副本数量。我们在基于Kubernetes的真实测试平台上,使用实际应用场景及跟踪数据评估了ChainsFormer的有效性。实验结果表明,与现有先进技术相比,ChainsFormer可将响应时间降低最高26%,并将每秒处理请求数提升8%。