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 \textit{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 \textit{ChainsFormer} using realistic applications and traces on a real testbed based on Kubernetes. Our experimental results demonstrate that \textit{ChainsFormer} can reduce response time by up to 26% and improve processed requests per second by 8\% compared with state-of-the-art techniques.
翻译:从单体应用向微服务过渡的趋势已被现代分布式系统与应用广泛采纳。这一转变催生了轻量级、细粒度且自包含的微服务。多个微服务可通过调用与相互依赖关系链接在一起,形成复杂功能。管理微服务的挑战之一在于为链式结构中的微服务分配最优资源量,以在保障应用性能的同时提升资源利用效率。本文提出\textit{ChainsFormer}框架,该框架通过分析微服务间的依赖关系识别关键链与关键节点,并基于强化学习进行资源供应。在链路分析方面,ChainsFormer采用轻量级机器学习技术应对微服务链与工作负载的动态特性;在资源供应方面,采用结合垂直与水平扩展的强化学习方法,以确定资源分配量与副本数量。我们基于Kubernetes的真实测试平台,通过实际应用与负载痕迹评估了\textit{ChainsFormer}的有效性。实验结果表明,与现有最优技术相比,\textit{ChainsFormer}可降低响应时间最多26%,并提升每秒处理请求数8%。