Microservices by Optimization and Experience: Lessons from a Large-Scale Industrial Migration
The modernization of legacy monolithic systems to microservices architectures promises benefits such as scalability, maintainability, and faster evolution. However, migrating large-scale industrial systems remains a challenging task. Existing research on automated or semi-automated decomposition primarily evaluates small-scale applications, neglecting the complexity of systems with extensive database schemas, and thus provides limited evidence on real-world adoption. This paper reports an industrial case study on migrating a large public administration system with over 15,000 classes and 2,300 database tables from a monolithic architecture to microservices. The case study focuses on the initial stages of the migration process, in which the boundaries of the microservices are defined. The migration follows a structured roadmap, using toMicroservices to decompose the legacy system and generate candidate microservice architectures. toMicroservices is an optimization-based approach guided by five criteria: coupling, cohesion, feature modularization, reusability, and network overhead. Candidate architectures were assessed both quantitatively and qualitatively through questionnaires and focus groups with senior practitioners. The results show that the optimization approach produced technically consistent decompositions but inherited modularization deficiencies from the legacy system, leading to fragmented and interdependent services. Practitioners valued the conceptual insights and systematic alternatives provided by the approach but emphasized the need for manual refinement to achieve domain alignment and service autonomy. Our findings highlight that optimization-based approaches are best used as decision-support mechanisms rather than final solutions, complementing expert-driven architecture design instead of replacing it. This implies that practitioner expertise and business-driven adjustments remain necessary to ensure feasible and sustainable microservice architectures.