Tuesday 18 March 2025
The microservices architecture has become a popular choice for building modern software systems, but it’s not without its challenges. One of the biggest concerns is the impact that microservices can have on energy consumption and system performance. Researchers at Vrije Universiteit Amsterdam recently conducted an experiment to explore how different levels of granularity in microservices affect these two critical metrics.
The team used two open-source microservice-based systems, Pet Clinic and Train Ticket, which differ significantly in scale and complexity. They then varied the level of granularity by merging or splitting services to create three levels: coarse, medium, and fine. The researchers exposed each system to five different request frequencies, ranging from 40 to 400 requests per second.
The results were fascinating. In terms of energy consumption, the team found that increasing the level of granularity generally led to higher energy use. However, this trend was not consistent across all systems and load levels. For example, in the Train Ticket system, medium granularity actually consumed less energy than fine or coarse granularity at high request frequencies.
When it comes to system performance, measured by response time, the team found that finer-grained microservices generally led to slower response times. This is likely because more services need to be invoked and communicated with to complete a task. However, the impact of granularity on response time was relatively small compared to other factors such as request frequency.
One of the most important findings from this study is that energy consumption and system performance are not necessarily in a trade-off relationship. In other words, reducing energy consumption does not automatically mean sacrificing performance. This is good news for developers who need to balance these competing demands.
The researchers also emphasized the importance of considering the specific characteristics of each system when making decisions about microservices granularity. For example, systems with high request frequencies may benefit from coarser-grained services, while those with lower request frequencies may be better suited to finer-grained services.
Overall, this study provides valuable insights into the impact of microservices granularity on energy consumption and system performance. As software development continues to evolve and become more complex, understanding these factors will be crucial for building efficient, scalable, and reliable systems.
Cite this article: “Microservices Granularity: Balancing Energy Consumption and System Performance”, The Science Archive, 2025.
Microservices, Energy Consumption, System Performance, Granularity, Request Frequency, Pet Clinic, Train Ticket, Open-Source, Scalability, Reliability