Network Centrality as a New Perspective on Microservice Architecture

Alexander Bakhtin, Matteo Esposito, Valentina Lenarduzzi, Davide Taibi · 2025

Read Network Centrality as a New Perspective on Microservice Architecture by Alexander Bakhtin, Matteo Esposito, Valentina Lenarduzzi, Davide Taibi (2025) in the Tower of Babel, a free online library of public-domain works preserved in clean, searchable text. No sign-up. The full text is served as a plain-text file at a predictable URL, where text is present: https://antarctic-labs.com/tower-of-babel/arxiv-2501-13520.txt.

Introduction

Bakhtin and co-authors test in 2025 whether network centrality measures give fresh insight into microservice software design. Such systems split an app into small services that call each other. Bad shapes, like hub services, are often hunted with graph tools.

They rebuilt the design of 24 open source projects and studied 53 services. Size, complexity, and quality metrics were set against centrality scores for each service. Of 902 metric pairings, about a third showed weak to mid correlation. Ratio based centrality looks promising for spotting named bad shapes. The authors say centrality adds a view that standard metrics miss.

Catalog record

CREATORAlexander Bakhtin, Matteo Esposito, Valentina Lenarduzzi, Davide Taibi
YEAR2025
COLLECTIONPAPERS
FORMATTXT
FILE SIZE50 KB
VERSION1.0
LICENSEhttp://creativecommons.org/licenses/by/4.0/
RIGHTSCC BY
SOURCEarXiv

Source: https://arxiv.org/abs/2501-13520

Browse the full library · About the Tower of Babel

Full text

The opening of the work, from the library's hosted text:

Network Centrality as a New Perspective on Microservice Architecture Alexander Bakhtin, Matteo Esposito, Valentina Lenarduzzi, Davide Taibi Abstract Context : Over the past decade, the adoption of Microservice Architecture (MSA) has led to the identification of various patterns and anti-patterns, such as Nano/Mega/Hub services. Detecting these anti-patterns often involves modeling the system as a Service Dependency Graph (SDG) and applying graph-theoretic approaches. Aim : While previous research has explored software metrics (SMs) such as size, complexity, and quality for assessing MSAs, the potential of graph-specific metrics like network centrality remains largely unexplored. This study investigates whether centrality metrics (CMs) can provide new insights into MSA quality and facilitate the detection of architectural anti-patterns, complementing or extending traditional SMs . Method : We analyzed 24 open-source MSA projects, reconstructing their architectures to study 53 microservices. We measured SMs and CMs for each microservice and tested their correlation to determine the relationship between these metric types. Results and Conclusion : Among 902 computed metric correlations, we found weak to moderate correlation in 282 cases . These findings suggest that centrality metrics offer a novel perspective for understanding MSA properties. Specifically, ratio-based centrality metrics show promise for detecting specific anti-patterns, while subgraph centrality needs further investigation for its applicability in architectural assessments. I Introduction Microservice Architecture (MSA) is frequently modeled as a Service Dependency (Call) graph (SDG) [ 1 ] . Recently, our community has been increasingly leveraging it for patterns or anti-patterns [ 2 , 3 , 4 ] . Given an SDG, we can measure node centrality [ 5 , 6 ] , i.e., the relative importance of nodes in a network, delivering a new perspective from which recent works in Software Engineering and Architecture draw exciting results. Studying the relationship, if any, between node centrality in a microservice SDG and software metrics (SMs) can uncover valuable insights into system architecture, performance, and maintainability [ 1 , 7 ] . Central nodes often play critical roles in communication and computation, making them key to identifying bottlenecks, scalability challenges, or potential points of failure. Correlating centrality with metrics like size, complexity, and quality can improve optimization, testing, and refactoring efforts [ 8 , 9 ] . In fault localization tasks specific to cloud architecture, Mariani et al. [ 10 ] utilized centrality algorithms as part of their LOUD framework on the propagation graph of KPIs to identify the failing resources. Wu et al. [ 11 ] adopted a dynamically reconstructed SDG to build a metric causality graph, on which they calculate the centrality scores to determine the root causes of anomalies. Ma et al. [ 12 ] leveraged a similar approach, but they omitted the SDG generation step. Li et al. and d’Aragona et al. [ 13 , 14 ] have used centrality algorithms extensively on the network of developer collaboration in microservice development to identify core contributors and key developers. However, to our knowledge, no previous work has investigated how the diverse centrality metrics of an MS are related to other classical approaches for measuring the overall quality and “importance” of a software entity, usually obtained via static code analysis (SCA). Hence, we designed this work to provide a preliminary answer and pave the way for a more in-depth analysis. We employed SCA tools to gather SMs such as size, complexity, and quality for 53 microservice from 13 systems, reconstruct their architecture, and study the relationship of different metrics with microservice centrality. Thus, our work provides the following contributions: ( i ) we provide a unified dataset containing Java Spring OSS microservice projects, their architecture, and microservice-level SMs; ( ii ) we perform the first investigation on the relationship of SMs with node CMs. Our findings suggest that microservice CMs are weak to moderately correlated, when statistically significant, with traditional SMs, except when the correlations arise from the SDG’s structural properties. Finally, we highlight a chance for centrality metrics to fundamentally provide another perspective for microservice architecture analysis. For instance, centrality can be used to identify anti-patterns such as Hub-like, Nano, and Mega-services. Paper structure : Section II presents the background of the static analysis techniques, Section III discusses the related works, Section IV presents the empirical study design, Section V presents our findings and Section VI discusses them. Finally, Section VII addresses the threats to validity of this work and Section VIII concludes the paper. II Background In this section, we describe the background concerning architectural reconstruction using static analysis and calculation of size, complexity, quality, and centrality metrics. II-A Static architecture reconstruction Static analysis refers to the analysis of the source code (in certain cases - bytecode [ 15 , 16 ] ) of a system to gain insight into the system’s design and architecture, code quality, and presence of patterns/anti-patterns/smells [ 2 , 17 ] . Bakhtin et al. [ 18 ] performed a Systematic Mapping Study of static analysis tools aiming in particular at reconstructing microservice architecture. Together with additional authors, they currently attempt to run the tools and consider their effectiveness in achieving this task [ 19 , 20 ] . Our study used the Code2DFD tool by Schneider et al. [ 21 ] , which is identified in [ 20 ] as one of the most effective and generalizable tools. This tool targets exclusively Java projects leveraging the Java Spring Boot framework for building microservices. II-B Size metrics We use the Understand tool by SciTools 1 1 1 https://scitools.com/ to compute the size metrics of a project. Understand is a commercial tool that is adopted in the industry 2 2 2 The tool’s website mentions companies like Dell, IBM, and Samsung . It is thus a convincing choice for practitioners facilitating the potential adoption of the proposed analysis in the industry while also providing free licenses for educational and academic use, thus enabling other researchers to replicate and extend our work. Metrics provided by Understand include counts of lines of code, comments, total lines, number of classes, and methods. See the Online Appendix for the full list of metrics [ 22 ] . II-C Complexity metrics Jasome 3 3 3 https://github.com/rodhilton/jasome is a static analysis tool that can compute many different complexity metrics for the Object-Oriented paradigm in Java. It provides the metrics on package , class , and method levels. The metrics provided, among others, include McCabe’s Cyclomatic Complexity, McClure’s Complexity, Depth of Inheritance Tree, Weighted Methods per Class. Additionally, some of the provided metrics, such as the Number of Classes/Methods, are size metrics. See the Online Appendix for the full list of metrics [ 22 ] . II-D Quality metrics SonarQube is an industrial tool 4 4 4 https://www.sonarsource.com/products/sonarqube/ used for assessing the software quality. It also provides a free OSS version, which the researchers frequently use for studies related to software quality and technical debt [ 23 , 24 ] . It provides metrics such as sqale index, remediation effort, ratings of security and reliability, and duplicated blocks. A handful of provided metrics, such as cognitive complexity, are complexity metrics. See the Online Appendix for a full list of metrics [ 22 ] . II-E Centrality metrics In network science, centrality metrics (CMs) are defined to assess the relative importance of a

Read the complete text