Context: Microservice architectures are a widely used software deployment approach, with benefits regarding flexibility and scalability. However, their impact on energy consumption is poorly understood, and often overlooked in favor of performance and other quality attributes (QAs). One understudied concept in this area is microservice granularity, i.e., over how many services the system functionality is distributed. Objective: We therefore aim to analyze the relationship between microservice granularity and two critical QAs in microservice-based systems: energy consumption and performance. Method: We conducted a controlled experiment using two open-source microservice-based systems of different scales: the small Pet Clinic system and the large Train Ticket system. For each system, we created three levels of granularity by merging or splitting services (coarse, medium, and fine) and then exposed them to five levels of request frequency. Results: Our findings revealed that: i) granularity significantly affected both energy consumption and response time, e.g., in the large system, fine granularity consumed on average 461 J more energy (13%) and added 5.2 ms to response time (14%) compared to coarse granularity; ii) higher request loads significantly increased both energy consumption and response times, with moving from 40 to 400 requests / s resulting in 651 J higher energy consumption (23%) and 41.2 ms longer response times (98%); iii) there is a complex relationship between granularity, system scale, energy consumption, and performance that warrants careful consideration in microservice design. We derive generalizable takeaways from our results. Conclusion: Microservices practitioners should take our findings into account when making granularity-related decisions, especially for large-scale systems.


翻译:背景:微服务架构是一种广泛应用的软件部署方式,在灵活性和可扩展性方面具有优势。然而,其对能耗的影响尚不明确,且常因关注性能及其他质量属性而被忽视。该领域中一个研究不足的概念是微服务粒度,即系统功能被分配至多少个服务中。目的:因此,我们旨在分析微服务粒度与基于微服务的系统中两个关键质量属性——能耗与性能——之间的关系。方法:我们使用两个不同规模的开源微服务系统进行了受控实验:小型的Pet Clinic系统与大型的Train Ticket系统。针对每个系统,我们通过合并或拆分服务创建了三种粒度级别(粗粒度、中粒度与细粒度),并将其暴露于五种请求频率水平下。结果:我们的研究发现:i) 粒度对能耗和响应时间均有显著影响,例如在大型系统中,与粗粒度相比,细粒度平均多消耗461 J能量(13%)并使响应时间增加5.2 ms(14%);ii) 更高的请求负载显著增加了能耗和响应时间,当请求频率从40次/秒提升至400次/秒时,能耗增加651 J(23%),响应时间延长41.2 ms(98%);iii) 粒度、系统规模、能耗与性能之间存在复杂关系,在微服务设计中需审慎考量。我们从结果中总结出可推广的结论。结论:微服务实践者在进行与粒度相关的决策时,尤其是针对大规模系统,应充分考虑本研究的结果。

0
下载
关闭预览

相关内容

专知会员服务
34+阅读 · 2021年9月16日
PointNet系列论文解读
人工智能前沿讲习班
17+阅读 · 2019年5月3日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
9+阅读 · 2015年12月31日
国家自然科学基金
46+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员