Microservice architectures form the backbone of modern software systems for their scalability, resilience, and maintainability, but their rise in cloud-native environments raises energy efficiency concerns. While prior research addresses microservice decomposition and placement, the impact of topology, the structural arrangement and interaction pattern among services, on energy efficiency remains largely underexplored. This study quantifies the impact of topologies on energy efficiency and performance across six canonical ones (Sequential Fan-Out, Parallel Fan-Out, Chain, Hierarchical, Probabilistic, Mesh), each instantiated at 5-, 10-, and 20-service scales using the $μ\text{Bench}$ framework. We measure throughput, response time, energy usage, CPU utilization, and failure rates under an identical workload. The results indicate that topology influences the energy efficiency of microservices under the studied conditions. As system size increases, energy consumption grows, with the steepest rise observed in dense Mesh and Chain topologies. Mesh topologies perform worst overall, with low throughput, long response times, and high failure rates. Hierarchical, Chain, and Fan-Out designs balance performance and energy use better. As systems scale, metrics converge, with Probabilistic and Parallel Fan-Out emerging as the most energy-efficient under CPU-bound loads. These results guide greener microservice architecture design and serve as a baseline for future research on workload and deployment impacts.
翻译:微服务架构因其可扩展性、弹性及可维护性,已成为现代软件系统的基石。然而,其在云原生环境中的广泛应用引发了能源效率方面的担忧。尽管已有研究关注微服务的拆分与部署问题,但拓扑结构(即服务间的结构安排与交互模式)对能效的影响仍鲜有探讨。本研究量化了六种典型拓扑结构(顺序扇出、并行扇出、链式、层次、概率性、网格)对能效与性能的影响,并利用 $\mu\text{Bench}$ 框架分别以5、10、20个服务规模实例化每种拓扑。我们在相同工作负载下测量吞吐量、响应时间、能耗、CPU利用率及故障率。结果表明,在实验条件下,拓扑结构显著影响微服务的能效。随着系统规模增大,能耗随之增加,其中密集的网格拓扑与链式拓扑的能耗增幅最为显著。网格拓扑整体表现最差,其吞吐量低、响应时间长且故障率高。相比之下,层次拓扑、链式拓扑与扇出拓扑在性能与能耗之间实现了更好的平衡。随着系统规模扩展,各项指标趋于收敛,其中概率性拓扑与并行扇出拓扑在CPU密集型负载下展现出最高的能效。本研究为设计更绿色的微服务架构提供了指导,并为未来研究负载与部署影响奠定了基准。