Composable Architecture for Legacy Systems: Strangler Fig Routing, Anti-Corruption Layers and Data Coexistence Patterns

Jason Walisser
Jason Walisser
Principal Consultant, Integrations
16 min read

A pricing team asks for one change: tiered discounts by customer segment. Delivering it means editing a 15-year-old ERP stored procedure, adding a field to a nightly fixed-width SFTP file that two downstream systems parse by column position, and patching three point-to-point connectors that each reimplement the discount logic. The regression cycle takes two weeks. Composable architecture for legacy systems is the discipline of pulling that pricing capability out from behind those dependencies without a big-bang rewrite.

The problem is common. MuleSoft’s 2026 Connectivity Benchmark Report, a survey of 1,050 IT leaders, found that the average organization manages 957 applications and that on average only 27 percent of them are connected. This article shows how to find the first seam, build the routing facade, translate legacy semantics, keep data consistent during coexistence, verify parity, set cutover gates and recognize when composability is not worth the cost.

What Composable Architecture Means at the Integration Layer

At the integration layer, composable architecture means every business capability is exposed through a stable contract, deployed without coordinating releases with its neighbors, and replaceable without its consumers noticing. If replacing your pricing engine requires changes in the order system, the warehouse feed and the CRM sync, the estate is integrated but not composable. The test is replaceability, not the number of APIs you publish.

The unit of composition is usually a packaged business capability. A PBC is something a business user recognizes, such as pricing, customer credit or shipment tracking, and it carries its own data, logic and process. A microservice is a technical unit and can be much smaller; a pricing PBC might contain a rules service, a price list service and a cache. Govern PBC boundaries as contracts and treat microservice boundaries as an internal implementation choice.

MACH (microservices, API-first, cloud-native, headless) is one vendor-side definition of the idea, useful as a reference but not a prerequisite. Composability at the integration layer requires neither SaaS nor a headless front end. A capability API in front of an on-premises ERP module, with a clean contract and its own deployment pipeline, is composable even if the system behind it is 20 years old.

In a McKinsey interview on composable tech stacks published in June 2025, Conscia.ai CEO Sana Remekie described composability as a spectrum rather than an all-or-nothing decision, so you choose which capabilities to decompose and leave the rest alone. Treat the often-quoted Gartner figure carefully. In 2020, Gartner predicted that organizations adopting a composable approach would outpace competitors by 80 percent in speed of new feature implementation; that was a prediction, not a measured result, and it should not anchor a business case.

Why Legacy Estates Resist Decomposition

The constraints are physical, not philosophical. Legacy systems that resist decomposition usually share several of these traits:

  • No API surface, leaving only database access, file drops or screen automation.
  • Shared-database coupling, where five applications write the same customer and order tables.
  • Business rules in stored procedures and triggers, so a write from a new component skips logic the legacy UI would fire.
  • Batch windows and temporal coupling, where job C assumes job B finished and job B assumes the SFTP file arrived by 2:00 a.m.
  • Fixed-width and EBCDIC files with packed decimals that break silently when a column shifts.
  • Vendor license terms that restrict direct database reads, ruling out the technique you planned to use.

Accumulated point-to-point connectors complete the picture. Each encodes undocumented assumptions about formats, retries and timing, and removing one often breaks a consumer nobody knew existed. The tradeoffs between point-to-point and hub-and-spoke integration models explain why that coupling compounds with every new connector.

The cost shows up in delivery data. MuleSoft’s 2026 benchmark found that IT teams spend an average of 36 percent of their time designing, building and testing new custom integrations, and that on average 26 percent of IT projects were not delivered on time in the prior 12 months. Decomposition does not remove that work, but it moves it: connectivity gets built once per capability instead of once per project.

Mapping Capabilities and Finding the Seams

Start with a capability map, not a system map. List the capabilities the estate supports, such as quote, price, order capture, invoicing and credit check, then record which systems implement each one, including partial implementations hiding in connectors and spreadsheets. A capability implemented in three places is usually both your highest risk and your highest return.

Next, build an entity ownership matrix that records, for each core entity, which system is the system of record in each migration phase. Phase 0 might show the ERP owning price; phase 2 might show the new pricing capability owning price while the ERP still owns order. This matrix drives write routing, synchronization direction and conflict resolution, so version and review it like code.

Evaluate candidate seams against five criteria:

  • Change frequency: how often the business asks for changes.
  • Read versus write ratio: read-heavy capabilities carry far less consistency risk.
  • Transactional boundaries: whether writes must commit atomically with other entities.
  • Downstream consumer count: every consumer is a migration task and a sign-off.
  • Coupling to shared tables: how many other applications touch the same tables.

The best first slice has high change frequency, is read heavy, has low write coupling and few consumers. Price lookup, product availability and customer status inquiries usually fit. Order capture, which spans inventory, credit and fulfillment in one transaction, almost never does.

This phase must produce a capability inventory, the entity ownership matrix and an interface catalog listing every interface with its protocol, frequency, volume and owner. The interface with no named owner is the one that breaks at cutover. A structured approach to auditing your integration estate produces most of that catalog before decomposition starts.

Building the Routing Facade with the Strangler Fig Pattern

The strangler fig pattern places a facade in front of the legacy system and moves traffic to new capabilities one route at a time. Host it in an API gateway when consumers call HTTP endpoints, in an integration platform when they depend on mediated flows, files or messages, or in a reverse proxy for web traffic. Put it where consumers already connect, so the migration does not also require changing every client.

Routing strategies range from coarse to fine: path routing moves a whole resource, header or tenant routing sends a pilot group first, percentage routing supports canaries, and feature-flag routing lets operations change routing without a deployment. Shadow traffic sends a copy of live read requests to the new capability and logs the comparison; never shadow writes unless the new component runs against an isolated store. Every route needs a fallback to legacy, triggered by timeout or circuit breaker.

routes:
  - id: pricing-read
    match:
      path_prefix: /api/v1/prices
      methods: [GET]
    rules:
      - when: { header: X-Tenant-Id, in: [tenant-014, tenant-022] }
        target: pricing-capability
      - when: { flag: pricing_canary }
        target: pricing-capability
        weight_percent: 10
    default_target: legacy-erp-adapter
    shadow: { target: pricing-capability, sample_percent: 25 }
    timeout_ms: 1500
    retries: 0
    circuit_breaker:
      error_rate_percent: 5
      window_seconds: 60
      open_seconds: 30
      fallback_target: legacy-erp-adapter
  - id: pricing-write
    match:
      path_prefix: /api/v1/prices
      methods: [POST, PUT, PATCH]
    default_target: legacy-erp-adapter

The configuration is gateway-neutral. Writes stay on legacy until the ownership matrix moves price, and retries are disabled so a slow new capability does not double its own load.

The Strangler Fig pattern in the Azure Architecture Center describes the facade as transitional architecture that is typically removed after migration. Design it that way from day one, with route definitions in version control and a planned removal date per route. The AWS Prescriptive Guidance on the strangler fig pattern warns that the proxy layer can become a single point of failure or a performance bottleneck, which in production shows up as facade timeouts during batch peaks.

Keep the facade stateless so it scales horizontally. Set route timeouts shorter than the consumer’s own timeout and apply circuit breakers per route. Above all, keep business logic out of the facade; once it transforms payloads or applies rules, it becomes a second monolith you cannot retire.

Anti-Corruption Layers and Contract Design

The facade decides where a request goes; the anti-corruption layer decides what it means. It translates between the legacy model and the new capability’s model so legacy concepts never leak into new code:

  • Data model, such as a flattened 200-column record into a nested resource.
  • Semantics, where status 3 means on hold pending credit review.
  • Error codes, from return codes and SQL states to typed API errors.
  • Identifiers, through a legacy-to-global key cross-reference.
  • Time zones, since many legacy systems store server-local time without offsets.
  • Code tables for country, unit of measure and tax category.

Host the ACL as its own deployable component, in the integration platform or as a thin adapter beside the legacy system, never inside the new capability. Microsoft’s guidance on the Anti-corruption Layer pattern notes that the layer can add latency, is an additional service to maintain, and should be designated permanent or retired up front. Record that call per ACL: one shielding an ERP you will keep for a decade is permanent, while one that exists until consumers move needs a retirement date.

The harder decision is the model itself. An enterprise-wide canonical data model reduces translations but becomes a governance bottleneck when every team must agree on every field. Bounded-context models let each capability own its contract at the cost of more mappings. A workable middle path is a thin canonical core for identifiers and reference data, with bounded-context models elsewhere.

Contract-first design keeps the ACL honest. Define synchronous interfaces in OpenAPI and event interfaces in AsyncAPI before writing translation code, version them explicitly, and run consumer-driven contract tests with Pact so a provider change fails the build before it fails a consumer. The practices for handling API changes without breaking the integration layer apply directly to capability contracts.

Keeping Data Consistent While Legacy and New Components Coexist

Most decompositions that fail, fail here. During coexistence the same entity lives in two systems, consumers read from both, and writes can originate in either. The goal is a defined source of truth per entity per phase, eventual consistency within known bounds, and a reliable way to detect drift.

Why Dual Writes Fail

Writing to the legacy database and the new service from the same application code breaks on the first partial failure. If the second write fails after the first commits, the systems diverge silently; if you retry, ordering can invert. Route each write to the current system of record and propagate it asynchronously.

Propagating Changes in Both Directions

While legacy owns an entity, use log-based change data capture against its transaction log. Log-based CDC captures writes made by stored procedures, triggers and the legacy UI, which application hooks miss, and adds far less load than polling. Check license terms first; some prohibit log readers too.

Once the new capability owns an entity, use the transactional outbox: the service writes business data and an event row in the same local transaction, and a relay publishes the row. The Debezium outbox event router is the reference implementation, reading outbox rows through CDC and routing them by aggregate type.

CREATE TABLE outbox (
  id            UUID          PRIMARY KEY,
  aggregatetype VARCHAR(64)   NOT NULL,
  aggregateid   VARCHAR(64)   NOT NULL,
  type          VARCHAR(128)  NOT NULL,
  payload       JSONB         NOT NULL,
  origin        VARCHAR(32)   NOT NULL,
  created_at    TIMESTAMP     NOT NULL DEFAULT CURRENT_TIMESTAMP
);

The origin column travels as a message header through the router’s additional field configuration. Consumers must be idempotent, deduplicating on the outbox id or a business idempotency key. Partition on aggregateid in Kafka or an equivalent broker so updates to the same price never apply out of order.

Consumers that still poll see a wider consistency window than event subscribers, and the tradeoffs between event-driven architecture versus request-response determine which consumers can tolerate that lag.

Reverse Sync and Loop Prevention

Unmigrated consumers still read from legacy, so changes owned by the new capability must flow back through a reverse synchronization adapter. That creates the classic sync loop: the service publishes a change, the adapter writes it to legacy, CDC captures it and publishes it back. Prevent this with origin tagging, so each adapter drops events that originated on its own side. Where legacy cannot store an origin field, cache propagated writes by entity and version and suppress their CDC echoes.

Reconciliation

Drift still happens when a connector restarts from the wrong offset or a batch job overwrites a field. Schedule reconciliation jobs that compare entity hashes across systems, with conflict rules defined in advance: the phase’s system of record wins, ties resolve by version, and anything else goes to a review queue. Publish the drift count as a metric; it becomes a cutover gate.

Pattern Problem It Solves Where It Runs Retire After Migration
Strangler fig facade Moves traffic route by route without changing clients API gateway, integration platform or reverse proxy Yes
Anti-corruption layer Stops legacy models and semantics leaking into new capabilities Integration platform or adapter beside legacy Decide per layer
Change data capture Publishes legacy-owned changes, including trigger writes Connector on the legacy transaction log Yes, once legacy owns nothing
Transactional outbox Publishes changes atomically with the business write Database of each new capability No, it stays with the service
Reconciliation job Detects and repairs drift between systems Scheduler in the integration platform Yes, after legacy shuts down

Building the Orchestration Layer from the Outside In

Remekie’s argument in the June 2025 McKinsey interview is that transformation should start with an abstraction and orchestration layer between front ends and back ends rather than with replacing back-office systems. Once consumers call capability-level APIs such as customer credit status instead of tables and files, you can swap what sits behind each API without touching them.

Orchestration, where a coordinator calls capabilities in sequence and manages compensation, suits processes that need a clear owner and a defined failure path, such as quote to order. Choreography, where capabilities react to each other’s events, suits loose reactions such as refreshing search indexes after a price change. The patterns in process integration architecture help decide which steps belong to which.

The failure mode is an orchestration layer that becomes the new monolith, usually when someone adds a discount rule to a flow because the pricing release is two weeks out. The orchestration layer sequences calls and composes responses; business rules stay inside the capabilities that own them. Flows with conditions on business data values usually contain a misplaced rule.

AI agents raise the stakes. In MuleSoft’s 2026 benchmark, 86 percent of IT leaders agreed that without proper integration, AI agents can add complexity rather than value. Agents calling capability-level APIs inherit the same contracts, authorization and observability as every other consumer; agents pointed at raw legacy tables inherit the coupling.

Observability, Parity Testing and Cutover Gates

Generate a correlation ID at the edge and propagate W3C trace context headers through the facade, the ACL, the broker and every legacy adapter, following OpenTelemetry context propagation conventions. File interfaces cannot carry headers, so write the trace ID into a control record or trailer; otherwise requests disappear at the first SFTP hop.

Parity testing runs on shadow traffic. Compare legacy and new responses field by field after normalizing known differences such as timestamp precision, then classify mismatches by cause. A mismatch rate that does not trend toward zero usually points to an undocumented stored procedure rule, which you want to find before cutover. Pair this with a drift dashboard per entity.

Define cutover gates before the slice starts:

  • Error rate at or below the legacy baseline across a full business cycle, including month end.
  • p95 latency within budget under peak load.
  • Reconciliation drift below a fixed threshold for a defined period.
  • Sign-off from every consumer in the interface catalog.

Tie each gate to an alert using sound alerting thresholds for integrations. Rollback is a routing flip through the flag or configuration, not a redeployment; if rollback needs a deployment, the cutover is not ready.

Decommissioning the Legacy Component

Skipping steps here leaves orphaned consumers that fail weeks later when a nightly file stops arriving.

  • Migrate the remaining consumers, using traffic logs to find the ones nobody listed.
  • Remove facade routes and watch for requests still hitting the legacy target.
  • Retire transitional anti-corruption layers and reverse synchronization adapters.
  • Confirm historical data sits in a retention store, archived incrementally during migration rather than at the end.
  • Reduce licenses and infrastructure, then remove the legacy database.

Keep legacy read-only for one audit cycle before the final step. If a capability keeps failing parity after repeated fixes, question whether to decompose it at all; the criteria for rebuilding versus fixing a failing integration apply to legacy components as well.

When Composable Architecture for Legacy Systems Is the Wrong Decision

Small estates with low change rates rarely recover the cost of a facade, ACLs, CDC pipelines and reconciliation jobs. Teams without platform operations maturity, meaning no on-call for integration infrastructure and no distributed tracing, will create more outages than they prevent. When transitional infrastructure must run for years because legacy cannot retire, the overhead can exceed the benefit.

Remekie noted in the 2025 McKinsey interview that businesses above roughly 250 million dollars in annual revenue should be well into composable transformation, while midmarket firms often opt for ready-made integrations. Check API maturity too: the 2025 Postman State of the API Report found that 82 percent of organizations have adopted some level of API-first development, but only 25 percent operate as fully API-first.

Conclusion

Composable architecture for legacy systems is a sequence of decisions, not a platform purchase. Map capabilities and entity ownership, cut the first seam where change is frequent and writes are few, route through a facade you plan to remove, translate in an anti-corruption layer, synchronize with change data capture and an outbox under explicit ownership rules, verify parity and drift, cut over against fixed gates, then decommission in order.

When your estate needs capability APIs, legacy adapters or synchronization components built to production standards, specialists in custom integration development can take on the slices your internal team cannot staff. Start with one read-heavy capability, measure it honestly, and let those results decide the second slice.

 

;