How Does Microservice Granularity Impact Energy Consumption and Performance? A Controlled Experiment

Yiming Zhao*, Tiziano De Matteis, Justus Bogner

*Corresponding author for this work

Research output: Chapter in Book / Report / Conference proceedingConference contributionAcademicpeer-review

Abstract

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.

Original languageEnglish
Title of host publicationProceedings - 2025 IEEE 22nd International Conference on Software Architecture, ICSA 2025
PublisherInstitute of Electrical and Electronics Engineers Inc.
Pages84-95
Number of pages12
ISBN (Electronic)9798331520908
DOIs
Publication statusPublished - 2025
Event22nd IEEE International Conference on Software Architecture, ICSA 2025 - Odense, Denmark
Duration: 31 Mar 20254 Apr 2025

Publication series

NameProceedings - 2025 IEEE 22nd International Conference on Software Architecture, ICSA 2025

Conference

Conference22nd IEEE International Conference on Software Architecture, ICSA 2025
Country/TerritoryDenmark
CityOdense
Period31/03/254/04/25

Bibliographical note

Publisher Copyright:
© 2025 IEEE.

Keywords

  • controlled experiment
  • energy consumption
  • granularity
  • microservices
  • performance

Fingerprint

Dive into the research topics of 'How Does Microservice Granularity Impact Energy Consumption and Performance? A Controlled Experiment'. Together they form a unique fingerprint.

Cite this