A Comparative Analysis of Monolith vs Microservices Energy ConsumptionResearch Track Paper
As energy demands rise and sustainability becomes critical, Information and Communication Technology’s energy footprint is increasingly monitored. In this context, software architecture may play a significant role in determining a system’s energy consumption. This study aims to evaluate and compare the energy consumption of monolithic and microservice-based software to understand their implications for sustainable software design. We applied a cohort study approach in a controlled experimental environment using two open-source Java applications—PetClinic and TicketMonster —each implemented in both monolithic and microservice versions. Three use cases, representing different workloads, were defined and executed 30 times each per version, resulting in 360 total runs. Energy consumption was measured on the server side using Powerstat, and results were analyzed using Welch’s t-test for statistical significance. Our findings show that microservices may consume less energy than their monolithic counterparts under medium and heavy loads. Specifically, PetClinic and TicketMonster showed energy reductions of 6.13% and 5.44%, respectively. Across all use cases and applications, microservices demonstrated an average energy saving of 5.78% compared to monoliths. These results suggest that microservice architectures may offer improved energy efficiency in high-demand scenarios due to better resource utiliza- tion and modular execution. While the study is limited to controlled conditions and two case studies, it provides a foundation for further research on architectural decisions and sustainable software engineering practices.