The engineering monolith decomposition decision record: why the service extraction model you chose determines your incremental migration ceiling and your distributed system complexity surface
Monolith decomposition decisions are made when the pain of the monolith becomes visible — when a single slow-moving module blocks every team's deployment, when two teams coordinate every schema migration, when a single codebase onboards new engineers over six weeks. The service boundary model, the extraction sequence model, the database decomposition model, and the inter-service communication model are founding decisions about which architectural properties the team actually gains from the decomposition, how much of the migration can be completed before the coordination overhead exceeds the monolith's cost, and what new failure surfaces the distributed system introduces that the monolith never had.
A 24-person developer tools startup had built a CI/CD analytics platform over two and a half years. The platform processed build events from customer CI pipelines, computed test flakiness scores and build time trends, and surfaced recommendations through a web dashboard and a Slack integration. The codebase had grown to approximately 85,000 lines across a single Rails monolith that handled the ingestion API, the analytics computation jobs, the web dashboard, the Slack integration, and the billing and subscription management. The engineering team had grown from 3 to 12 engineers over those two and a half years and the monolith had accumulated the coordination costs that large codebases impose: a schema migration for the ingestion team required a code review from the billing team to verify it did not affect invoice records; a deployment for the dashboard team required a full regression suite that included the Slack integration tests; a new hire joining the analytics team spent her first four weeks understanding the monolith's structure before making her first meaningful contribution.
The CTO presented a decomposition plan to the engineering team: split the monolith into 8 services — ingestion, analytics-compute, recommendations, dashboard-api, dashboard-frontend, slack-integration, billing, and notifications — over a two-quarter timeline. The plan identified rough service boundaries and assigned ownership. It designated the work as the highest-priority engineering initiative for the next two quarters. All 12 engineers were divided into teams of one to two working on each service boundary, with a shared infrastructure team of two handling the service mesh, API gateway, and deployment pipeline work that would be required across all services. The plan was ambitious and the team was enthusiastic. The CTO presented a Gantt chart showing all 8 services extracted by the end of Q2.
Seven months later, the engineering team had 3 services that were fully extracted and independently deployable: dashboard-frontend, slack-integration, and notifications. The dashboard-frontend was a React application that had been a separate webpack bundle already, so extracting it was largely a deployment pipeline change. The slack-integration was a 2,400-line module with a clean boundary that called the monolith's API — it had been extracted in three weeks. The notifications service was similarly self-contained. The other 5 services were in various states of partial extraction: the ingestion service had its own repository and deployment pipeline but was still reading from 4 tables in the monolith's database to populate the analytics context it attached to incoming events; the billing service had been extracted into its own application but its invoice generation logic was calling the monolith's user endpoint synchronously for every invoice, and the monolith's subscription state machine was still writing billing events that the extracted billing service was reading from the shared database; the analytics-compute service was running as a separate process but had not yet received the shared database credentials restricting it to its own tables because the data ownership boundaries for the analytics models were still being worked out with the billing team, who had a dependency on the computed metrics for usage-based billing calculations.
The team was not making 8 services. The team was making 3 services plus 5 partial extractions, all of which required the original monolith to remain fully operational as the residual core, plus an API gateway routing traffic between the monolith and the extracted services, plus a service mesh managing the growing web of synchronous calls between partially-extracted services that had not yet fully separated their data dependencies. The deployment pipeline for a change to the ingestion service required: (1) deploy the ingestion service, (2) verify the monolith's analytics context population was not affected, (3) run the end-to-end ingestion test suite that required all 4 partially-extracted services plus the monolith to be running in the staging environment. This was more deployment coordination than the monolith had ever required.
The CTO eventually made a pragmatic call: the 3 fully extracted services stayed extracted. The 5 partial extractions were stopped. The ingestion, analytics-compute, recommendations, dashboard-api, and billing code was merged back into the monolith, with the rationale that a monolith you understand is better than a partially-extracted distributed system you do not. The team rebuilt each of the 5 services as new greenfield microservices over the following 18 months — one at a time, using the strangler fig pattern — while the monolith continued to run as the production system. For 18 months the team maintained three deployment artifacts: the original monolith, the 3 services extracted in the failed big-bang attempt, and the growing set of strangler fig extractions. The big-bang attempt had produced more operational complexity for 25 months than the monolith had produced for 2.5 years.
A 45-person B2B SaaS had built a subscription management platform for software companies — a system for tracking customer subscriptions, generating invoices, managing dunning flows for failed payments, and surfacing revenue metrics to founders and finance teams. The platform had been live for three years and had grown to approximately 60,000 lines across a Django monolith. The engineering organization had reorganized around functional teams: a Billing team responsible for invoice generation and payment processing, a Customer Success team responsible for subscription lifecycle management and dunning, and a Reporting team responsible for the revenue dashboard and analytics exports. Each team owned specific code modules within the monolith.
The VP of Engineering proposed a decomposition organized around the team structure: a billing service owned by the Billing team, a customer-success service owned by the Customer Success team, and a reporting service owned by the Reporting team. The logic was sound from an organizational perspective — each team had a clear ownership boundary, and the team-to-service mapping would minimize cross-team coordination during the extraction since each team was extracting its own code. The teams began their extractions in parallel, using the strangler fig pattern for each service independently.
Three months into the extraction, a problem emerged that the boundary analysis had not anticipated: the billing service needed to read the customer's billing address for every invoice it generated — and the customer's billing address was owned by the customer-success service, which managed the customer lifecycle. The billing service called the customer-success service's API synchronously on every invoice generation. The customer-success service needed to react to payment events — a failed payment triggered a dunning sequence, a successful payment triggered a subscription renewal — but payment events were published by the billing service. The customer-success service subscribed to the billing service's payment event endpoint synchronously, polling it every 30 seconds to pick up new events. Six months into the extraction, the billing service was calling the customer-success service's API and the customer-success service was calling the billing service's API — a synchronous circular dependency across service boundaries that made it impossible to restart either service independently without causing the other to begin failing its calls.
The reporting service compounded the problem: the revenue metrics it computed required joining subscription records from the customer-success service with invoice records from the billing service. The reporting team had implemented this as a direct database join across the two services' schemas — both services were still on the shared PostgreSQL instance and the reporting service's queries joined across schema boundaries. When the billing team attempted to migrate the billing service to a separate database as a Stage 4 database decomposition step, the reporting service began failing immediately because its cross-schema queries could no longer be executed. The migration was rolled back. The billing service remained on the shared database.
The post-mortem analysis identified the core error: the service boundaries had been drawn along team ownership lines rather than domain cohesion lines. Billing, subscription lifecycle, and payment events were not independent domains — they were three aspects of a single domain (subscription financial management) that happened to be distributed across three teams for organizational reasons. Separating them into three services had not reduced coupling; it had made the coupling synchronous across network boundaries and had distributed the coupling across four different cross-service call paths that were harder to trace and debug than the in-process function calls they replaced. The team eventually restructured the decomposition around a single subscription-finance service that combined billing and customer-success functionality — accepting that this service would be larger than the team had wanted — and rebuilt the reporting service as a read-only event consumer that maintained its own materialized view of subscription and invoice data populated from events, eliminating the cross-service database joins entirely. The restructuring required discarding 14 months of extraction work and restarting with a corrected boundary model.
A 72-person enterprise SaaS had built a workflow automation platform serving enterprise customers across financial services and healthcare. The platform had started as a monolith in 2019 and had been decomposing incrementally using the strangler fig pattern since 2021. By late 2024, the team had extracted 11 services over 3 years: the workflow engine, the step execution service, the notification service, the user preferences service, the account service, the audit log service, the integration connector service, the template library service, the scheduling service, the reporting service, and the authentication service. Each service owned its own database. Each service had an independent deployment pipeline with canary releases and automated rollback. The decomposition had been executed carefully, with domain-based boundary identification, anti-corruption layers at each service boundary, and event-driven data replication for read models that crossed service boundaries. The engineering team was proud of the architecture.
The workflow engine used synchronous REST for all inter-service communication. When a workflow step completed, the workflow engine called the notification service synchronously to dispatch completion notifications. The notification service called the user preferences service synchronously to retrieve the user's notification preferences before deciding which channels to use. The user preferences service called the account service synchronously to verify that the user's account was active and to retrieve account-level notification settings that could override user-level preferences. The call chain was: workflow engine → notification service → user preferences service → account service, with a synchronous response required at each hop before the previous service could return its own response to the caller above it. The total latency budget for a workflow completion event in the best case was 23ms in the monolith (a single function call chain) and 240–350ms p99 in the distributed system (four synchronous network round-trips at 15–80ms each depending on service load). The workflow engine's p99 latency for step completion had been 23ms in the monolith. It was 240–350ms in the distributed system. The team had accepted this as the cost of decomposition.
In November 2024, the notification service required a 90-second maintenance window to apply a PostgreSQL extension required for a new notification scheduling feature. The maintenance window was scheduled for Sunday at 2:00 AM UTC, the lowest-traffic period in the platform's usage pattern. The notification service was restarted. The database connection pool reconnected. The service was healthy within 83 seconds. The on-call engineer confirmed the service was returning HTTP 200 responses and closed the maintenance window ticket.
At 2:01 AM UTC, the workflow engine's error rate began climbing. By 2:03 AM it was at 23%. By 2:06 AM it was at 61%. The on-call engineer had just closed the notification service maintenance ticket and was starting to rotate off. The paging alert for workflow engine error rate arrived at 2:04 AM. The engineer investigated: the workflow engine was returning 500 errors because its calls to the notification service were timing out at the 60-second timeout configured on the REST client. The notification service was healthy — it was returning 200 responses with 180ms latency. But the workflow engine had been accumulating in-flight requests that were waiting for the notification service to come back up during the 83-second maintenance window, and those requests were queued in the workflow engine's connection pool, holding connections that subsequent requests were waiting for. The notification service's 83-second downtime had produced a 4-minute workflow engine degradation because the synchronous call dependency gave the notification service's downtime a 1:3 blast radius amplification through the upstream service's connection pool exhaustion.
The retrospective identified the structural cause: the notification service did not need to be a synchronous dependency of the workflow engine. A workflow step completion notification is not a response that the workflow engine needs before it can proceed — the workflow engine completes the step regardless of whether the notification is dispatched. The synchronous call had been chosen because it was simpler to implement than an event queue at the time the notification service was first extracted, and because the team had not explicitly analyzed which call paths required synchronous responses and which did not. The team retrofitted the workflow completion notification path to use an asynchronous event queue in the following sprint, reducing the blast radius of the notification service's failures from "workflow engine degrades" to "notifications lag by the notification service's recovery time." The retrofit required redesigning the notification service's contract from synchronous to event-driven — an architectural change that the inter-service communication model ADR would have identified before the first synchronous call was made in 2021, had the ADR been written to include a synchronous vs asynchronous decision for each inter-service call path.
Structural properties set by the monolith decomposition decision
Two structural properties are determined by the founding decisions about service boundaries, extraction sequences, database decomposition, and inter-service communication models. Both are invisible during early stages of the decomposition — the services are building, the monolith is running, and the architecture looks clean in the service diagram. Both become visible under operational pressure: when a service extraction stalls because the shared database cannot be decomposed without resolving ambiguous data ownership, when a synchronous call chain produces a 4-minute incident from a 90-second maintenance window, when a team-boundary-drawn service calls 3 other services for every operation it performs and the deployment coordination cost exceeds the monolith's.
Property 1: Incremental migration ceiling. The incremental migration ceiling is the structural limit on how much of the monolith can be decomposed before the migration's own coordination cost — across partial extractions, shared database dependencies, circular inter-service calls, and accumulated deployment pipeline complexity — equals or exceeds the remaining cost of the monolith it is replacing. This ceiling is not visible in the architecture diagram; it is visible in the development velocity metrics 6 to 12 months into the extraction. The boundary quality component is the most consequential input to the ceiling. A service boundary that maps to a genuine domain seam — a natural cluster of data ownership, business logic, and change frequency that is loosely coupled to adjacent domains — produces an extracted service that can operate independently after extraction, adding one clean deployment unit to the system. A service boundary that is drawn around organizational structure or technical layer rather than domain cohesion produces an extracted service that calls adjacent services on every operation, adding one new deployment unit whose operations require multiple other services to be running to complete. The ceiling imposed by poor boundary quality compounds with scale: a system with 5 services that all call each other on every operation has 25 potential call chains, each of which is a potential cascade failure surface. Connect to the microservices vs monolith decision record: the foundational decision about whether to use a microservices architecture from the beginning or to start with a monolith and decompose later determines the conditions under which the decomposition decision is made; teams that start with a monolith and decompose when the pain becomes visible make the decomposition decision with 2–3 years of production data about which code changes together, which teams need independent deployability, and which data ownership boundaries are genuinely clean — data that teams starting with microservices from day 1 do not have. The extraction sequence component determines how much of the migration can be completed at sustainable coordination cost. The strangler fig pattern keeps at most one or two extractions in flight simultaneously, ensuring each extracted service reaches a stable state before the next begins. Big-bang decomposition puts all extractions in flight simultaneously, multiplying the coordination cost by the number of extractions — teams working on 8 simultaneous extractions will find that cross-extraction dependencies (service A's extraction is blocked waiting for service B's database decomposition to complete so the shared table can be removed) produce cascading delays that result in a half-extracted system that is more expensive to maintain than either the original monolith or the target distributed architecture. The database decomposition component is often the ceiling itself, independent of the code extraction quality. The staged database decomposition — logical ownership, then schema separation, then cross-schema read elimination, then separate database servers — cannot be shortcut: teams that attempt to separate database servers before eliminating cross-schema read dependencies find themselves retroactively implementing API calls and event-driven read models for queries that have been running as direct joins for years, often in reporting and analytics paths where the data model is complex and the consistency requirements are non-obvious. Connect to the database migration strategy decision record: the database migration decisions about schema evolution approaches, backward compatibility windows, and migration deployment patterns are integral to the database decomposition model; each stage of the decomposition requires database migrations executed in a way that the existing services — including the monolith during the transition — can continue to operate; the zero-downtime migration techniques that the database migration ADR documents (expand-contract migrations, blue-green schema migrations, online index builds) are prerequisite capabilities for the database decomposition stages, because a decomposition that requires downtime for each database migration step cannot be executed incrementally without accumulating downtime debt across the extraction sequence.
Property 2: Distributed system complexity surface. The distributed system complexity surface is the aggregate operational area across which failures can occur, latency can accumulate, and operational expertise must be maintained in the distributed system that the monolith decomposition produces. This surface grows with the number of inter-service interactions (not the number of services), because each interaction is a failure surface, a latency component, and a testing requirement that did not exist in the monolith. The inter-service communication model component is the primary determinant of the cascade failure surface. Synchronous inter-service calls create a failure dependency graph: service A's availability is bounded by the availability of every service it calls synchronously, recursively. If service A calls services B and C synchronously, and service B calls service D synchronously, A's availability is the product of its own availability and the availability of B, C, and D. If each service has 99.9% availability independently, A's availability is 99.9% × 99.9% × 99.9% × 99.9% = 99.6% — worse than any individual service, and degrading with each additional synchronous dependency. The cascade failure surface of a synchronous call graph is not simply that downstream services cause upstream failures — it is that the failure modes are non-obvious (connection pool exhaustion in the upstream service from downstream latency spikes, timeout cascades under load, retry storms when multiple upstream services simultaneously retry against a recovering downstream service) and require distributed tracing to diagnose. Asynchronous communication via durable message queues decouples the failure surface: each service's availability is determined by its own operational health plus the availability of the message queue infrastructure, not by the availability of its downstream consumers or producers. Connect to the event-driven architecture decision record: the decision about which inter-service interactions to implement as synchronous calls versus asynchronous events is part of the event-driven architecture ADR, not a purely technical implementation choice; the ADR must analyze each call path for whether the caller requires the response to complete its own operation (payment authorization: synchronous required), whether the interaction is in a user-critical path (dashboard load: low latency required, synchronous preferred), or whether the interaction is decoupled from the caller's core responsibility (notification dispatch: asynchronous appropriate, cascade failure isolation justified). The service boundary quality component extends into the operational domain: a service whose boundaries were drawn around team ownership rather than domain cohesion will make more inter-service calls per operation, increasing the complexity surface proportional to the boundary misalignment. The observability model component determines whether the team can reason about the distributed system when things go wrong. Connect to the distributed tracing decision record: distributed tracing — the correlation of requests across service boundaries using a shared trace ID propagated through synchronous calls and published alongside asynchronous events — is a prerequisite capability for diagnosing failures in a distributed system; a monolith decomposition that proceeds without simultaneously building distributed tracing infrastructure produces a system whose failures are significantly harder to diagnose than the monolith's were; the complexity surface of the distributed system without distributed tracing is effectively unbounded — any inter-service call chain can produce a latency or error that cannot be correlated to its root cause without manually correlating log timestamps across multiple services, a process that takes hours in a time-sensitive incident rather than the seconds a trace visualization provides.
The monolith decomposition ADR: five sections
Section 1: Service boundary model. The service boundary model defines how the team identifies which parts of the monolith become which services, with explicit documentation of the analysis methods used and the trade-offs considered at each boundary decision. The ADR must address three inputs to the boundary analysis. The domain cohesion analysis specifies the method used to identify natural domain seams in the monolith. The practical method combines three signals: change frequency clustering (which files change together in git history — the most reliable objective indicator of coupling), data ownership mapping (which code paths write to each database table — writes indicate ownership, reads can be served through APIs after extraction), and business process analysis (which operations in the monolith represent complete business processes from the customer's perspective, with minimal cross-domain data requirements to execute). The boundary decisions must be documented at the level of specific tables, specific modules, and specific call paths — not at the level of abstract domain names. 'The billing service owns the invoices table, the invoice_line_items table, and the payment_attempts table' is a documentable decision. 'The billing service handles billing' is not. The team structure alignment model specifies how service boundaries relate to team ownership. The recommended approach is to identify domain seams first and then align team ownership to the seams — not to identify team ownership first and then draw service boundaries around the teams. Where the domain seam and the team boundary coincide, document it. Where they diverge — a domain seam that cuts across team boundaries, or a team that spans multiple domain seams — document the divergence explicitly and specify how cross-boundary coordination will work during extraction and after. Teams that draw service boundaries around organizational structure rather than domain cohesion should document the specific trade-off they are accepting: faster initial extraction with higher coupling risk versus slower initial extraction with better domain alignment. The boundary anti-pattern register documents known anti-patterns considered and explicitly rejected. 'We considered drawing the service boundary around the user entity (all code that touches user records), but rejected it because user data is used by every domain in the system; this boundary would have produced a user service that every other service calls synchronously for every operation, making the user service a synchronous dependency of the entire system and a single point of failure for all business operations.' Documenting rejected boundaries is as important as documenting the chosen boundary, because it explains why the final boundary is drawn where it is — information that the engineer who joins the team 18 months later cannot reconstruct from the architecture diagram alone.
Section 2: Extraction sequence model. The extraction sequence model defines which services are extracted in which order, the criteria used to select the extraction sequence, and the expected state of the system at each stage of the extraction. The ADR must specify the extraction strategy (strangler fig vs big-bang vs hybrid) with explicit rationale, the sequence of individual extractions with prioritization criteria, and the anti-corruption layer model for each extraction. The extraction strategy rationale must address the team's specific situation: what is the current size of the monolith, what is the team size, what is the target timeline, what is the customer SLA that constrains downtime and degradation during extraction. For teams choosing strangler fig, the ADR specifies the maximum number of extractions in flight simultaneously (typically one to two, enforced as a team policy during extraction planning) and the definition of 'extraction complete' that must be reached before the next extraction begins: the extracted service is running in production with 100% of its traffic, the monolith's corresponding code is deleted, and the service's deployment pipeline operates independently without reference to the monolith's pipeline. The prioritization criteria for extraction sequence should include at least: standalone extractability (services with the fewest data dependencies on other services extract first — they reach the 'extraction complete' state fastest and free up engineering capacity for more complex extractions), compliance or operational forcing functions (a service that must be independently deployable for a compliance requirement or a customer contract has a fixed deadline, independent of the prioritization model), and risk profile (services that are changed most frequently benefit most from independent deployability, and their extraction should be prioritized once standalone extractability is not the dominant constraint). The anti-corruption layer model specifies how the extracted service and the monolith communicate during the transition period when both are running. The anti-corruption layer is the interface that prevents the extracted service from depending on the monolith's internal data model — it translates between the monolith's domain model and the extracted service's domain model, ensuring that the extracted service can be developed and evolved independently of the monolith's internal structure. The ADR must specify: what operations the anti-corruption layer exposes, what the translation logic does, how the layer is tested in isolation from both the monolith and the extracted service, and what the deletion criteria are for the layer after the extraction is complete. Connect to the API versioning decision record: the inter-service API contracts established during extraction — both the anti-corruption layer's contracts and the extracted service's own API — are the first versioned contracts the team will need to maintain indefinitely; the API versioning decisions about backward compatibility, breaking change management, and consumer-driven contract testing apply to internal service-to-service APIs as well as external customer-facing APIs; teams that do not apply versioning discipline to internal APIs find that a service evolution in one extracted service propagates as a breaking change to other services that depend on it, requiring coordinated deployments that defeat the purpose of independent deployability.
Section 3: Database decomposition model. The database decomposition model defines the staged progression from a single shared database to independently owned data stores, with explicit documentation of data ownership decisions for each table and the methods used to eliminate cross-service data dependencies. The ADR must specify the four decomposition stages and the criteria for advancement from one stage to the next. Stage 1 (logical ownership assignment) defines which service owns each table in the monolith's database, the method used to determine ownership (data writes analysis, domain expert interviews, or explicit team negotiation for tables with ambiguous ownership), and the resolution approach for tables where ownership is contested or genuinely ambiguous. Stage 1 completion criteria: every table in the shared database has an assigned owner, the assignment is documented in the ADR, and all engineers have confirmed they understand the ownership model and are enforcing it in code review. Stage 2 (schema separation) defines the timeline for migrating tables into per-service schemas, the credential model that enforces schema access boundaries (each service's application credentials may only access its own schema), and the monitoring that surfaces cross-schema access violations. Stage 2 completion criteria: all tables are in their owning service's schema, all services are using schema-qualified table names, and no service's credentials have access to another service's schema. Stage 3 (cross-schema dependency elimination) is the most detailed stage and typically requires the most time: for each cross-schema read query, the ADR specifies whether it will be replaced by a synchronous API call (acceptable for low-volume, latency-tolerant reads) or an event-driven read model (required for high-volume reads, analytics queries, and reads that must be available even when the owning service is temporarily unavailable). The read model materialization approach — which events trigger the read model update, what consistency guarantees the materialized read model provides, and how the read model handles events that arrive out of order — must be specified in detail because it determines the consistency behavior of any feature that uses the read model. Stage 3 completion criteria: no service executes queries that read from another service's schema; every cross-service data access goes through the owning service's API or a materialized read model populated from that service's events. Stage 4 (physical database separation) is a deployment infrastructure change — the schemas are migrated to separate database servers — after the data dependency elimination of Stage 3 makes it safe. The ADR must specify the migration approach (live replication then cutover vs dump-and-restore with downtime vs online migration tool) and the rollback plan if the new database server exhibits performance or availability issues that the shared database did not. The timing constraint: Stage 4 is exclusively a Stage-3-complete operation. Teams that attempt Stage 4 before completing Stage 3 will discover the remaining cross-schema dependencies when the extracted service's database queries begin failing, requiring an emergency rollback and re-examination of the dependencies that Stage 3 was designed to eliminate systematically.
Section 4: Inter-service communication model. The inter-service communication model defines which call patterns between extracted services use synchronous REST (or gRPC), which use asynchronous event queues or message brokers, and the specific criteria used to make each assignment. The ADR must address the decision criteria for synchronous vs asynchronous, the cascade failure isolation requirements, and the contract testing model for each communication type. The synchronous vs asynchronous decision criteria must be applied at the level of individual call paths, not as a system-wide architectural preference. A call path is classified as synchronous-required if: the caller must have the response before it can complete its own operation (a payment authorization response must be received before the checkout flow can proceed), the interaction is in a user-critical latency path and the downstream service's response time is predictable and fast (a user preferences lookup in a request path where the user is waiting for a response), or the calling service cannot safely defer processing of the downstream service's response (an idempotency check that must confirm before processing begins). A call path is classified as asynchronous-appropriate if: the caller can proceed without the downstream service's response (the workflow engine can mark a step complete without waiting for the notification to dispatch), the downstream service's failures should not propagate to the caller's availability (notification dispatch failures should not degrade the workflow engine), or the interaction is high-volume and the downstream service's response time variability would introduce unacceptable latency jitter (analytics event processing). For each synchronous call path, the ADR must specify: the timeout value and its rationale, the retry policy (immediate retry, exponential backoff, circuit breaker), and the fallback behavior when the downstream service is unavailable (fail the calling operation, return a cached value, return a degraded response). For each asynchronous interaction, the ADR must specify: the event schema and versioning approach, the queue or topic configuration (durability, ordering guarantees, delivery semantics), the consumer group model, and the dead-letter handling for events that fail processing after the maximum retry count. The cascade failure isolation specification documents the maximum blast radius the team is accepting for each upstream service's dependency on each downstream service. 'The workflow engine depends synchronously on the notification service. If the notification service becomes unavailable, the workflow engine's step completion operations will fail until the circuit breaker opens after 5 consecutive failures. After the circuit breaker opens, step completions will succeed but notifications will not dispatch until the notification service recovers, at which point the workflow engine will close the circuit breaker after 1 successful probe request and resume dispatching notifications.' This level of specification — which the reference implementation in the circuit breaker library does not provide — is the substance of the inter-service communication ADR. Connect to the deployment strategy decision record: the deployment strategy decisions about canary releases and rolling deployments interact with the inter-service communication model in important ways; a service that uses synchronous inter-service calls must maintain backward compatibility at its API during rolling deployments (some consumers will be calling the new version while others are still calling the old version); a service that uses asynchronous events must maintain event schema compatibility during the deployment period; the communication model ADR should specify the minimum backward compatibility window required at each service's API — determined by the deployment strategy's rollout duration — to ensure that consumers do not break during the deployment period.
Section 5: Migration governance model. The migration governance model defines how the team tracks decomposition progress, determines when an extraction is complete, and governs the decision to pause or accelerate the migration as the system evolves and the team learns from early extractions. The ADR must specify the completion definition, the rollback criteria, and the ongoing governance process. The completion definition must be specific and verifiable: a service extraction is complete when — (a) the extracted service is running in production with 100% of the traffic for its domain, as measured by the absence of requests to the monolith's corresponding endpoints; (b) the extracted service's database schema is in its own schema, with credentials that restrict access to that schema only; (c) the monolith's code for the extracted domain has been deleted, as verified by the absence of the domain's model files, controller files, and test files in the monolith's repository; (d) the extracted service's deployment pipeline runs independently of the monolith's deployment pipeline — a deployment to the extracted service does not require coordination with the monolith deployment; and (e) the anti-corruption layer's deletion criteria have been met and the layer has been removed. Teams that do not enforce a formal completion definition accumulate 'mostly extracted' services that require ongoing maintenance of both the monolith implementation and the service implementation, doubling the operational cost of the domain rather than eliminating the monolith's cost. The rollback criteria define the conditions under which an extraction in progress is reversed: the extracted service's availability is below the monolith's baseline for the same domain over a 72-hour window (measured by error rate and latency p99); the extracted service's deployment coordination cost is higher than the monolith's coordination cost for the same domain (measured by deployment pipeline duration and cross-team dependency count); the data ownership boundaries are ambiguous enough that the Stage 3 database decomposition cannot be completed without resolving a cross-domain data ownership dispute that will take longer than 4 weeks. When rollback criteria are met, the extraction is reversed — the monolith code is restored, the service traffic is redirected back to the monolith, and the extraction is rescheduled with a corrected boundary model. The ongoing governance process defines how the team reviews the decomposition's progress against its objectives at a regular cadence. The recommended cadence is monthly: a 30-minute review of the extraction metrics (services extracted vs target, database stages reached per service, coordination cost measured as deployment pipeline dependency count), the rollback criteria status for in-flight extractions, and the prioritization of the next extraction against the current prioritization criteria. The governance model must include a decomposition pause condition: if the cumulative coordination cost of in-flight extractions — measured as deployment pipeline coordination steps plus database decomposition blockers plus cross-extraction dependency resolution time — exceeds the coordination cost the monolith was imposing before the decomposition began, the team pauses new extractions, completes in-flight extractions to their Stage 3 database decomposition milestones, and reassesses the extraction sequence before beginning new work. Connect to the service ownership model decision record: the service ownership decisions about which team owns each service, what ownership means for on-call rotations and incident response, and how ownership transfers when teams reorganize are integral to the migration governance model; each extracted service needs an owner before it goes to production — the monolith had a single on-call rotation, the distributed system has N per-service rotations that must be staffed; teams that extract services without simultaneously defining service ownership and staffing the on-call rotation find that newly extracted services have implicit shared ownership (everyone and no one), leading to slower incident response and slower feature development than the monolith provided.
FAQ
How do you identify service boundaries when decomposing a monolith?
Service boundaries in a monolith decomposition should be identified by domain cohesion — the natural grouping of data, logic, and operations that change together and are used together — rather than by team ownership or technical layer. The practical identification method combines change frequency analysis (examining git history to find which files change together in the same commits), data ownership mapping (identifying which code paths write to each database table, since writes indicate ownership), and business process analysis (which monolith operations represent complete business processes with minimal cross-domain data requirements). The boundary decisions must be documented at the level of specific tables, specific modules, and specific call paths — 'the billing service owns the invoices table, invoice_line_items, and payment_attempts' is documentable; 'the billing service handles billing' is not. Three boundary anti-patterns to avoid: drawing boundaries by team ownership (creates politically convenient boundaries that may not correspond to domain seams, leading to services that call each other constantly); drawing boundaries by technical layer (a 'data layer service' or 'validation service' cuts across domains rather than encapsulating them, maximizing coupling); drawing boundaries too small too early (nanoservices with one or two operations produce a distributed monolith before the team has the operational maturity to manage it — start with coarser boundaries and decompose further only when development friction from actual coupling becomes visible). The most reliable signal for a good boundary is the ability to describe the service's operations without mentioning any other service's data: a billing service whose invoice generation requires calling the user management service for every invoice does not have a clean boundary — the billing domain has a data dependency on the user domain that the boundary did not resolve. If you cannot describe the service's core operations without naming another service, the boundary is not drawn at a genuine domain seam.
What is the strangler fig pattern and when should you use big-bang decomposition instead?
The strangler fig pattern is an incremental decomposition approach where individual capabilities are extracted from the monolith one at a time — the extraction is completed and verified in production before the next extraction begins. The monolith handles all traffic for unextracted domains while extracted services handle their own domain's traffic, with an API gateway or routing layer directing requests to the appropriate destination. Big-bang decomposition attempts to split the monolith into multiple services simultaneously. Strangler fig advantages: at any point, the system has a known-working state — the monolith handles everything the extracted services have not yet taken over. If an extraction fails, traffic redirects back to the monolith and the extraction is revised. The migration can pause indefinitely at any stage without leaving the system in a broken half-extracted state. Big-bang decomposition can deliver the final architecture faster in calendar time if executed well, but requires running all extractions in parallel, which multiplies coordination cost and leaves the system in a half-extracted state if any extraction stalls. Big-bang is appropriate in a narrow set of conditions: the monolith is small enough (under 18 months old, under 50,000 lines, under 5 engineers who know it well) that the full extraction can be completed in one to two focused sprints; the team has previous experience decomposing a system of similar size; there is an explicit committed deadline that makes the strangler fig transition period cost unacceptable. For most teams decomposing a production monolith with paying customers, strangler fig is the lower-risk choice — not because it is architecturally superior, but because it keeps the system in a continuously deployable state throughout the migration and limits the blast radius of a failed extraction to one domain at a time. The critical discipline for strangler fig: enforce a maximum of one or two extractions in flight simultaneously, and enforce the completion definition before beginning the next extraction. Teams that begin the next extraction before completing the current one accumulate the same coordination overhead as big-bang decomposition, losing the strangler fig's key advantage.
How should shared database tables be decomposed when extracting services?
Shared database decomposition follows a staged progression that reduces risk at each step. Stage 1: assign logical ownership to every table in the shared database — identify which service owns each table based on which code path is authoritative for the entity's state (writes indicate ownership). Document the assignments. Enforce the ownership boundary in code review: new code that writes to a table from outside its owning service is blocked. Stage 2: separate schemas within the shared database — move each service's tables into a database schema named for the service, update application code to use schema-qualified names, issue per-service credentials restricted to that service's schema. This physically enforces the ownership model without requiring a separate database server or any change to the data replication or backup infrastructure. Stage 3: eliminate cross-schema reads — identify every query that reads from a schema not owned by the querying service; replace each with either a synchronous API call to the owning service (for low-volume, latency-tolerant reads) or an event-driven read model materialized locally from the owning service's events (for high-volume reads and reads that must survive the owning service's downtime). This stage is typically the slowest because every cross-schema read requires a data consistency decision: how stale is the read model allowed to be, what happens if the materialized view is behind due to event processing lag, and what happens during the event source's downtime when the materialized view is not receiving updates. Stage 4: separate database servers — once Stage 3 is complete and no cross-schema reads remain, migrate each service's schema to a dedicated database server. This is a deployment infrastructure change that unlocks true independent deployability: schema migrations for one service no longer require coordination with other services. The critical rule: Stage 4 is exclusively a Stage-3-complete operation. Teams that migrate to separate databases before eliminating cross-schema read dependencies will discover the remaining dependencies when queries start failing, requiring an emergency rollback that the staged approach is specifically designed to avoid.
How do monolith decomposition decisions connect to AI chat sessions and decision preservation?
Monolith decomposition decisions are some of the most consequential and least documented architectural decisions a team makes — and they are almost always made in extended AI chat sessions where engineers work through the tradeoffs in real time: which of these 12 potential service boundaries are genuine domain seams and which are organizational conveniences that will produce tightly coupled services; why we're starting with the billing service rather than the notification service even though the notification service is simpler — because billing has a compliance requirement that makes independent deployment non-optional and the value of the extraction is clearest there; why we're deferring the shared customer table decomposition until after we've extracted 4 services because the ownership is genuinely ambiguous (3 services have legitimate write paths) and we need to observe which one becomes the natural owner as the services take shape; why we're choosing synchronous REST for the payment confirmation path and asynchronous messaging for the notification path — payment confirmation requires a synchronous response to complete the checkout flow, notification does not, and conflating the two communication models produces either an overengineered payment path or an under-isolated notification path. The reasoning in those sessions — the specific table names with ambiguous ownership, the specific call paths that must be synchronous, the specific team coordination cost that made big-bang decomposition impractical — is the substance of the decomposition model, more so than the service registry entries or the API gateway routing rules that implement the decisions. Running those AI chat sessions through the open-source extractor produces the monolith decomposition decision record that allows the engineer joining the team 18 months into the migration to understand why the customer table is still in the shared schema (not because it was overlooked, but because the ownership analysis found that 3 services have legitimate write paths and the team explicitly deferred resolution until after those services' own boundaries stabilize), why the notification service uses a message queue while every other inter-service call uses REST (a deliberate cascade-failure isolation decision for a non-critical path, not a lazy inconsistency), and why the team is on its 7th extracted service with 11 remaining rather than attempting all 18 simultaneously (a risk model based on the team's deployment capacity and the customer SLA that makes incremental extraction the only viable path). Without the reasoning session, the new engineer sees an inconsistent architecture and cannot determine which inconsistencies are intentional and which are technical debt that should be addressed. Those sessions exist in the AI chat history of the two principal engineers who drove the decomposition strategy, not in the service registry that lists the extracted services.
Further reading
- Microservices vs monolith decision record — the foundational decision about whether to adopt a distributed architecture from the start or build a monolith and decompose when the pain becomes visible determines the conditions under which the decomposition decision is made; teams that start with a monolith and decompose when the pain is visible make the boundary identification decision with 2–3 years of production data about which code changes together and which team boundaries create friction — data that informs better boundary decisions than the theoretical domain model a greenfield microservices team must work from; the monolith decomposition ADR and the microservices vs monolith ADR are complementary — one documents why the team chose the monolith-first approach, the other documents how the team executes the decomposition once the monolith's cost exceeds its benefits.
- Database migration strategy decision record — the database migration decisions about schema evolution approaches, backward compatibility windows, and zero-downtime migration patterns are prerequisite capabilities for the database decomposition stages; each stage of the shared database decomposition requires migrations executed in a way that the existing services — including the monolith during the transition — can continue to operate without downtime; the expand-contract migration pattern (add the new schema element, migrate consumers to use it, then remove the old element in a subsequent migration) applies at the cross-service level during decomposition as well as the within-service level during schema evolution; teams that have not built zero-downtime migration infrastructure before beginning a monolith decomposition will discover that their decomposition stages require coordination windows that make the extraction slower and riskier than teams that have established migration discipline first.
- API versioning decision record — the inter-service API contracts established during extraction are the first versioned contracts the team will need to maintain indefinitely; the API versioning decisions about backward compatibility, breaking change management, and deprecation windows apply to internal service-to-service APIs as well as external customer-facing APIs; teams that do not apply versioning discipline to internal APIs find that a service evolution in one extracted service propagates as a breaking change to other services that depend on it, requiring coordinated deployments that defeat the purpose of independent deployability; the monolith decomposition ADR should specify the versioning model for each inter-service API established during extraction, including the minimum backward compatibility window (determined by the extraction sequence — the anti-corruption layer's lifetime establishes the minimum compatibility requirement), the breaking change deprecation policy, and the consumer-driven contract testing approach that lets each service verify its API contract without requiring all consumers to run simultaneously in the test environment.
- Event-driven architecture decision record — the decision about which inter-service interactions to implement as synchronous REST calls versus asynchronous events is part of the event-driven architecture ADR, not a purely technical implementation choice made ad hoc per integration; the synchronous vs asynchronous classification for each call path — determined by whether the caller requires the response to complete its own operation, whether the interaction is in a user-critical latency path, and whether the downstream service's failures should propagate to the caller — is the content of the inter-service communication model section of the decomposition ADR, and the event-driven architecture ADR provides the event schema design, event versioning, and event storage decisions that the asynchronous paths depend on; the monolith decomposition ADR and the event-driven architecture ADR should be written and reviewed together, because the inter-service communication model decisions in the decomposition ADR set the requirements that the event-driven architecture ADR must satisfy.
- Service ownership model decision record — each extracted service needs an owner before it goes to production: an on-call team, a maintenance commitment, a feature development roadmap, and a deprecation authority that can decide when the service's contract can change; the monolith had a single on-call rotation with implicit ownership of all domains; the distributed system has N per-service rotations that must be explicitly staffed; teams that extract services without simultaneously defining service ownership and staffing the on-call rotation find that newly extracted services have implicit shared ownership — everyone and no one is responsible — leading to slower incident response, slower feature development, and an operational regression relative to the monolith that the architecture diagram does not reveal; the service ownership model ADR documents which team owns which service, what ownership means operationally (on-call obligation, SLO accountability, deprecation authority), and how ownership transfers when teams reorganize — decisions that the decomposition ADR's migration governance model depends on for each extraction stage.
- Open-source extractor — the reasoning behind monolith decomposition decisions lives in AI chat sessions: the initial boundary identification session where the team worked through the git change frequency data and identified which modules changed together and which changed independently, the data ownership analysis session where specific table names were walked through one by one and their write paths mapped to identify ownership and ambiguity, the extraction sequence session where the team debated whether to start with the simpler notification service or the more painful billing service given the compliance deadline, the inter-service communication model session where individual call paths were classified as synchronous-required or asynchronous-appropriate based on whether the caller could proceed without the downstream response; these are the conversations that contain the reasoning the new engineer needs to understand why the monolith decomposition looks the way it does — which inconsistencies are intentional (the notification service uses a message queue because a cascade failure from notification dispatch to workflow engine was explicitly considered unacceptable) and which are legacy debt (the customer table is still in the shared schema because the ownership analysis produced ambiguous results that were never resolved); running those sessions through the extractor produces the monolith decomposition decision record that makes the distributed architecture legible as a set of deliberate decisions rather than a set of consequences that accumulated without explicit trade-off analysis.