Identifying and Mining Microservice Applications:From Characteristics to Metrics
Microservices have become one of the dominant architectural styles in modern software development. However, identifying whether existing projects follow a microservice architecture remains a challenge, as most repositories lack explicit architectural documentation. Moreover, gathering a corpus of such applications is a challenge faced by researchers in the field. This work addresses these challenges by systematically collecting microservice characteristics from the literature and translating them into 10 measurable metrics at the repository level. Based on these metrics, we propose a transparent, rule-based algorithm for classifying codebases according to their architectural style. The approach is implemented in an open tool that enables large-scale identification of microservice-based repositories and supports the creation of reproducible research corpora. The evaluation is conducted using multiple publicly available datasets of software repositories with distinct roles. A primary dataset of microservice-based systems is partitioned into training/tuning (70%) and testing (30%) subsets. Additional datasets are used to support training—by providing both microservice and monolith examples—and to perform independent, out-of-sample testing on repositories drawn from separate curated sources. This setup enables evaluation across heterogeneous datasets while preventing data leakage between training and testing phases. On the held-out testing dataset (Phase~2), comprising 146 repositories (113 microservice-based and 33 monolith), the proposed approach achieves a precision of 96% in identifying microservice-based systems. We further compare the metric-based classification with an LLM-assisted approach, observing that architectural metrics yield more consistent and structurally grounded classifications, whereas LLM judgments are more sensitive to documentation quality and contextual ambiguity.