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%。