Can Large Language Models Replace Classical Approaches for Microservice Decomposition? An Empirical Comparison of Quality, Stability, and Cost
Year: 2026
Type: preprint
Abstract: Decomposing a monolithic application into microservices is the most difficult step of a microservice migration. Large language models (LLMs) are increasingly used by practitioners to propose service boundaries directly from source code, yet it remains unclear whether their decompositions match those of established approaches, whether they are stable across repeated executions, and at what cost. This paper reports an empirical study comparing large language models with five classical decomposition approaches on the four benchmark systems most widely used in the literature. All decompositions are evaluated with a unified metric pipeline covering structural modularity, inter-service communication, interface size, and size distribution, complemented by run-to-run stability and response time. Statistical comparisons rely on non-parametric tests and effect sizes. Nemotron achieves a mean SM of 0.128, compared with 0.013--0.210 for the classical approaches, and ranks competitively among all evaluated techniques while maintaining substantially lower inter-service communication overhead. Repeated runs of the same configuration agree only partially, exhibiting a mean Adjusted Rand Index (ARI) of 0.49 at the lowest temperature and 0.38 at the default temperature. Furthermore, 87.5\% of the outputs are valid at the first attempt (reaching 100\% after an automated repair step), and input tokens grow from 1,420 to 4,890 as the application size grows from 26 to 74 classes, with mean response latencies under 12 seconds. Based on these findings, we derive practical guidelines for architects and identify recurrent failure modes of LLM-generated decompositions. All prompts, model outputs, and evaluation scripts are publicly released.
Source: Research Square
Authors: NASSIMA AITMANSOUR, Iman EL KODSSI
Institution: Université Hassan II Mohammedia
Language: English
Subfield: Information Systems
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7242019239
Cites:
Cited by:
Related to:
