Skip to main content
QUICK REVIEW

[论文解读] The Architectural Implications of Microservices in the Cloud

Yu Gan, Christina Delimitrou|arXiv (Cornell University)|May 25, 2018
Cloud Computing and Resource ManagementComputer Science参考文献 18被引用 4
一句话总结

本文通过构建并分析一个由数十个微服务组成的端到端电影流媒体服务,评估了云原生微服务架构的系统影响。研究发现,微服务架构会加剧对单线程性能的敏感度,提升通信密集型组件的指令缓存压力,并改变大尺寸服务器与小尺寸服务器之间的权衡,更倾向于选择高单核性能以应对低延迟工作负载。

ABSTRACT

Cloud services have recently undergone a shift from monolithic applications to microservices, with hundreds or thousands of loosely-coupled microservices comprising the end-to-end application. Microservices present both opportunities and challenges when optimizing for quality of service (QoS) and cloud utilization. In this paper we explore the implications cloud microservices have on system bottlenecks, and datacenter server design. We first present and characterize an end-to-end application built using tens of popular open-source microservices that implements a movie renting and streaming service, and is modular and extensible. We then use the end-to-end service to study the scalability and performance bottlenecks of microservices, and highlight implications they have on the design of datacenter hardware. Specifically, we revisit the long-standing debate of brawny versus wimpy cores in the context of microservices, we quantify the I-cache pressure they introduce, and measure the time spent in computation versus communication between microservices over RPCs. As more cloud applications switch to this new programming model, it is increasingly important to revisit the assumptions we have previously used to build and manage cloud systems.

研究动机与目标

  • 探究从单体架构向微服务架构转变对系统瓶颈和数据中心服务器设计的影响。
  • 量化微服务的性能影响,特别是对指令缓存压力和通信/计算比的影响。
  • 评估在微服务工作负载中,高性能(强大)与低功耗(瘦弱)服务器架构之间的权衡。
  • 评估频率调节和硬件异构性对基于微服务系统的端到端尾部延迟的影响。
  • 刻画单个微服务的性能行为,并识别真实端到端服务中的关键路径贡献者。

提出的方法

  • 使用33个开源微服务(涵盖C、C++、Java、Python、Go等语言)和框架(Thrift、REST、nginx、MongoDB等),构建了一个具有代表性的端到端电影流媒体与租赁服务。
  • 在本地集群的2路、40核x86服务器和Cavium ThunderX平台(1.8GHz有序列核心)上部署该服务。
  • 在不同工作负载(QPS从100到2400)和频率调节(使用RAPL)条件下,测量端到端尾部延迟、吞吐量和CPU使用率。
  • 使用性能分析工具(vTune)测量指令缓存未命中(L1i MPKI)、D-TLB、LLC未命中以及内核态与用户态执行时间。
  • 通过Apache Thrift的RPC分析通信模式,并量化微服务间通信时间与计算时间的比值。
  • 将结果与相同工作负载的单体版本(如MongoDB、Xapian、nginx)进行对比,以隔离微服务特有的影响。

实验结果

研究问题

  • RQ1微服务架构如何影响计算与通信的比值?其性能影响是什么?
  • RQ2与单体工作负载相比,频率调节对微服务架构中端到端尾部延迟的影响如何?
  • RQ3微服务之间的指令缓存压力(L1i MPKI)如何变化?哪些组件对缓存未命中贡献最大?
  • RQ4在微服务工作负载中,高端x86服务器与低功耗ARM架构SoC(如ThunderX)之间的性能权衡是什么?
  • RQ5与单体设计相比,微服务在多大程度上改善或恶化了性能可预测性与系统瓶颈?

主要发现

  • 与单体工作负载相比,微服务对单线程性能表现出显著更高的敏感度,频率调节下尾部延迟的恶化程度更严重。
  • 在ThunderX(1.8GHz,48核)上的端到端服务在吞吐量约1000 QPS时即达到饱和,而高端x86服务器在1.8GHz下仍可维持超过2000 QPS。
  • 指令缓存未命中率(MPKI)在通信密集型组件(如Thrift框架和nginx)中最高,而单个微服务由于代码体积小,表现出较低的i-cache压力。
  • 内核态执行时间是延迟的主要贡献因素,Thrift框架占了相当大比例的i-cache未命中。
  • 微服务的通信/计算比显著高于单体系统,使得性能更依赖于低延迟的跨服务通信。
  • 尽管整体代码量更小,微服务整体仍对指令缓存造成不可忽视的压力,尤其在RPC层,这挑战了其硬件效率更高的假设。

阅读本论文

在 Nubint 阅读器中打开原文,边读边就任意段落提问。

在 Nubint 中阅读本论文

本解读由 AI 根据论文原文生成,引用前请核对原文。