October 19, 2026
Transition from Monolithic Application to Microservices and its Architectural Impacts
Transition from Monolithic Application to Microservices and Its Architectural Impacts
Rafael Carvalho Palomo Fernandes; Ariel da Silva Dias
DOI: 10.22167/2675-6528-202601323
Article prepared by the ResumeAI tool, an artificial intelligence solution developed by the Pecege Institute focused on synthesis and writing.
Summary
The growing demand for scalable and easily maintainable systems has driven research into the impacts of transitioning from monolithic architectures to microservices. The study aimed to implement a digital wallet and payments application, initially monolithic, and subsequently migrate it to a microservices architecture, comparing them in terms of performance, scalability, resilience, maintainability, and operational complexity. The research, applied in nature with a mixed approach, was conducted through an experimental case study in a containerized environment, using the k6 tool for load testing and resource usage metrics extracted via Docker stats. The results indicated that the monolithic architecture presented lower latency and higher *throughput* under moderate load, but with a higher error rate in failure scenarios. In contrast, the microservices architecture demonstrated greater fault isolation capability and incremental scalability gains through the replication of critical services, albeit with higher latency and variability under failure. The maintainability of localized changes was similar, but cross-cutting changes were simpler in the monolith. The operational complexity of microservices proved significantly higher for the evaluated application size. It was concluded that the architectural choice should consider the specific project context, weighing the *trade-offs* between performance, resilience, and complexity, without there being a universally superior architecture.
Keywords: Digital wallet; Operational complexity; Performance; Maintainability; Distributed systems.
1. Introduction
Software engineering has witnessed continuous evolution, driven by the relentless pursuit of more flexible, scalable, and maintainable systems. In this dynamic scenario, microservices architecture has emerged as a prominent paradigm, challenging the traditional monolithic application model (Newman, 2022). The demand for solutions that can rapidly adapt to market changes and support increasing workloads is a constant in modern software development. Recent data from the financial sector, for example, demonstrate the explosion in the use of digital wallets and electronic payment systems, with significant annual growth projections, requiring robust and highly available IT infrastructures. An application’s ability to handle millions of simultaneous transactions and ensure data integrity is crucial, making architectural choice a determining factor for the success of digital businesses (Gaol et al., 2023). The transition from legacy monolithic systems to distributed approaches, such as microservices, is therefore a strategy adopted by many organizations to meet these demands, although it presents inherent challenges due to its complexity (Waseem et al., 2021).
Historically, monolithic applications represent an architectural model where all software components, including user interface, business logic, and data access layer, are packaged into a single deployment unit. This approach offers initial simplicity in development and deployment for smaller projects and reduced teams, facilitating debugging and testing in a unified environment. However, as applications grow in functionality and complexity, monoliths can become difficult to scale, maintain, and evolve. Introducing new features or fixing bugs in a small part of the system often requires re-implementing and redeploying the entire application, increasing the risk of failures and downtime. In contrast, the microservices architecture proposes decomposing an application into a set of small, autonomous, and loosely coupled services, each running a single process and communicating through well-defined interfaces, typically REST APIs (Newman, 2020). Each microservice can be developed, deployed, and scaled independently, utilizing heterogeneous technologies and having its own database. This intrinsic modularity promotes development agility, independent scaling of specific components, and fault isolation, where the failure of one service does not necessarily compromise the operation of the entire system (Hannousse & Yahiouche, 2021).
Migrating from a monolithic architecture to microservices is a strategic process that aims to capitalize on the advantages of modularity and scalability, but it is not without significant challenges. The decision to transition implies a careful evaluation of the *trade-offs* involved, as operational complexity, inter-service communication latency, and the need for robust monitoring and orchestration tools increase considerably (Waseem et al., 2021). For organizations operating legacy systems, architectural modernization is often seen as a way to unlock innovation and optimize the user experience. However, a lack of understanding about the practical impacts of this transition can lead to unexpected costs and performance below expectations. For example, communication between microservices introduces network *overhead* that can impact latency, and managing multiple services requires an operational maturity that not all teams possess (Lu et al., 2024). The relevance of empirical studies comparing these architectures in controlled scenarios is fundamental to providing clear guidelines and grounding architectural decisions in concrete data, especially in critical domains like finance, where performance and reliability are paramount.
Given this panorama, the present research is justified by the need to provide empirical evidence on the impacts of transitioning from monolithic architectures to microservices, contributing to the literature and assisting professionals and organizations in making informed architectural decisions. The study seeks to fill a gap by offering a practical and measurable comparative analysis, focused on software quality attributes. Thus, the general objective of this work was to implement a digital wallet and payments application, initially monolithic, and subsequently migrate it to a microservices architecture, comparing them in terms of performance, scalability, resilience, maintainability, and operational complexity, in order to identify practical benefits and challenges associated with this transformation.
2. Material and Methods
This research was characterized as a study of an applied nature, with the purpose of generating practical and applicable knowledge in the area of software engineering. A mixed methodological approach was adopted, combining quantitative and qualitative elements for a comprehensive understanding of the investigated phenomena. The descriptive nature of the study allowed for the observation and detailed recording of the characteristics and behaviors of the software architectures under analysis. The investigation was conducted through an experimental case study, developed entirely by the researcher himself, in a controlled environment to ensure the validity of the experiments.
The study was conducted in a controlled development environment, configured based on Docker containers, without any link to production systems or specific enterprise environments. This configuration aimed to isolate variables and allow the observed differences to be primarily attributed to architectural decisions. The unit of analysis consisted of a digital wallet and payments application, developed in two distinct versions: a monolithic one and another based on microservices. The execution period of the experiments was not explicitly detailed in the original TCC, but the research was completed to obtain the degree in 2026.
The central methodological objective was to apply software engineering concepts to compare monolithic and microservices architectures in a practical and realistic context. The aim was to observe the technical and operational impacts of each approach in a constant functional domain, using the same technological stack and execution environment. To this end, a financial sector application domain was defined, specifying a digital wallet with essential functionalities, such as user registration, balance management, transfers, transaction history, and notifications, which were implemented identically in both architectures.
For data collection, several instruments and techniques were employed. The k6 tool was used for executing load and stress tests, allowing the acquisition of performance metrics. The use of computational resources, such as CPU, memory, disk, and network, was monitored and extracted directly from the containerized environment via Docker stats. Quantitative metrics were consolidated in spreadsheets, recording the maximum observed values. Additionally, technical documentation and qualitative analyses were used to assess the maintainability and operational complexity of the architectures.
The research was structured in sequential steps, starting with a comprehensive literature review on monolithic and microservices architectures, inter-service communication, scalability, resilience, and maintainability. This stage provided the theoretical foundation for the adopted comparison criteria. Subsequently, the detailed definition of the digital wallet application domain and functional requirements was carried out, establishing the functionalities that would be implemented and tested in both architectures.
The first stage of research execution involved the initial development of the digital wallet application in a monolithic architecture. This implementation was characterized by a single source code, a centralized database, and a modular internal organization. The monolithic application was then containerized, using Docker, to ensure its execution in a standardized and controlled environment. This phase established the functional basis and the starting point for comparison, ensuring that the initial application was ready to be submitted to tests and subsequently refactored.
Subsequently, the monolithic application was refactored into a microservices-based architecture. In this model, responsibilities were separated into independent services, such as user, transaction, wallet, and notification services. Communication between these services was established through REST APIs, and each microservice had its own database. The orchestration and management of the multiple services were carried out using Docker Compose, allowing for the deployment and coordinated execution of all components of the distributed architecture.
The planning and execution of the experiments were conducted to meet the established research requirements, which included the evaluation of performance, scalability, resilience, maintainability, and operational complexity. Controlled tests covered load and stress scenarios, variation in the number of service replicas in the microservices architecture, and fault injection in non-critical components. To increase the reliability of the results, each experimental scenario was executed three times independently, maintaining the same load, environment, and infrastructure configuration conditions.
The collection and consolidation of quantitative metrics occurred systematically after the execution of each experimental scenario. Performance metrics such as 95th percentile latency (p95), throughput, and error rate, extracted from reports generated by the k6 tool, were recorded. Additionally, computational resource usage data, including CPU, memory, disk, and network, obtained through monitoring the containerized environment, were collected. This data was fundamental for the comparative analysis of the two architectures’ behavior under different load and failure conditions.
In addition to quantitative metrics, qualitative data were collected to evaluate aspects such as maintainability and operational complexity. Maintainability and evolvability were analyzed through change scenarios, documenting the impact of localized and cross-cutting changes on the source code and system structure. Operational complexity was assessed considering infrastructure costs, deployment, monitoring, and debugging, based on direct observations and technical documentation. These analyses provided insights into the practical challenges and non-directly measurable benefits of each architecture.
The treatment and analysis of the collected data were carried out on two fronts. For the quantitative data, the average values of the metrics obtained in each of the three independent runs per scenario were calculated. The standard deviation was also calculated to assess the variability of the results and mitigate the impact of punctual fluctuations in the execution environment. The qualitative data, in turn, were interpreted in light of the reviewed literature, relating the empirical findings to the formulated hypotheses and highlighting the benefits, limitations, and trade-offs of each architecture, without anticipating specific results.
The methodological limitations of the study were recognized and documented. The results obtained refer to a specific case study, with a controlled functional domain and complexity. Statistical generalization of the findings to a larger population of systems or contexts was not intended. Instead, the research sought to generate empirical evidence and technical insights that could be applicable to similar contexts, serving as a basis for future investigations and architectural decisions in analogous scenarios, but not as a universal truth.
The main threats to internal validity included uncontrolled factors of the execution environment, such as host operating system load variations, container warm-up effects, and resource contention. Although the containerized environment aided in isolation, the absence of a dedicated cloud environment and multiple runs with statistical variance analysis limited the precision of the measurements. Regarding external validity, execution in a local Docker environment with limited resources and a single functional domain of moderate complexity restricted generalization to larger-scale systems or production environments.
Regarding construct validity, the performance metrics used are widely accepted in the literature. However, resource consumption data (CPU and memory) were recorded as absolute peaks, without normalization by the number of cores or processed requests, which may hinder direct comparisons. The reliability of the results was increased by repeated execution of the experimental scenarios (three repetitions per scenario), with calculation of mean and standard deviation. However, the number of repetitions was limited, not being sufficient for more robust statistical analyses, such as confidence intervals with a high degree of precision.
3. Results and Discussion
The results presented in this section detail the comparative analysis between monolithic and microservices architectures, as implemented in a digital wallet and payments application. The experiments were conducted in a containerized environment, focusing on the attributes of performance, scalability, resilience, maintainability, and operational complexity, following the previously established methodology. Quantitative data represent the average of three independent runs for each scenario, accompanied by the standard deviation to assess stability and mitigate environmental fluctuations. Performance metrics (p95 latency, throughput, error rate) were extracted from the k6 tool, while computational resource consumption (CPU, memory, disk, and network) was monitored via Docker stats. Complementarily, qualitative analyses provided insights into maintainability and operational complexity.
Performance under normal load (RQ1)
Load tests under normal operating conditions, designed to simulate the everyday use of the digital wallet application, revealed distinct performance patterns for the monolithic and microservices architectures. Essential functionalities, such as user creation, deposits, transfers, and balance inquiries, were subjected to a volume of requests that falls within a moderate load scenario. The analysis of metrics collected in three independent runs, with their respective average values and standard deviations, offers a detailed view of each architecture’s behavior.
As presented in Table 1, the microservices architecture demonstrated a p95 percentile latency of 8.88 ms (± 0.76), significantly lower than the 12.75 ms (± 1.52) latency observed in the monolithic architecture. This finding partially contradicts hypothesis H1, which postulated superior performance of the monolith under low to moderate loads due to lower communication and coordination overhead. A plausible explanation for this unexpected behavior lies in the efficient distribution of responsibilities among services in the microservices architecture. In a low concurrency scenario, modularization may have allowed requests to be processed by lighter, specialized components, reducing contention for resources that could occur in a monolith, even if internally well-modularized. The inter-service communication overhead, often cited as a factor increasing latency in distributed systems (Newman, 2020), may not have been prominent enough in this controlled environment with a specific load profile to negate the benefits of parallelization and specialization of microservices.
Table 1. Performance under normal load (RQ1) – Comparison of performance under normal load (p95 and resource peaks)
|
Metric |
Monolith (mean ± standard deviation) |
Microservices (mean ± standard deviation) |
Source |
|
P95 latency (ms) |
12,75 ± 1,52 |
8,88 ± 0,76 |
k6 HTML report |
|
Request processing rate (req/s) |
8,79 ± 0,01 |
8,79 ± 0,01 |
k6 HTML report |
|
Error rate (%) |
0,00 ± 0,00 |
0,00 ± 0,00 |
k6 HTML report |
|
CPU peak (%) – most demanded container |
7.67 ± 2.19 (finance-monolith) |
4.87 ± 1.41 (transaction-service) |
Docker stats |
|
Peak memory (MB) – most demanded container |
106.00 ± 2.04 (finance-monolith) |
42.43 ± 2.07 (transaction-service) |
Docker stats |
Source: Original research results
Regarding throughput, both architectures presented equivalent values, with 8.79 req/s (± 0.01), and neither registered an error rate. The equivalence in throughput suggests that, under normal load, the system bottleneck was not primarily in the processing capacity of the architecture itself, but possibly in other factors, such as the execution environment’s capacity or the test’s own load injection rate. This result indicates that, for a volume of requests that does not exceed the processing capacity of a single node, the monolith’s advantage in terms of direct internal communication does not necessarily translate into superior throughput.
Regarding the consumption of computational resources, the microservices architecture exhibited a peak CPU utilization of 4.87% (± 1.41) and a peak memory of 42.43 MB (± 2.07) for the transactions service, which was the most demanded. In contrast, the monolith presented a peak CPU consumption of 7.67% (± 2.19) and a peak memory of 106.00 MB (± 2.04) for the main container. The difference is notable, with microservices consuming significantly fewer resources. This finding corroborates the literature that points to resource efficiency as a benefit of microservices, where smaller, more specialized components can be optimized to consume only what is necessary (Waseem et al., 2021). The ability to isolate and optimize resource consumption per service is an intrinsic advantage that can lead to substantial savings in cloud environments, where cost is often tied to resource usage. The lower memory and CPU footprint of the transactions service in microservices, compared to the complete monolith, demonstrates the granularity in resource management that this architecture allows.
The low variability observed in throughput and latency metrics for both architectures, indicated by low standard deviations, suggests considerable stability of the results under normal load conditions. This increases the reliability of the measurements and reinforces that the observed differences are attributable to architectural characteristics, rather than random environmental fluctuations. In terms of practical implications, these results suggest that, for moderately sized applications under normal load, the microservices architecture may not only be comparable but even superior to the monolith in terms of latency and resource efficiency. This challenges the common perception that monoliths are always more performant under low load scenarios due to the absence of network communication between components. The architectural decision, therefore, should consider not only the load profile but also the granularity of the service design and the optimization of the execution environment.
Scalability under high load (RQ2)
The stress and scalability tests (RQ2) were designed to evaluate the architectures’ capacity to handle high loads, specifically focusing on the behavior of the transaction service, identified as a critical component. The variation in the number of transaction service replicas in the microservices architecture was the main factor investigated, comparing configurations with one and three replicas, while the other experiment parameters were kept constant.
As shown in Table 2, replicating the transaction service in the microservices architecture resulted in consistent performance gains, validating hypothesis H2. The average throughput increased from 27.22 req/s (± 0.61) with one replica to 31.06 req/s (± 2.78) with three replicas. This increase clearly demonstrates the horizontal scalability capability of microservices, allowing the system to process a larger volume of requests by distributing the load among multiple instances of the critical service. The literature corroborates that horizontal scalability is one of the pillars of microservices, enabling the elastic addition of computational resources to meet demand peaks (Hannousse & Yahiouche, 2021).
Table 2. Scalability (RQ2) – Scalability of microservices with replica variation
|
Service |
Replicas |
P95 latency (ms) |
Processing rate (requests/second) |
CPU Peak (%) |
Peak memory (MB) |
Error rate (%) |
Source |
|
Transactional service |
1 |
358,33 ± 77,21 |
27,22 ± 0,61 |
22,01 ± 10,75 |
60,17 ± 7,11 |
0,08 ± 0,06 |
k6 HTML report and Docker stats |
|
Transactional service |
3 |
218,74 ± 141,11 |
31,06 ± 2,78 |
8,65 ± 2,98 |
50,48 ± 0,69 |
0,00 ± 0,00 |
k6 HTML report and Docker stats |
Source: Original research results
Simultaneously, the p95 percentile latency was significantly reduced from 358.33 ms (± 77.21) to 218.74 ms (± 141.11). The decrease in latency under high load, along with the increase in throughput, is a robust indicator of the replication strategy’s effectiveness. Load distribution among replicas alleviates pressure on a single instance, allowing each to process requests more quickly. Furthermore, the error rate was completely eliminated, dropping from 0.08% (± 0.06) with one replica to 0.00% (± 0.00) with three replicas. This is a crucial result, as it demonstrates that horizontal scaling not only improves performance but also enhances the system’s functional stability and reliability under stress, preventing failures that could occur due to the overload of a single instance.
In terms of resource consumption per instance, a reduction was observed in the average use of CPU (from 22.01% ± 10.75 to 8.65% ± 2.98) and memory (from 60.17 MB ± 7.11 to 50.48 MB ± 0.69) for the transaction service. This reduction per instance is a direct benefit of load distribution: each replica individually has less work to do, which translates into more efficient use of its resources. This reinforces the idea that microservices allow for granular resource optimization, scaling only the components that truly need it, in contrast to the vertical scalability of a monolith that would require increasing resources for the entire application.
Despite the evident gains, the increase in the standard deviation of latency in the scenario with three replicas (from ± 77.21 to ± 141.11) deserves attention. This greater variability in responses can be attributed to factors inherent in distributed systems, such as load balancing among replicas, communication latency between containers, and resource contention in the shared environment. Although horizontal scalability improves overall performance and resilience, it introduces operational complexities that can manifest as greater unpredictability in individual request latencies. Newman (2020) discusses these trade-offs, where the pursuit of scalability and resilience often comes with challenges in performance consistency and management complexity.
The practical implications of these results are significant for the design of systems that require high scalability. The microservices architecture, by allowing selective replication of critical services, offers a robust solution for handling demand peaks and ensuring service continuity. For financial applications, where transaction volume can vary drastically, the ability to horizontally scale the transaction service is a competitive differentiator. However, managing the increased latency variability and the operational complexity associated with load balancing and monitoring of multiple replicated components are challenges that development and operations teams must be prepared to face. The choice of microservices for scalability must be accompanied by a mature orchestration and monitoring infrastructure.
Resilience and fault isolation (RQ3)
The fault injection experiments were crucial to evaluate the robustness of the architectures in the face of non-critical component degradation, a fundamental aspect for systems requiring high availability. The objective was to observe how each architecture behaves when a part of the system fails, measuring the impact on latency (p95), throughput, and error rate.
The data collected in the fault injection scenario, which aimed to simulate the degradation of a non-critical component, revealed a clear trade-off between performance and fault tolerance, supporting hypothesis H3. The monolithic architecture, although it maintained a low average latency of 15.25 ms (± 0.65), presented a high error rate of 20.00% (± 0.00). This result is a strong indication that, in a monolith, the failure of a component, even if non-critical, can have a systemic impact, propagating errors throughout the application. The intrinsic interdependence of modules in a monolithic architecture means that a failure in one part can quickly compromise the functionality of other parts, leading to a widespread degradation of service (Newman, 2020). The monolith’s throughput under failure was 22.28 req/s (± 0.12), which, while not insignificant, is accompanied by an unacceptable error rate for many applications.
In contrast, the microservices architecture, under the same failure conditions, presented a significant increase in latency, reaching 154.03 ms (± 100.65). However, this latency elevation was accompanied by a considerably lower error rate, of 9.09% (± 0.00), and a throughput of 15.44 req/s (± 0.69). The high standard deviation of latency in microservices suggests a more unstable response behavior, which can be explained by the activation of resilience mechanisms, such as retries, timeouts, and circuit breakers. These mechanisms, although increasing response time, are designed to isolate the failure, prevent its propagation, and allow the rest of the system to continue operating, even if in a degraded state. Waseem et al. (2021) highlight that the design of microservices, with its component independence, favors fault isolation, allowing the application to recover or degrade gracefully.
The lower error rate in microservices, despite higher latency, is the most compelling evidence of structural fault isolation. This means that while the monolith fails more abruptly and broadly, microservices can contain the problem, ensuring that a larger portion of requests are processed successfully, even if more slowly. For financial applications, where transaction integrity and service availability are critical, the ability to isolate failures is an invaluable benefit. A failure in a notification service, for example, should not prevent financial transactions from being completed successfully.
The practical implications of these results are profound for architectural choices in systems demanding high resilience. Although the monolith may offer lower latency under failure conditions, its propensity for widespread errors makes it less suitable for scenarios where fault tolerance is a priority. Microservices, on the other hand, sacrifice a certain degree of performance during a failure to preserve the system’s functional integrity, isolating the problem and allowing other parts of the application to continue operating. This “graceful degradation” capability is a crucial differentiator for systems that cannot afford a complete outage. The decision to adopt microservices for resilience implies accepting an increase in monitoring complexity and variable latency management, but it offers a significant return in terms of availability and robustness.
Maintainability and evolvability (RQ4)
The qualitative analysis of change scenarios, a fundamental aspect of maintainability and evolvability, revealed important nuances in the differences between monolithic and microservices architectures. This evaluation, which considered the impact of localized and cross-cutting changes, provided insights into hypothesis H4, which suggests that microservices favor the isolated evolution of functionalities, while the monolith simplifies global changes.
For localized changes in a single functional domain, such as altering internal calculation rules (e.g., a “rate rule”), the impact was similar in both architectures. The number of affected files and modules was equivalent (2-3 files/modules), resulting in a tie in terms of maintenance effort. This finding suggests that when a functionality is well encapsulated within a module in the monolith or within a service in the microservice, the underlying architecture has less influence on the cost of a change. Internal modularization of a monolith, if well executed, can offer similar benefits to microservices for isolated changes, as discussed by Gaol et al. (2023) when analyzing the impact of service design on maintainability.
However, the differences became more evident in cross-cutting changes, which involve multiple domains and shared entities. For a change like the inclusion of a “cross-cutting nickname field”, the monolith proved simpler to implement. The change affected approximately 10-12 files in the monolith, while in microservices, the impact was slightly greater, reaching about 12-14 files. The main reason for this difference lies in the existence of a single codebase and database in the monolith, which facilitates the coordination of changes that span different parts of the system. In a monolith, a change to a shared entity can be made in a single location, and dependencies are resolved within the same process.
In a microservices architecture, cross-cutting changes require coordination among multiple services, updates to API contracts, and adjustments in additional layers such as gateways or orchestrators. This increases implementation effort and the risk of introducing inconsistencies or integration failures. The addition of a new complex functionality, such as generating a “CSV statement”, also favored the monolith in terms of integration points. In the monolith, the functionality could be added as a new module or method, leveraging the existing codebase and direct data access. In microservices, the same functionality might require coordinating data from multiple services (users, transactions, wallets) and creating a new service or modifying several existing ones, increasing integration complexity. Newman (2020) details the challenges of managing dependencies and API contracts in microservices systems, especially during refactorings or the introduction of new functionalities that span multiple domains.
These results partially corroborate hypothesis H4. Microservices, in fact, favor the isolated evolution of functionalities, allowing independent teams to develop and deploy services without affecting the rest of the system. This is a significant benefit for organizations seeking agility and continuous delivery. However, the monolith offers greater simplicity for global or cross-cutting changes, where the cohesion of a single codebase and database reduces coordination overhead. The architectural choice, therefore, must consider the nature and expected frequency of changes. If the system foresees many localized and independent changes, microservices may be more advantageous. If changes tend to be cross-cutting and impact multiple domains, the monolith may present a lower maintenance cost, especially for smaller teams that benefit from the simplicity of a single repository and deployment process.
Operational complexity (RQ5)
The evaluation of operational complexity, one of the most critical research requirements, revealed substantial differences between architectures, supporting hypothesis H5 that microservices impose greater operational complexity on moderately sized applications. This analysis considered various aspects, from infrastructure and deployment to system monitoring and debugging.
A detailed structural comparison revealed that the microservices-based solution required a significantly larger number of components. While the monolith consisted of a single application service and a single database, the microservices architecture was decomposed into 6 distinct application services, each with its own database (totaling 4 database instances). This granularity resulted in a total of 15 containers for the microservices, in contrast to the 6 containers of the monolith (which included the application, the database, and possibly support services like a reverse proxy or cache). The orchestration of these multiple components was also reflected in the `docker-compose.yml` file, which for microservices was substantially more extensive (~280 lines) than for the monolith (~124 lines). This proliferation of components and the complexity of the orchestration file are direct indicators of increased infrastructure complexity.
Beyond component counting, operational complexity was assessed through a scorecard that scored criteria such as setup, deploy, monitoring, and debug on a scale of 0 to 5. In all criteria, the monolith presented a score of 1, indicating simplicity. The setup of a monolith is generally more straightforward, involving the configuration of a single execution environment and a database. Deployment is a single operation, and monitoring and debugging are centralized, facilitating problem identification and resolution.
In contrast, microservices obtained scores of 3 for setup, deploy, and monitoring, and 4 for debug. The setup of a microservices environment is inherently more complex, requiring the configuration of multiple services, databases, and the communication network between them. The deploy of microservices involves coordinating multiple independent deployments, which can be challenging without robust automation tools. Monitoring microservices is exponentially more complex, as it requires collecting and aggregating logs and performance metrics from dozens or hundreds of services, in addition to the observability of distributed interactions (Waseem et al., 2021). Debugging issues in a distributed system is notoriously difficult, as a request can pass through several services, each with its own log and state, making traceability a significant challenge (Newman, 2022).
These findings strongly corroborate the literature pointing to operational complexity as one of the main trade-offs of the microservices architecture. Hannousse and Yahiouche (2021) highlight that aspects such as distributed monitoring, configuration management, and deployment automation become essential and complex in this type of architecture. For the context of a moderately sized application and a small development and operations team, as implied in this case study, the additional complexity imposed by microservices is not fully compensated by the technical gains observed in other areas. The cognitive and operational cost of managing a distributed system can be prohibitive for organizations without the necessary resources, tools, and expertise.
The practical implications are clear: adopting microservices is not a trivial decision and must be accompanied by significant investment in automation, observability tools, and team training. For startups or small teams, the operational simplicity of a monolith can be a decisive factor, allowing them to focus on delivering business value rather than managing infrastructure complexity. While microservices offer benefits in scalability and resilience, these gains come with a substantial operational cost that must be carefully weighed against the specific project context and team capacity.
Final Considerations and General Implications
The results obtained in this experimental case study provide empirical evidence highlighting the differences and trade-offs between monolithic and microservices architectures in a practical digital wallet application context. The multifaceted analysis, encompassing performance, scalability, resilience, maintainability, and operational complexity, reinforces the premise that there is no universally superior architecture, and the choice should be guided by the specific requirements of the system and environment.
Regarding performance under normal load, microservices showed lower latency and lower resource consumption (CPU and memory) compared to the monolith, partially contradicting the initial hypothesis H1. This finding suggests that, in low concurrency scenarios and with a well-granular service design, the inter-service communication overhead may be less impactful than resource contention in a monolith. The practical implication is that, for applications with a moderate load profile, microservices can be a viable option, even offering resource efficiency advantages, which can translate into cost savings in cloud environments.
Regarding scalability under high load, the microservices architecture demonstrated consistent and significant gains. Replication of the transaction service resulted in increased throughput, reduced latency, and elimination of errors, validating hypothesis H2. This is one of the main benefits of microservices, allowing critical components to be scaled horizontally independently to handle demand peaks. For systems requiring high elasticity and the ability to handle variable request volumes, such as financial applications, the granular scalability of microservices is a crucial differentiator. However, the greater variability in latency observed with multiple replicas points to the need for robust load balancing and monitoring strategies in distributed environments.
In terms of resilience and fault isolation, the experiments showed a clear trade-off. The monolith maintained low latency under failure but exhibited a high error rate, indicating fault propagation throughout the system. In contrast, microservices, despite showing a significant increase in latency and greater variability, demonstrated a superior ability for fault isolation, resulting in a lower error rate and preserving the system’s functional integrity, supporting hypothesis H3. For mission-critical applications where fault tolerance is paramount, microservices offer a decisive advantage, allowing the system to continue operating, even in a degraded state, rather than failing completely.
Regarding maintainability and evolvability, the qualitative analysis revealed that microservices favor the isolated evolution of functionalities, while the monolith offers greater simplicity for cross-cutting changes, partially corroborating hypothesis H4. Localized changes had a similar impact on both architectures, but changes spanning multiple domains or shared entities were simpler in the monolith due to the cohesion of the source code and database. This suggests that the architectural choice should align with the nature and expected frequency of system changes. For systems with rapid and independent evolution of functionalities, microservices are advantageous; for systems with more integrated and cross-cutting changes, the monolith may be more efficient.
Finally, operational complexity was the attribute where differences were most pronounced. The results confirmed that the microservices architecture imposes a significantly higher cost in terms of infrastructure, configuration, deployment, monitoring, and debugging, validating hypothesis H5. The increase in the number of services, databases, and containers, along with orchestration complexity and debugging difficulty in a distributed environment, represent a substantial challenge for teams and limited resources. For moderately sized applications and smaller teams, the operational simplicity of the monolith may outweigh the technical benefits of microservices.
In summary, the decision between monolithic and microservices architectures is multifaceted and should be guided by a careful evaluation of business and technical requirements, as well as team and organizational capabilities. Monoliths may be more suitable for smaller-scale applications, with smaller teams, where operational simplicity and ease of global changes are prioritized. Microservices, on the other hand, shine in contexts that require high scalability, resilience, and the ability to evolve functionalities independently, but demand significant investment in automation, observability, and expertise in distributed systems.
It is crucial to highlight the limitations of the present study. The results are derived from a specific case study, with a controlled functional domain and complexity, executed in a local Docker environment with limited resources. Although the methodology included three independent runs per scenario and the calculation of mean and standard deviation to increase reliability, the number of repetitions was limited for more robust statistical analyses, such as confidence intervals with a high degree of precision. Threats to internal validity, such as variations in host operating system load and warm-up effects, were mitigated but not eliminated. External validity is restricted, and the generalization of findings to larger-scale systems, dedicated cloud environments, or more complex production contexts should be done with caution. Future work could explore a larger number of runs, different load profiles, more complex distributed environments (e.g., Kubernetes), and the inclusion of normalized resource consumption metrics, in order to broaden the validity and applicability of the findings.
4. Conclusion
It is concluded that the objective was achieved by implementing and comparing a digital wallet application in monolithic and microservices architectures, evaluating their impacts on performance, scalability, resilience, maintainability, and operational complexity. The results demonstrated that microservices can offer lower latency and higher resource efficiency under normal load, in addition to significant gains in horizontal scalability and resilience, isolating failures more effectively. However, maintainability for cross-cutting changes and, mainly, operational complexity proved considerably higher in microservices, requiring more components, infrastructure, and management effort.
It is fundamental to recognize the limitations of this study, which was based on a specific case of controlled domain and execution in a local Docker environment with limited resources. The generalization of findings to larger-scale systems or production environments should be done with caution, and the number of repetitions was limited for more robust statistical analyses. For future studies, it is suggested to explore a greater number of executions, different load profiles, more complex distributed environments such as Kubernetes, and the inclusion of normalized resource consumption metrics, in order to broaden the validity and applicability of the conclusions.
Bibliographic References
Gaol, F. L.; Soerpano, H.; Arifin, Y. 2023. Analyzing the Impact of Service Design on Maintainability Factor in Microservices Architecture. In: 15th International Congress on Advanced Applied Informatics Winter, 2023, Bali, Indonesia. Anais… p. 1-6.
Hannousse, A.; Yahiouche, S. 2021. Securing microservices and microservice architectures: A systematic mapping study. Computer Science Review 41: 100415.
Lu, Z.; Delaney, D. T.; Lilis, D. 2024. Comparing the Similarity of OpenAPI-Based Microservices. In: ACM/SIGAPP Symposium on Applied Computing, 2024, Ávila, Espanha. Anais… p. 1-8.
Newman, S. 2020. Migrando Sistemas Monolíticos para Microsserviços: Padrões Evolutivos para Transformar seu Sistema Monolítico. Novatec, São Paulo, SP, Brasil.
Newman, S. 2022. Criando Microsserviços: Projetando Sistemas com Componentes Menores e Mais Especializados. 2ed. Novatec, São Paulo, SP, Brasil.
Waseem, M.; Liang, P.; Shahin, M.; Di Salle, A.; Marquez, G. 2021. Design, Monitoring, and Testing of Microservices Systems: The Practitioners’ Perspective. Journal of Systems and Software 182: 111061.
Article originating from the Final Course Work of the Specialization in Software Engineering of the MBA USP/Esalq
To learn more about the course, click here and access the MBX Academy platform