소프트웨어 아키텍처를 선택할 때 모놀리식인지 마이크로서비스인지는 가장 근본적인 결정이다. 최근 마이크로서비스가 대세지만, 모든 프로젝트에 적합한 건 아니다. 그렇다면 무엇을 기준으로 선택해야 할까? 감이 아니라 품질 속성으로 판단해야 한다.
Symmetry에 발표된 연구는 Jakarta EE 기반 모놀리식과 마이크로서비스 아키텍처를 품질 기반 모델로 비교 분석한다. 연구는 확장성, 유지보수성, 성능, 안정성, 보안성 등 핵심 품질 속성별로 두 아키텍처의 강점과 약점을 체계적으로 정량화했다.
연구 방법은 실제 Jakarta EE 애플리케이션을 모놀리식과 마이크로서비스 두 가지 방식으로 구현한 뒤 동일한 품질 기준으로 평가하는 것이다. 이렇게 동일한 기능을 두 아키텍처로 구현한 비교 연구는 드물다.
핵심 결과를 보면, 확장성에서 마이크로서비스가 압도적이었다. 개별 서비스만 스케일 아웃할 수 있어 자원 효율이 높았다. 반면 성능에서는 모놀리식이 유리했다. 프로세스 내 메서드 호출이 네트워크 기반 RPC보다 빠를 수밖에 없기 때문이다. 유지보수성은 상황에 따라 달랐다—작은 변경이 잦으면 마이크로서비스가, 대규모 리팩토링이 필요하면 모놀리식이 관리가 쉬웠다. 안정성에서 마이크로서비스는 부분 장애 격리가 가능했지만, 서비스 간 통신 장애는 새로운 위험 요인이었다.
이 연구가 중요한 이유는 품질 속성을 정량화한 결정 프레임워크를 제시한다는 것이다. 조직이 자신의 요구사항에 가중치를 부여하면, 어떤 아키텍처가 더 적합한지 데이터 기반으로 판단할 수 있다. 감이나 유행이 아니라 품질 요구사항에 기반한 아키텍처 선택이 가능하다.
한계도 분명하다. 연구가 특정 Jakarta EE 기반 애플리케이션에 국한되어 Spring Boot나 Node.js 등 다른 기술 스택에서의 결과는 다를 수 있다. 또한 장기적 진화 과정에서의 품질 변화는 관찰하지 않았다.
아키텍처를 결정해야 한다면 먼저 프로젝트의 핵심 품질 요구사항에 우선순위를 매기라. 트래픽 급증에 대응해야 한다면 마이크로서비스가, 안정적 트래픽과 낮은 지연이 중요하면 모놀리식이 출발점이다. 중간 규모라면 모듈형 모놀리식으로 시작해 필요할 때 마이크로서비스로 점진 전환하는 전략도 유효하다.
📖 *Development of a Quality-Based Model for Software Architecture Optimization: A Case Study of Monolith and Microservice Architectures* |
논문 원문
※ 이 기사는 학술 논문을 바탕으로 작성되었습니다. 실제 적용 시 환경에 따라 다를 수 있으니 전문가와 상담하세요.
When selecting a software architecture, choosing between a monolith and microservices is the most fundamental decision. Although microservices have become the mainstream recently, they are not suitable for every project. So, what criteria should be used to make this choice? It should be judged based on quality attributes rather than intuition.
A study published in Symmetry compares and analyzes Jakarta EE-based monolithic and microservice architectures using a quality-based model. The research systematically quantified the strengths and weaknesses of both architectures across key quality attributes such as scalability, maintainability, performance, reliability, and security.
The research methodology involved implementing an actual Jakarta EE application in both monolithic and microservice formats, then evaluating them against the same quality criteria. Comparative studies that implement the same functionality using two different architectures are rare.
Looking at the key results, microservices were overwhelmingly superior in terms of scalability. Resource efficiency was high because only specific services could be scaled out. Conversely, the monolithic architecture had an advantage in performance. In-process method calls are inevitably faster than network-based RPCs. Maintainability varied depending on the situation—microservices were easier to manage when frequent small changes were needed, while the monolith was easier for large-scale refactoring. In terms of reliability, microservices allowed for partial fault isolation, but communication failures between services introduced a new risk factor.
The significance of this study lies in its presentation of a decision framework that quantifies quality attributes. By assigning weights to their own requirements, organizations can make a data-driven judgment on which architecture is more suitable. It enables architecture selection based on quality requirements rather than intuition or trends.
The limitations are also clear. Since the study is confined to a specific Jakarta EE-based application, the results may differ in other technology stacks such as Spring Boot or Node.js. Furthermore, it did not observe the changes in quality during long-term evolution.
If you need to decide on an architecture, first prioritize the core quality requirements of your project. If you must respond to sudden traffic spikes, microservices are the way to go; if stable traffic and low latency are critical, a monolith is the starting point. For medium-sized projects, a strategy of starting with a modular monolith and gradually transitioning to microservices when necessary is also effective.
📖 *Development of a Quality-Based Model for Software Architecture Optimization: A Case Study of Monolith and Microservice Architectures* | Original Paper
※ This article is based on an academic paper. Results may vary depending on the environment when applied in practice, so please consult an expert.