Skip to main content

Performance Impact of Microservice Granularity Decisions: An Empirical Evaluation Using the Service Weaver Framework

  • Conference paper
  • First Online:
Software Architecture (ECSA 2024)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 14889))

Included in the following conference series:

  • 677 Accesses

Abstract

The Service Weaver framework enables the development of distributed applications in Go as modular monoliths, with the flexibility to deploy monolith components in different environments and at various levels of granularity without code changes. This work evaluates the performance of an open-source microservice application using Service Weaver, considering multiple service granularity decisions in environments of one and two virtual machines under various workloads. The results indicate that service decoupling, while beneficial to modularity and maintenance, can significantly increase communication overhead between processes and virtual machines, negatively affecting the application’s performance and scalability. These findings highlight the importance of balancing service granularity and communication costs in the design and deployment of microservice applications.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

We’re sorry, something doesn't seem to be working properly.

Please try refreshing the page. If that doesn't work, please contact support so we can address the problem.

Data Availability Statement

To facilitate reproduction and potential extension of this work by the research community, all experimental artifacts and data generated are publicly available at https://github.com/mendoncas/granularity-evaluation/.

Notes

  1. 1.

    When using the Kubernetes deployer, Service Weaver creates a separate Deployment specification for each group of co-located components specified in the application’s configuration file [6].

References

  1. Andrade, B., Santos, S., Silva, A.R.: A comparison of static and dynamic analysis to identify microservices in monolith systems. In: Tekinerdogan, B., Trubiani, C., Tibermacine, C., Scandurra, P., Cuesta, C.E. (eds.) ECSA 2023. LNCS, vol. 14212, pp. 354–361. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-42592-9_25

    Chapter  Google Scholar 

  2. Costa, L., Ribeiro, A.N.: Performance evaluation of microservices featuring different implementation patterns. In: Abraham, A., Gandhi, N., Hanne, T., Hong, T.-P., Nogueira Rios, T., Ding, W. (eds.) ISDA 2021. LNNS, vol. 418, pp. 165–176. Springer, Cham (2022). https://doi.org/10.1007/978-3-030-96308-8_15

    Chapter  Google Scholar 

  3. Cui, J., Chen, P., Yu, G.: A learning-based dynamic load balancing approach for microservice systems in multi-cloud environment. In: IEEE 26th International Conference on Parallel and Distributed Systems (ICPADS), pp. 334–341. IEEE (2020)

    Google Scholar 

  4. Dragoni, N., Giallorenzo, S., Lafuente, A.L., Mazzara, M., Montesi, F., Mustafin, R., Safina, L.: Microservices: yesterday, today, and tomorrow. In: Mazzara, M., Meyer, B. (eds.) Present and Ulterior Software Engineering, pp. 195–216. Springer, Cham (2017). https://doi.org/10.1007/978-3-319-67425-4_12

    Chapter  Google Scholar 

  5. Ghemawat, S., et al.: Towards modern development of cloud applications. In: Proceedings of the 19th Workshop on Hot Topics in Operating Systems, pp. 110–117 (2023)

    Google Scholar 

  6. Google: Service Weaver: A Programming Framework for Writing and Deploying Cloud Applications (2024). https://serviceweaver.dev. Accessed 15 Aug 2024

  7. Google Cloud: Online Boutique (2023). https://github.com/GoogleCloudPlatform/microservices-demo. Accessed 15 Aug 2024

  8. Hassan, S., Bahsoon, R., Kazman, R.: Microservice transition and its granularity problem: a systematic mapping study. Softw. Pract. Exp. 50(9), 1651–1681 (2020)

    Article  Google Scholar 

  9. Homay, A., Zoitl, A., de Sousa, M., Wollschlaeger, M., Chrysoulas, C.: Granularity cost analysis for function block as a service. In: 2019 IEEE 17th International Conference on Industrial Informatics (INDIN), vol. 1, pp. 1199–1204. IEEE (2019)

    Google Scholar 

  10. Jamshidi, P., Pahl, C., Mendonça, N.C., Lewis, J., Tilkov, S.: Microservices: the journey so far and challenges ahead. IEEE Softw. 35(3), 24–35 (2018)

    Article  Google Scholar 

  11. Johnson, J., Kharel, S., Mannamplackal, A., Abdelfattah, A.S., Cerny, T.: Service Weaver: A Promising Direction for Cloud-native Systems? arXiv preprint arXiv:2404.09357 (2024)

  12. Light: Light Hybrid 4j (2024). https://www.networknt.com/getting-started/light-hybrid-4j/. Accessed 15 Aug 2024

  13. Locust.io: Locust: an open source load testing tool (2024). https://locust.io/. Accessed 15 Aug 2024

  14. Molyneaux, I.: The Art of Application Performance Testing: From Strategy to Tools. O’Reilly Media, Sebastopol (2014)

    Google Scholar 

  15. Newman, S.: Monolith to Microservices: Evolutionary Patterns to Transform your Monolith. O’Reilly Media, Sebastopol (2019)

    Google Scholar 

  16. Oracle: VirtualBox (2024). https://www.virtualbox.org/. Accessed 15 Aug 2024

  17. Park, J., Choi, B., Lee, C., Han, D.: GRAF: a graph neural network based proactive resource allocation framework for SLO-oriented microservices. In: Proceedings of the 17th International Conference on emerging Networking EXperiments and Technologies (CoNEXT), pp. 154–167 (2021)

    Google Scholar 

  18. Quéval, P.J., Zdun, U.: Extracting the architecture of microservices: an approach for explainability and traceability. In: Tekinerdogan, B., Trubiani, C., Tibermacine, C., Scandurra, P., Cuesta, C.E. (eds.) ECSA 2023. LNCS, vol. 14212, pp. 346–353. Springer, Cham (2023). https://doi.org/10.1007/978-3-031-42592-9_24

    Chapter  Google Scholar 

  19. Rota, G.C.: The number of partitions of a set. Am. Math. Mon. 71(5), 498–504 (1964)

    Article  MathSciNet  Google Scholar 

  20. Saleh Sedghpour, M.R., Klein, C., Tordsson, J.: An empirical study of service mesh traffic management policies for microservices. In: ACM/SPEC International Conference on Performance Engineering (ICPE), pp. 17–27. AMC (2022)

    Google Scholar 

  21. Shadija, D., Rezai, M., Hill, R.: Microservices: granularity vs. performance. In: Companion Proceedings of the 10th International Conference on Utility and Cloud Computing (UCC), pp. 215–220 (2017)

    Google Scholar 

  22. Singh, S., Werle, D., Koziolek, A.: ARCHI4MOM: using tracing information to extract the architecture of microservice-based systems from message-oriented middleware. In: Gerostathopoulos, I., Lewis, G., Batista, T., Bureš, T. (eds.) ECSA 2022. LNCS, vol. 13444, pp. 189–204. Springer, Cham (2022). https://doi.org/10.1007/978-3-031-16697-6_14

    Chapter  Google Scholar 

  23. Soldani, J., Muntoni, G., Neri, D., Brogi, A.: The \(\mu \)TOSCA toolchain: mining, analyzing, and refactoring microservice-based architectures. Softw. Pract. Exp. 51(7), 1591–1621 (2021)

    Google Scholar 

  24. Spring: Spring Modulith (2024). https://spring.io/projects/spring-modulith. Accessed 15 Aug 2024

  25. Su, R., Li, X.: Modular Monolith: Is This the Trend in Software Architecture? arXiv preprint arXiv:2401.11867 (2024)

  26. The Kubernetes Authors: Minikube (2024). https://minikube.sigs.k8s.io/docs/. Accessed 15 Aug 2024

  27. Vera-Rivera, F.H., Gaona, C., Astudillo, H.: Defining and measuring microservice granularity–a literature overview. PeerJ Comput. Sci. 7, e695 (2021)

    Article  Google Scholar 

Download references

Acknowledgments

The generative AI tools ChatGPT-4 Turbo and GitHub Copilot were used to assist in structuring and revising this paper.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Nabor C. Mendonça .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2024 The Author(s), under exclusive license to Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Mendonça Filho, R.C., Mendonça, N.C. (2024). Performance Impact of Microservice Granularity Decisions: An Empirical Evaluation Using the Service Weaver Framework. In: Galster, M., Scandurra, P., Mikkonen, T., Oliveira Antonino, P., Nakagawa, E.Y., Navarro, E. (eds) Software Architecture. ECSA 2024. Lecture Notes in Computer Science, vol 14889. Springer, Cham. https://doi.org/10.1007/978-3-031-70797-1_13

Download citation

  • DOI: https://doi.org/10.1007/978-3-031-70797-1_13

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-031-70796-4

  • Online ISBN: 978-3-031-70797-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics