Skip to main page content
U.S. flag

An official website of the United States government

Dot gov

The .gov means it’s official.
Federal government websites often end in .gov or .mil. Before sharing sensitive information, make sure you’re on a federal government site.

Https

The site is secure.
The https:// ensures that you are connecting to the official website and that any information you provide is encrypted and transmitted securely.

Access keys NCBI Homepage MyNCBI Homepage Main Content Main Navigation
. 2021 Sep 8:7:e695.
doi: 10.7717/peerj-cs.695. eCollection 2021.

Defining and measuring microservice granularity-a literature overview

Affiliations

Defining and measuring microservice granularity-a literature overview

Fredy H Vera-Rivera et al. PeerJ Comput Sci. .

Abstract

Background: Microservices are an architectural approach of growing use, and the optimal granularity of a microservice directly affects the application's quality attributes and usage of computational resources. Determining microservice granularity is an open research topic.

Methodology: We conducted a systematic literature review to analyze literature that addresses the definition of microservice granularity. We searched in IEEE Xplore, ACM Digital Library and Scopus. The research questions were: Which approaches have been proposed to define microservice granularity and determine the microservices' size? Which metrics are used to evaluate microservice granularity? Which quality attributes are addressed when researching microservice granularity?

Results: We found 326 papers and selected 29 after applying inclusion and exclusion criteria. The quality attributes most often addressed are runtime properties (e.g., scalability and performance), not development properties (e.g., maintainability). Most proposed metrics were about the product, both static (coupling, cohesion, complexity, source code) and runtime (performance, and usage of computational resources), and a few were about the development team and process. The most used techniques for defining microservices granularity were machine learning (clustering), semantic similarity, genetic programming, and domain engineering. Most papers were concerned with migration from monoliths to microservices; and a few addressed green-field development, but none address improvement of granularity in existing microservice-based systems.

Conclusions: Methodologically speaking, microservice granularity research is at a Wild West stage: no standard definition, no clear development-operation trade-offs, and scarce conceptual reuse (e.g., few methods seem applicable or replicable in projects other than their initial proposal). These gaps in granularity research offer clear options to investigate on continuous improvement of the development and operation of microservice-based systems.

Keywords: Metrics; Micro service architecture; Micro-service granularity; Microservices decomposition; Monolith to microservices; Quality attributtes; Service computing; Sistematic literature review.

PubMed Disclaimer

Conflict of interest statement

The authors declare that they have no competing interests.

Figures

Figure 1
Figure 1. Systematic literature review method.
Figure 2
Figure 2. Infographic summary of approaches to defining microservice granularity.
Figure 3
Figure 3. Amount of papers by development process phase.
Figure 4
Figure 4. Number of papers by research strategy.
Figure 5
Figure 5. Number of papers by contribution type.
Figure 6
Figure 6. Number of papers by validation approach.
Figure 7
Figure 7. Type of techniques used in the selected papers.
Multiple techniques may be used by one paper. Some papers used specific techniques, these techniques were not included.
Figure 8
Figure 8. Amount of metrics per metric type.
Figure 9
Figure 9. Amount of papers per addressed quality attributes and year.

References

    1. Abdullah M, Iqbal W, Erradi A. Unsupervised learning approach for web application auto-decomposition into microservices. Journal of Systems and Software. 2019;151(3):243–257. doi: 10.1016/j.jss.2019.02.031. - DOI
    1. Ahmadvand M, Ibrahim A. Requirements reconciliation for scalable and secure microservice (de)composition. 2016 IEEE 24th International Requirements Engineering Conference Workshops (REW); IEEE; 2016. pp. 68–73.
    1. Al-Debagy O, Martinek P. A new decomposition method for designing microservices. Periodica Polytechnica Electrical Engineering and Computer Science. 2019;63:274–281. doi: 10.3311/PPee.13925. - DOI
    1. Al-Debagy O, Martinek P. Extracting microservices’ candidates from monolithic applications: interface analysis and evaluation metrics approach. 2020 IEEE 15th International Conference of System of Systems Engineering (SoSE); IEEE; 2020. pp. 289–294.
    1. Alipour H, Liu Y. Online machine learning for cloud resource provisioning of microservice backend systems. 2017 IEEE International Conference on Big Data (Big Data). IEEE; 2017. pp. 2433–2441.

LinkOut - more resources