How Agoda Made Code Reviews 64% Faster

TL;DR: Agoda cut its API code review time by 64% by adopting a modular monolith architecture. This approach helps untangle complex codebases without requiring a costly and risky complete rewrite, boosting developer productivity.
Key facts
- Category
- Infrastructure
- Impact
- High
- Published
- Source
- InfoQ
Full summary
Agoda cut its API code review time by 64% by untangling its complex codebase without a complete and costly system rewrite.
Travel technology company Agoda has significantly improved its engineering productivity by restructuring a key part of its monolithic codebase. According to a report from InfoQ, the company implemented a modular monolith framework for its post-booking API, a system that handles everything after a customer makes a reservation. This change was designed to tackle the common problem of tight coupling, where different parts of a large application become so interconnected that changing one piece risks breaking another. The results were impressive: changes made within the new framework saw their median code review times drop by 64%, and developers received initial feedback 34% faster compared to work on the legacy parts of the system. This demonstrates a direct link between cleaner architecture and a faster development cycle.
Agoda’s approach did not involve a complete, high-risk rewrite into microservices. Instead, the team focused on creating clear, enforceable boundaries within the existing monolith. They achieved this by defining "domain components," which are self-contained modules that handle specific business functions, like payments or notifications. To keep these modules independent, they used several technical patterns. The Data Mapper pattern, for instance, decouples the application's business logic from the database structure, preventing changes in one from forcing changes in the other. Crucially, Agoda employed ArchUnit, an automated testing tool for Java, to programmatically enforce these architectural rules. ArchUnit acts as a guardrail, automatically failing any code change that attempts to create a forbidden dependency between modules, ensuring the architecture stays clean over time.
This case study is part of a growing industry trend moving away from the "microservices-or-bust" mentality that dominated software architecture discussions for years. While microservices offer benefits like independent deployment and scalability, they also introduce significant operational complexity related to networking, monitoring, and managing a distributed system. Many companies that rushed to adopt them found themselves struggling with this new overhead. The modular monolith, as demonstrated by Agoda, represents a pragmatic middle ground. It provides the primary benefit of microservices—clear separation of concerns and team autonomy—without the cost and complexity of a distributed architecture. This approach allows organizations to improve their existing systems incrementally, gaining agility without betting the farm on a massive re-platforming project.
For engineering leaders and developers, Agoda's success offers a valuable lesson: you can escape the "monolith trap" without a multi-year migration project. The key is to focus on internal modularity and enforce it with automation. Teams can start by identifying logical domains within their application and refactoring them into distinct modules with well-defined APIs. The most critical step, however, is implementing automated architectural tests like those provided by ArchUnit. Without these automated checks, even the best-designed modular system will inevitably degrade back into a tangled "big ball of mud" as new features are added and deadlines loom. Agoda’s strategy provides a repeatable blueprint for paying down technical debt and boosting developer velocity in a sustainable, low-risk manner.
Why it matters
This case study provides a practical blueprint for engineering teams struggling with monolithic applications. Agoda's success demonstrates that a modular monolith is a viable, lower-risk alternative to a full microservices migration, offering significant productivity gains by enforcing cleaner architectural boundaries within an existing codebase.
Business impact
Faster code reviews directly translate to a shorter development cycle and quicker time-to-market for new features. By improving developer productivity without the massive cost of a full rewrite, Agoda's approach shows how targeted architectural improvements can deliver a strong return on investment.
Tags
Related on Notifire
Related stories
Primary source: InfoQ