[Paper Review] From Monolith to Microservices: Static and Dynamic Analysis Comparison
This paper compares static and dynamic analysis techniques for identifying microservice boundaries in monolith systems, using similarity measures and complexity metrics to evaluate decomposition quality. It finds neither static nor dynamic analysis consistently outperforms the other, but dynamic analysis requires significantly more effort and yields less coverage, suggesting a higher cost-benefit ratio despite comparable results.
One of the most challenging problems in the migration of a monolith to a microservices architecture is the identification of the microservices boundaries. Several approaches have been recently proposed for the automatic identification of microservices, which, even though following the same basic steps, diverge on how data of the monolith system is collected and analysed. In this paper, we compare the decompositions generated for two monolith systems into a set of candidate microservices, when static and dynamic analysis data collection techniques are used. The decompositions are generated using a combination of similarity measures and are evaluated according to a complexity metric to answer the following research question: which collection of monolith data, static or dynamic analysis, allows to generate better decompositions? As result of the analysis we conclude that neither of the analysis techniques, static nor dynamic, outperforms the other, but the dynamic collection of data requires more effort.
Motivation & Objective
- To evaluate whether static or dynamic analysis yields better microservice decompositions during monolith migration.
- To assess the impact of data collection techniques—static code analysis versus runtime behavior observation—on decomposition quality.
- To compare similarity measures and complexity metrics in generating candidate microservices from monoliths.
- To provide publicly available data and configurable tools for future research on microservice migration.
Proposed method
- The study uses a formal model of monoliths as triples (F, E, G), representing functionalities, domain entities, and call graphs.
- It applies three similarity measures—access, read-write, and sequence similarity—to quantify coupling between domain entities based on shared functionality access.
- Decompositions are generated using clustering algorithms applied to similarity matrices derived from static or dynamic data.
- Complexity metrics evaluate decompositions by measuring transaction distribution and interaction overhead.
- Dynamic data is collected via runtime instrumentation, while static data is extracted from source code using static analysis.
- The approach compares decompositions against expert-defined boundaries and evaluates coverage and quality using quantitative metrics.
Experimental results
Research questions
- RQ1Which data collection technique—static or dynamic analysis—produces better microservice decompositions in terms of complexity and quality?
- RQ2How do different similarity measures (access, read-write, sequence) affect the quality of generated decompositions?
- RQ3What is the trade-off between effort and coverage in dynamic versus static data collection for microservice boundary identification?
- RQ4Can dynamic analysis data, despite higher effort, lead to more accurate decompositions than static analysis?
Key findings
- Neither static nor dynamic analysis consistently outperforms the other in generating high-quality microservice decompositions.
- Dynamic analysis required significantly more effort and resulted in lower data coverage compared to static analysis.
- The complexity of decompositions generated by both techniques was comparable, indicating similar performance in minimizing distributed transactions.
- The study found that dynamic analysis data collection is less efficient due to higher resource consumption and incomplete coverage.
- The authors provide publicly available dynamic analysis data and configurable data collectors to support future research.
- The results suggest a higher cost-benefit ratio for static analysis despite similar decomposition quality.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.