> Markdown version of [/videos/2090-microservice-ready-without-microservices-introducing-hexagonal-architecture-in-a-monolith](https://www.wearedevelopers.com/videos/2090-microservice-ready-without-microservices-introducing-hexagonal-architecture-in-a-monolith). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Microservice-Ready Without Microservices: Introducing Hexagonal Architecture in a Monolith Get the maintainability of microservices without the heavy tax of distributed deployment. Discover how hexagonal architecture enforces pristine, extractable boundaries directly inside your legacy monolith. - **Speakers:** [Matthias Kauzmann](https://www.wearedevelopers.com/@matthias-kauzmann) - **Event:** World Congress 2026 Europe - Virtual Stage - **Published:** July 2, 2026 - **Duration:** 37:24 - **URL:** https://www.wearedevelopers.com/videos/2090-microservice-ready-without-microservices-introducing-hexagonal-architecture-in-a-monolith ## Summary Complex enterprise monolithic applications often accumulate tangled dependencies, making immediate microservice extraction risky or operationally unfeasible. At Redcare Pharmacy, handling intricate pharmaceutical compliance within a massive shared application necessitated a structural internal overhaul. By applying hexagonal architecture—often called ports and adapters—engineers can establish pristine contextual boundaries within a single codebase. This "microservice-ready" approach allows new subdomains, such as product pricing, to safely mature inside a monolith while remaining completely decoupled, making it trivially easy to extract them into dedicated microservices when actual scaling demands arise. The core of the hexagonal approach relies on a strict, inward-flowing dependency structure that cleanly separates code into adapter, application, and domain layers. The domain layer encapsulates pure business rules, entirely oblivious to external system mechanics. The application layer coordinates these rules with necessary external services by declaring "ports" (interfaces) for functionalities like data storage or messaging. The adapter layer then safely holds the actual implementation details, connecting volatile external tools like databases or message brokers to the ports. Treating monolithic subpackages as entirely separate external clients prevents deep structural coupling and fully insulates pure logic from relentless framework churn. Sustaining pristine architectural boundaries requires ruthless automated enforcement to prevent code rot. Integrating a specialized test framework like ArchUnit ensures CI/CD pipelines actively reject pull requests containing bad imports or architectural violations, effectively turning system design rules into unit tests. For teams requiring absolute strictness, advancing from a microservice-ready monolith to a true "modular monolith" via JVM modularization (`module-info.java`) forces rigid, compile-time validation of inter-domain access. Paired with dedicated engineering time for resolving recorded violations, organizations maintain a robust internal architecture that captures the maintainability of microservices without the heavy tax of distributed deployment. **Keywords:** hexagonal architecture, microservice-ready monolith, ports and adapters pattern, onion architecture, domain layer encapsulation, archunit testing framework, architectural boundary enforcement, java modularization, ci/cd architectural validation, monolith decoupling strategies, inward-flowing dependencies, tech debt resolution, jvm compile-time validation, module-info.java configuration, subdomain bounded contexts ## Chapters 1. **Delivering pharmaceutical compliance via the Swap monolith** (00:00) — An overview of the deep pharmaceutical knowledge powering product swapping and dosage validation. 1. **Evaluating hexagonal architecture for monolith management** (01:57) — Why standard diagrams fail to convey the practical value of hexagonal patterns in complex codebases. 1. **Modeling new bounded contexts without spinning up microservices** (06:27) — Hosting a new pricing subdomain within an existing monolith to defer immediate microservice scaling decisions. 1. **Structuring outer and inner layers in hexagonal design** (10:13) — How strict dependency constraints cascade from external adapters down to the inner domain core. 1. **Shielding business rules from volatile infrastructure shifts** (19:04) — Isolating integrations like message brokers and databases empowers subdomains to act as deployable independent components. 1. **Validating architectural boundaries using ArchUnit testing** (23:58) — Implementing automated testing rules to detect and manage structural violations during the CI/CD pipeline. 1. **Enforcing strict boundaries with Java platform module system** (31:00) — Utilizing module-info files and parent POM structures to enforce compile-time dependency isolation. 1. **Reviewing the long-term impact of hexagonal restructuring** (35:30) — Concluding outcomes reflecting enhanced domain clarity and structural strength after eight months of production use. ## Related Moments - [Restructuring the monolith using domain-driven design](https://www.wearedevelopers.com/videos/1206-single-server-global-reach-running-a-worldwide-marketplace-on-bare-metal-in-a-cloud-dominated-world) (from "Single Server, Global Reach: Running a Worldwide Marketplace on Bare Metal in a Cloud-Dominated World") - [The challenge of preventing modular monoliths from degrading](https://www.wearedevelopers.com/videos/100325-building-moduliths-that-last-patterns-for-sustainable-module-integration) (from "Building Moduliths That Last: Patterns for Sustainable Module Integration") - [Evaluating data storage limitations and monolithic architectural challenges](https://www.wearedevelopers.com/videos/746-swapping-low-latency-data-storage-under-high-load) (from "Swapping Low Latency Data Storage Under High Load") - [Implementing hexagonal architecture patterns for business logic isolation](https://www.wearedevelopers.com/videos/206-move-fast-with-software-architecture) (from "Move fast with Software Architecture") - [Transitioning from a monolith to a microservice architecture](https://www.wearedevelopers.com/videos/242-microservices-how-to-get-started-with-spring-boot-and-kubernetes) (from "Microservices: how to get started with Spring Boot and Kubernetes") - [Applying pure core architectural patterns to web applications](https://www.wearedevelopers.com/videos/892-typed-security-preventing-vulnerabilities-by-design) (from "Typed Security: Preventing Vulnerabilities By Design") ## Related Articles - [Why You Shouldn’t Build a Microservice Architecture](https://www.wearedevelopers.com/magazine/118-why-you-shouldn-t-build-a-microservice-architecture) - [How to Avoid Over-Engineering](https://www.wearedevelopers.com/magazine/546-how-to-avoid-over-engineering) - [Now is the time for industrialized software development](https://www.wearedevelopers.com/magazine/601-now-is-the-time-for-industrialized-software-development) - [MLops – Deploying, Maintaining And Evolving Machine Learning Models in Production](https://www.wearedevelopers.com/magazine/115-mlops-deploying-maintaining-and-evolving-machine-learning-models-in-production) ## Related Jobs - [Senior Backend Developer — AI: MCP & Agent Engine](https://www.wearedevelopers.com/jobs/48297-senior-backend-developer-ai-mcp-agent-engine) at **basebox GmbH** - [Senior Software Engineer, Client Apps Platform](https://www.wearedevelopers.com/jobs/ext/1773893-senior-software-engineer-client-apps-platform) at **GitHub** - [Senior Cloud Software Architect (all genders welcome) for our Intelligent Service Operations Hub](https://www.wearedevelopers.com/jobs/ext/1284556-senior-cloud-software-architect-all-genders-welcome-for-our-intelligent-service-operations-hub) at **Rosenxt Group** - [Senior Engineer, Infrastructure Platform](https://www.wearedevelopers.com/jobs/ext/328836-senior-engineer-infrastructure-platform) at **Intercom, Inc.** - [Senior Cloud Software Architect (all genders welcome) for our Intelligent Service Operations Hub](https://www.wearedevelopers.com/jobs/ext/1693682-senior-cloud-software-architect-all-genders-welcome-for-our-intelligent-service-operations-hub) at **Rosenxt Group** - [Software Solution Architekt](https://www.wearedevelopers.com/jobs/ext/1458613-software-solution-architekt) at **BWI GmbH**