Dynamic Analysis for Detecting Microservices Antipatterns
Resumo
The increasing adoption of microservices architecture in software development, driven by the need for flexible and scalable systems, has made it imperative to develop a strategy for monitoring, verifying, and validating the system’s overall health at various levels, including architecture, design, and source code. Unfortunately, as software evolves, it becomes susceptible to recurrent poor solutions to problems that can negatively impact the system’s health, also known as antipatterns. Cataloged techniques for detecting antipatterns in diverse architectural models employ different approaches, which involve both static analysis of code and environment, as well as dynamic analysis of data collected during execution. However, detecting antipatterns in an execution environment, particularly in the context of microservices, becomes challenging due to the architecture’s inherent distributed nature and operational complexity, which present several difficulties in detecting antipatterns related to system visibility, communication, scope recognition, performance, and other challenges inherent to microservices. This work proposes an approach to detect primary runtime antipatterns, including four different strategies, and evaluates its effectiveness by applying it to a real-life open-source microservice application.
Referências
Nuha Alshuqayran, Nour Ali, and Roger Evans. 2016. A Systematic Mapping Study in Microservice Architecture. In 2016 IEEE 9th International Conference on Service-Oriented Computing and Applications (SOCA). 44–51. DOI: 10.1109/SOCA.2016.15
Paolo Bacchiega, Ilaria Pigazzini, and Francesca Arcelli Fontana. 2022. Microservices smell detection through dynamic analysis. In 2022 48th Euromicro Conference on Software Engineering and Advanced Applications (SEAA). 290–293. DOI: 10.1109/SEAA56994.2022.00052
Paolo Bacchiega, Ilaria Pigazzini, and Francesca Arcelli Fontana. 2022. Microservices smell detection through dynamic analysis. In 2022 48th Euromicro Conference on Software Engineering and Advanced Applications (SEAA). 290–293. DOI: 10.1109/SEAA56994.2022.00052
David Baum, Jens Dietrich, Craig Anslow, and Richard Müller. 2018. Visualizing Design Erosion: How Big Balls of Mud are Made. In 2018 IEEEWorking Conference on Software Visualization (VISSOFT). 122–126. DOI: 10.1109/VISSOFT.2018.00022
Justus Bogner, Tobias Boceck, Matthias Popp, Dennis Tschechlov, Stefan Wagner, and Alfred Zimmermann. 2019. Towards a Collaborative Repository for the Documentation of Service-Based Antipatterns and Bad Smells. In 2019 IEEE International Conference on Software Architecture Companion (ICSA-C). 95–101. DOI: 10.1109/ICSA-C.2019.00025
John Brondum and Liming Zhu. 2012. Visualising architectural dependencies. In 2012 Third International Workshop on Managing Technical Debt (MTD). 7–14. DOI: 10.1109/MTD.2012.6226003
William J. Brown. 1998. AntiPatterns: Refactoring software, Architectures, and projects in crisis. John Wiley amp; Sons.
Andrés Carrasco, Brent van Bladel, and Serge Demeyer. 2018. Migrating towards Microservices: Migration and Architecture Smells. In Proceedings of the 2nd International Workshop on Refactoring (Montpellier, France) (IWoR 2018). Association for Computing Machinery, New York, NY, USA, 1–6. DOI: 10.1145/3242163.3242164
Paolo Di Francesco, Patricia Lago, and Ivano Malavolta. 2019. Architecting with microservices: A systematic mapping study. Journal of Systems and Software 150 (2019), 77–97. DOI: 10.1016/j.jss.2019.01.001
Jamilah Din, Anas Bassam AL-Badareen, and Yusmadi Yah Jusoh. 2012. Antipatterns detection approaches in Object-Oriented Design: A literature review. In 2012 7th International Conference on Computing and Convergence Technology (ICCCT). 926–931.
Nicola Dragoni, Saverio Giallorenzo, Alberto Lluch Lafuente, Manuel Mazzara, Fabrizio Montesi, Ruslan Mustafin, and Larisa Safina. 2017. Microservices: Yesterday, Today, and Tomorrow. Springer International Publishing, Cham, 195–216. DOI: 10.1007/978-3-319-67425-4_12
Ulf Eliasson, Antonio Martini, Robert Kaufmann, and Sam Odeh. 2015. Identifying and visualizing Architectural Debt and its efficiency interest in the automotive domain: A case study. In 2015 IEEE 7th International Workshop on Managing Technical Debt (MTD). 33–40. DOI: 10.1109/MTD.2015.7332622
H. Fang, Y. Cai, R. Kazman, and J. Lefever. 2023. Identifying Anti-Patterns in Distributed Systems With Heterogeneous Dependencies. Proceedings - IEEE 20th International Conference on Software Architecture Companion, ICSA-C 2023 (2023), 116–120. DOI: 10.1109/ICSA-C57050.2023.00035 cited By 0.
Hassan Farsi, Driss Allaki, Abdeslam En-Nouaary, and Mohamed Dahchour. 2022. A Graph-based Solution to Deal with Cyclic Dependencies in Microservices Architecture. In 2022 9th International Conference on Future Internet of Things and Cloud (FiCloud). 254–259. DOI: 10.1109/FiCloud57274.2022.00042
H. Farsi, D. Allaki, A. En-Nouaary, and M. Dahchour. 2022. A Graph-based Solution to Deal with Cyclic Dependencies in Microservices Architecture. Proceedings - 2022 International Conference on Future Internet of Things and Cloud, FiCloud 2022 (2022), 254–259. DOI: 10.1109/FiCloud57274.2022.00042 cited By 0.
Francesca Arcelli Fontana, Ilaria Pigazzini, Riccardo Roveda, and Marco Zanoni. 2016. Automatic Detection of Instability Architectural Smells. In 2016 IEEE International Conference on Software Maintenance and Evolution (ICSME). 433–437. DOI: 10.1109/ICSME.2016.33
Martin Fowler and James Lewis. 2014. [link]
E. Gaidels and M. Kirikova. 2020. Service Dependency Graph Analysis in Microservice Architecture. Lecture Notes in Business Information Processing 398 LNBIP (2020), 128–139. DOI: 10.1007/978-3-030-61140-8_9 cited By 5.
Martin Garriga. 2018. Towards a Taxonomy of Microservices Architectures. In Software Engineering and Formal Methods, Antonio Cerone and Marco Roveri (Eds.). Springer International Publishing, Cham, 203–218.
GitHub Inc. 2024. GitHub: Where the world builds software. [link]. Accessed: 2025-07-06.
Mouna Hadj-Kacem and Nadia Bouassida. 2019. Towards a taxonomy of bad smells detection approaches. ICSOFT 2018 - Proceedings of the 13th International Conference on Software Technologies (2019), 164 – 175. DOI: 10.5220/0006869201640175
Aric A. Hagberg, Daniel A. Schult, and Pieter J. Swart. 2008. Exploring Network Structure, Dynamics, and Function using NetworkX. Proceedings of the 7th Python in Science Conference (SciPy) 2008 (2008), 11–15. [link]
D. Hardt. 2012. The OAuth 2.0 Authorization Framework. Internet Engineering Task Force (IETF) Request for Comments. [link] Accessed: 2025-07-06.
John D. Hunter. 2007. Matplotlib: A 2D graphics environment. Computing in Science & Engineering 9, 3 (2007), 90–95.
Istio Authors. 2024. Istio: Connect, secure, control, and observe services. [link]. Accessed: 2025-07-06.
Jenkins Project. 2024. Jenkins: The leading open source automation server. [link]. Accessed: 2025-07-06.
Matt Klein. 2024. Envoy: Modern, High Performance C++ Proxy. [link]. Accessed: 2025-07-06.
Wubin Li, Yves Lemieux, Jing Gao, Zhuofeng Zhao, and Yanbo Han. 2019. Service Mesh: Challenges, State of the Art, and Future Research Opportunities. In 2019 IEEE International Conference on Service-Oriented System Engineering (SOSE). 122–1225. DOI: 10.1109/SOSE.2019.00026
L. Liu, Z. Tu, X. He, X. Xu, and Z.Wang. 2021. An Empirical Study on Underlying Correlations between Runtime Performance Deficiencies and ’Bad Smells’ of Microservice Systems. Proceedings - 2021 IEEE International Conference on Web Services, ICWS 2021 (2021), 751–757. DOI: 10.1109/ICWS53863.2021.00103 cited By 2.
Bahgat Mashaly, Sahar Selim, Ahmed H. Yousef, and Khaled M. Fouad. 2022. Privacy by Design: A Microservices-Based Software Architecture Approach. In 2022 2nd International Mobile, Intelligent, and Ubiquitous Computing Conference (MIUCC). 357–364. DOI: 10.1109/MIUCC55081.2022.9781685
R. Matar and J. Jahic. 2023. An Approach for Evaluating the Potential Impact of Anti-Patterns on Microservices Performance. Proceedings - IEEE 20th International Conference on Software Architecture Companion, ICSA-C 2023 (2023), 167–170. DOI: 10.1109/ICSA-C57050.2023.00044 cited By 0.
Haris Mumtaz, Paramvir Singh, and Kelly Blincoe. 2021. A systematic mapping study on architectural smells detection. Journal of Systems and Software 173 (2021), 110885. DOI: 10.1016/j.jss.2020.110885
H. Mumtaz, P. Singh, and K. Blincoe. 2021. A systematic mapping study on architectural smells detection. Journal of Systems and Software 173 (2021). DOI: 10.1016/j.jss.2020.110885 cited By 11.
Francis Palma and Naouel Mohay. 2015. A study on the taxonomy of service antipatterns. In 2015 IEEE 2nd International Workshop on Patterns Promotion and Anti-patterns Prevention (PPAP). 5–8. DOI: 10.1109/PPAP.2015.7076848
G. Parker, S. Kim, A.A. Maruf, T. Cerny, K. Frajtak, P. Tisnovsky, and D. Taibi. 2023. Visualizing Anti-Patterns in Microservices at Runtime: A Systematic Mapping Study. IEEE Access 11 (2023), 4434–4442. DOI: 10.1109/ACCESS.2023.3236165 cited By 1.
Kai Petersen, Sairam Vakkalanka, and Ludwik Kuzniarz. 2015. Guidelines for conducting systematic mapping studies in software engineering: An update. Information and software technology 64 (2015), 1–18.
I. Pigazzini, F. Arcelli Fontana, and A. Maggioni. 2019. Tool support for the migration to microservice architecture: An industrial case study. Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics) 11681 LNCS (2019), 247–263. DOI: 10.1007/978-3-030-29983-5_17 cited By 14.
Ilaria Pigazzini, Francesca Arcelli Fontana, Valentina Lenarduzzi, and Davide Taibi. 2020. Towards Microservice Smells Detection. In Proceedings of the 3rd International Conference on Technical Debt (Seoul, Republic of Korea) (TechDebt ’20). Association for Computing Machinery, New York, NY, USA, 92–97. DOI: 10.1145/3387906.3388625
Ilaria Pigazzini, Francesca Arcelli Fontana, Valentina Lenarduzzi, and Davide Taibi. 2020. Towards Microservice Smells Detection. In Proceedings of the 3rd International Conference on Technical Debt (Seoul, Republic of Korea) (TechDebt ’20). Association for Computing Machinery, New York, NY, USA, 92–97. DOI: 10.1145/3387906.3388625
Francisco Ponce. 2021. Towards Resolving Security Smells in Microservice-Based Applications. In Advances in Service-Oriented and Cloud Computing, Christian Zirpins, Iraklis Paraskakis, Vasilios Andrikopoulos, Nane Kratzke, Claus Pahl, Nabil El Ioini, Andreas S. Andreou, George Feuerlicht, Winfried Lamersdorf, Guadalupe Ortiz, Willem-Jan Van den Heuvel, Jacopo Soldani, Massimo Villari, Giuliano Casale, and Pierluigi Plebani (Eds.). Springer International Publishing, Cham, 133–139.
Pethuru Raj and Anupama Raman. 2018. The Hybrid Cloud: The Journey Toward Hybrid IT. Springer International Publishing, Cham, 91–110. DOI: 10.1007/978-3-319-78637-7_5
Louis Ryan, Shriram Rajagopalan, et al. 2018. Istio: A Platform for Connecting, Securing, and Managing Microservices. Technical Report. Google, IBM, Lyft. [link] Accessed: 2025-07-06.
Thomas Schirgi and Eugen Brenner. 2021. Quality Assurance for Microservice Architectures. In 2021 IEEE 12th International Conference on Software Engineering and Service Science (ICSESS). 76–80. DOI: 10.1109/ICSESS52187.2021.9522227
SiteWhere Project. 2025. SiteWhere: Open Platform for the Internet of Things (IoT). [link]. Accessed: 2025-07-06.
Spinnaker Authors. 2024. Spinnaker: Open Source Continuous Delivery Platform. [link]. Accessed: 2025-07-06.
Davide Taibi and Valentina Lenarduzzi. 2018. On the Definition of Microservice Bad Smells. IEEE Software 35, 3 (2018), 56–62. DOI: 10.1109/MS.2018.2141031
Johannes Thönes. 2015. Microservices. IEEE Software 32, 1 (2015), 116–116. DOI: 10.1109/MS.2015.11
Rafik Tighilt, Manel Abdellatif, Imen Trabelsi, Loïc Madern, Naouel Moha, and Yann-Gaël Guéhéneuc. 2023. On the maintenance support for microservice-based systems through the specification and the detection of microservice antipatterns. Journal of Systems and Software 204 (2023), 111755. DOI: 10.1016/j.jss.2023.111755
Catia Trubiani, Anne Koziolek, Vittorio Cortellessa, and Ralf Reussner. 2014. Guiltbased handling of software performance antipatterns in palladio architectural models. Journal of Systems and Software 95 (2014), 141–165. DOI: 10.1016/j.jss.2014.03.081
Guido Van Rossum and Python Software Foundation. 2023. Python: An interpreted, high-level and general-purpose programming language. [link]. Accessed: 2025-07-06.
Andrew Walker, Dipta Das, and Tomas Cerny. 2020. Automated Code-Smell Detection in Microservices Through Static Analysis: A Case Study. Applied Sciences 10, 21 (2020). DOI: 10.3390/app10217800
A. Walker, D. Das, and T. Cerny. 2020. Automated code-smell detection in microservices through static analysis: A case study. Applied Sciences (Switzerland) 10, 21 (2020), 1–20. DOI: 10.3390/app10217800 cited By 12.
A. Walker, D. Das, and T. Cerny. 2021. Automated Microservice Code-Smell Detection. Lecture Notes in Electrical Engineering 739 LNEE (2021), 211–221. DOI: 10.1007/978-981-33-6385-4_20 cited By 3.
Muhammad Waseem, Peng Liang, and Mojtaba Shahin. 2020. A Systematic Mapping Study on Microservices Architecture in DevOps. Journal of Systems and Software 170 (2020), 110798. DOI: 10.1016/j.jss.2020.110798
Chenxing Zhong, Huang Huang, He Zhang, and Shanshan Li. 2022. Impacts, causes, and solutions of architectural smells in microservices: An industrial investigation. Software: Practice and Experience 52, 12 (2022), 2574–2597. arXiv: [link] DOI: 10.1002/spe.3138
Chenxing Zhong, Huang Huang, He Zhang, and Shanshan Li. 2022. Impacts, causes, and solutions of architectural smells in microservices: An industrial investigation. Software: Practice and Experience 52, 12 (2022), 2574–2597. arXiv: [link] DOI: 10.1002/spe.3138
