Open Access

Methodology for Decomposing a Legacy Monolith into a Microservice Architecture on Python with Preservation of Backward Compatibility and Managed Data Migration

4 The leading developer of server solutions, Start LLC.Ru" Pyatigorsk, Russian Federation

Abstract

The migration of large-scale legacy monolithic systems to microservice architecture remains one of the pressing challenges in modern software engineering. This article examines methodological approaches to decomposing a Python-based monolith into an ecosystem of independently deployed microservices while preserving backward compatibility and ensuring controlled, non-disruptive data migration. The study is based on systematic analysis of peer-reviewed academic literature, industrial case studies, and the practical project experience of the author, including the transformation of a Python backend system that resulted in test coverage growth from 27% to 95% and database update acceleration by a factor of eighteen. The research identifies the Strangler Fig pattern combined with Domain-Driven Design (DDD) as the most evidence-supported decomposition strategy, proposes a six-stage migration roadmap incorporating dual-write data synchronization and API versioning, and formulates a risk matrix specific to Python ecosystems. The article contributes an original migration methodology that bridges the existing gap between theoretical decomposition frameworks and practical Python toolchain implementation. The results are of interest to software architects, backend engineers, and engineering managers engaged in system modernization projects.

Keywords

References

Abgaz, Y., McCarren, A., Elger, P., Solan, D., Lapuz, N., Bivol, M., Jackson, G., Yilmaz, M., Buckley, J., & Clarke, P. (2023). Decomposition of monolith applications into microservices architectures: A systematic review. IEEE Transactions on Software Engineering, 49(8), 4213–4242. https://doi.org/10.1109/TSE.2023.3287297
Almeida, N. R., Campos, G. N., Moraes, F. R., & Affonso, F. J. (2024). Modernization of legacy systems to microservice architecture: A tertiary study. In Proceedings of the 26th International Conference on Enterprise Information Systems (ICEIS 2024), Vol. 2, 581–592. SCITEPRESS. https://doi.org/10.5220/0012633300003690
Grand View Research. (n.d.). Cloud microservices market size, industry report, 2033. Retrieved from: https://www.grandviewresearch.com/industry-analysis/cloud-microservices-market-report (date accessed: March 18, 2026).
Fritzsch, J., Bogner, J., Haug, M., Wagner, S., & Zimmermann, A. (2024). Towards an architecture-centric methodology for migrating to microservices. In P. Kruchten & P. Gregory (Eds.), Agile Processes in Software Engineering and Extreme Programming – Workshops (Lecture Notes in Business Information Processing, Vol. 489, pp. 39–47). Springer. https://doi.org/10.1007/978-3-031-48550-3_5
Martínez Saucedo, A., Rodríguez, G., Gomes Rocha, F., & Pereira dos Santos, R. (2025). Migration of monolithic systems to microservices: A systematic mapping study. Information and Software Technology, 177, Article 107590. https://doi.org/10.1016/j.infsof.2024.107590
Percival, H., & Gregory, B. (2020). Architecture patterns with Python: Enabling test-driven development, domain-driven design, and event-driven microservices. O’Reilly Media.
Eldenk, D., & Çetin, H. A. (2025). Incidents during microservice decomposition: A case study. In Proceedings of the 29th International Conference on Evaluation and Assessment in Software Engineering (EASE ’25), 805–808. ACM. https://doi.org/10.1145/3756681.3757005
Matias, T., Correia, F. F., Fritzsch, J., Bogner, J., Ferreira, H. S., & Restivo, A. (2020). Determining microservice boundaries: A case study using static and dynamic software analysis. In A. Jansen, I. Malavolta, H. Muccini, I. Ozkaya, & O. Zimmermann (Eds.), Software Architecture: 14th European Conference, ECSA 2020 (Lecture Notes in Computer Science, Vol. 12292, pp. 315–332). Springer. https://doi.org/10.1007/978-3-030-58923-3_21
Velepucha, V., & Flores, P. (2021). Monoliths to microservices: Migration problems and challenges: A SMS. In 2021 Second International Conference on Information Systems and Software Technologies (ICI2ST), 135–142. IEEE. https://doi.org/10.1109/ICI2ST51859.2021.00027
Zhou, X., Li, S., Cao, L., Zhang, H., Jia, Z., Zhong, C., Shan, Z., & Babar, M. A. (2023). Revisiting the practices and pains of microservice architecture in reality: An industrial inquiry. Journal of Systems and Software, 195, Article 111521. https://doi.org/10.1016/j.jss.2022.111521
Lercher, A., Glock, J., Macho, C., & Pinzger, M. (2024). Microservice API evolution in practice: A study on strategies and challenges. Journal of Systems and Software, 215, Article 112110. https://doi.org/10.1016/j.jss.2024.112110
Gonçalves, N., Faustino, D., Silva, A. R., & Portela, M. (2021). Monolith modularization towards microservices: Refactoring and performance trade-offs. In 2021 IEEE 18th International Conference on Software Architecture Companion (ICSA-C), 54–61. IEEE. https://doi.org/10.1109/ICSA-C52384.2021.00015
Gartner Peer Community. (2023). Microservices architecture: Have engineering organizations found success?Retrieved from: https://www.gartner.com/peer-community/oneminuteinsights/omi-microservices-architecture-have-engineering-organizations-found-success-u6b (date accessed: April 24, 2026).
SQLAlchemy Project. (n.d.). Tutorial — Alembic documentation. Retrieved from: https://alembic.sqlalchemy.org/en/latest/tutorial.html (date accessed: May 12, 2026).
Confluent Developer. (n.d.). Strangler Fig. Retrieved from: https://developer.confluent.io/patterns/compositional-patterns/strangler-fig/ (date accessed: June 6, 2026).
Laigner, R., Zhou, Y., Vaz Salles, M. A., Liu, Y., & Kalinowski, M. (2021). Data management in microservices: State of the practice, challenges, and research directions. Proceedings of the VLDB Endowment, 14(13), 3348–3361. https://doi.org/10.14778/3484224.3484232
Su, R., & Li, X. (2024). Modular monolith: Is this the trend in software architecture? In Proceedings of the 1st International Workshop on New Trends in Software Architecture (SATrends ’24), 10–13. ACM. https://doi.org/10.1145/3643657.3643911
Bushong, V., Abdelfattah, A. S., Maruf, A. A., Das, D., Lehman, A., Jaroszewski, E., Coffey, M., & Cerny, T. (2021). On microservice analysis and architecture evolution: A systematic mapping study. Applied Sciences, 11(17), Article 7856. https://doi.org/10.3390/app11177856

Similar Articles

11-20 of 77

You may also start an advanced similarity search for this article.