Microservice Extraction: When to Split the Monolith

Answer-first: Extracting a module from a modular monolith into an independent microservice is justified only when domain isolation, asymmetric CPU/RAM scaling, or strict regulatory isolation demands it. Having pre-enforced DDD bounded contexts ensures extraction requires introducing network RPC adapters (gRPC) and Anti-Corruption Layers rather than refactoring internal core domain logic. Prerequisite: Before reading this part, please review Part 6: Migration Playbook. What You’ll Learn: Extraction Threshold Metrics: Quantitative triggers (e.g. CPU saturation ratios) that justify extraction. Interface Wrappers & Anti-Corruption Layer: How to write a Go ACL interface that switches dynamically between internal memory execution and gRPC implementations. Database Separation Loops: Replicating database tables using Change Data Capture (CDC) and Transactional Outbox during zero-downtime migrations. Saga vs 2PC Orchestration: Trade-offs between distributed 2-Phase Commit locking and Saga state machine workflows. Advocating for a Modular Monolith architecture does not equate to a conservative “put absolutely everything in one place” mentality. In reality, even the greatest Monolith systems like Shopify, Sentry, or GitLab possess a few “satellites” (Microservices) orbiting their central core. ...

July 3, 2026 · 10 min · Lê Tuấn Anh