Can Large Language Models Replace Classical Approaches for Microservice Decomposition? An Empirical Comparison of Quality, Stability, and Cost

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.

Authors

Institutions

Publication Details

Journal
Research Square
Published
2026-12-01
DOI
https://doi.org/10.21203/rs.3.rs-11584923/v1
Primary Topic
Software Engineering Research
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
NOV
preprint

Can Large Language Models Replace Classical Approaches for Microservice Decomposition? An Empirical Comparison of Quality, Stability, and Cost

Iman EL KODSSI, NASSIMA AITMANSOUR
Research Square
Software Engineering Research
preprint

Can Large Language Models Replace Classical Approaches for Microservice Decomposition? An Empirical Comparison of Quality, Stability, and Cost

Iman EL KODSSI, NASSIMA AITMANSOUR
preprint en

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.

Research Square
Université Hassan II Mohammedia (MA)
Software Engineering Research
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.

Laika access coming soon