{"id":"6b09a4bdff996234422a2724","slug":"sa-migrations-as-is-to-be","title":"AS-IS → TO-BE migration without downtime: transitional architecture, strangler fig and CDC","summary":"How to move a shop's critical system from an old platform to a new one without stopping sales: transitional architecture, the strangler fig pattern, feature flags and shadow mode, dual write versus CDC, data migration and reconciliation, a plan for retiring the old system, risks and rollback – using a 2009 order and warehouse system as the example.","servedLang":"en","availableLangs":["pl","en"],"topics":["solution-architecture","microservices","event-driven-architecture","modular-monolith"],"techs":["typescript","java","dotnet"],"tags":["solution-architect","migration","legacy","strangler-fig","feature-flags","cdc","debezium","dual-write","transitional-architecture","decommissioning"],"level":"advanced","kind":"article","access":"members","status":"published","cover":null,"author":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","community":false},"readingMinutes":17,"stats":{"views":1,"likes":0,"bookmarks":0,"comments":0},"publishedAt":"2026-11-27T15:41:49.244Z","updatedAt":"2026-11-27T17:34:36.308Z","requestedLang":"en","theme":{"hero":"classic","heroMedia":null,"accent":"teal","background":"hex","weaveResources":true,"toc":"right"},"seoDescription":"Legacy migration without downtime: AS-IS and TO-BE, transitional architecture, strangler fig, feature flags (OpenFeature), shadow traffic, dual write vs CDC (Debezium, MySQL), outbox, data migration and reconciliation, decommissioning plan, rollback and point of no return, the big-bang lesson.","wordCount":3327,"doc":{"type":"doc","content":[{"type":"paragraph","content":[{"type":"text","text":"OrderFlow is live: web orders confirmed in a second, no overselling, happy customers. Except that next to it the old shop platform is still running – a PHP monolith on MySQL from 2009, once bought from a vendor and extended over the years so much that at Bazario nobody calls it anything but "},{"type":"text","text":"Kombajn","marks":[{"type":"bold"}]},{"type":"text","text":" (Polish for \"combine harvester\"). It handles orders from older versions of the mobile app, from the B2B channel and from the old API for large sellers, plus returns, commission settlements with sellers and a nightly batch that feeds the ERP, invoices and exports to carriers. The board asks: \"When do we switch Kombajn off?\". Ola answers: \"In two years. And without closing the shop for even an hour.\""}]},{"type":"callout","attrs":{"variant":"tip","title":"In short"},"content":[{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Transitional architecture","marks":[{"type":"bold"}]},{"type":"text","text":" is a first-class design, not a temporary \"we'll manage somehow\" state: a facade in front of the old system, a stream of changes from its database, and reverse synchronisation that lets you roll back."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Strangler fig","marks":[{"type":"bold"}]},{"type":"text","text":" replaces a system piece by piece. Feature flags route traffic to the new system percent by percent, and shadow mode compares results before a customer sees anything new."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Data moves through "},{"type":"text","text":"CDC","marks":[{"type":"bold"}]},{"type":"text","text":", not dual writes, and is "},{"type":"text","text":"reconciled daily","marks":[{"type":"bold"}]},{"type":"text","text":". Rollback is possible only until an explicitly announced point of no return – and switching off the old system has a date and a budget in the plan."}]}]}]}]},{"type":"stats","attrs":{"items":[{"value":"2004","label":"\"Strangler fig\"","hint":"Martin Fowler names the pattern after the strangler figs he saw in Queensland, Australia"},{"value":"4 steps","label":"of an online migration at Stripe","hint":"dual writing, switching reads, switching writes, removing old data"},{"value":"~$100M","label":"of Hershey orders unfulfilled (1999)","hint":"after a big-bang rollout of new systems just before Halloween"}]}},{"type":"heading","attrs":{"level":2,"id":"big-bang-or-piece-by-piece"},"content":[{"type":"text","text":"Big bang or piece by piece"}]},{"type":"paragraph","content":[{"type":"text","text":"A big-bang migration looks tempting: one weekend, one switchover, no more double maintenance. The problem is that everything changes at once – code, data, integrations, processes and people's habits. And once the new system accepts its first orders, going back is no longer simple."}]},{"type":"callout","attrs":{"variant":"warning","title":"Real world: Hershey, 1999"},"content":[{"type":"paragraph","content":[{"type":"text","text":"In July 1999 the confectioner Hershey switched on a new ERP system, supply chain planning and customer service all at once – big bang, right before Halloween, its most important season. Orders got stuck in the systems and goods in the warehouses. The company failed to deliver orders worth about 100 million dollars on time, and its share price dropped noticeably. The lesson for an architect: the bigger the step and the worse the timing, the fewer options you have when something goes wrong."}]}]},{"type":"paragraph","content":[{"type":"text","text":"A gradual migration costs more calendar time, but every step is small, measurable and reversible."}]},{"type":"heading","attrs":{"level":2,"id":"as-is-to-be-and-transitional-architecture"},"content":[{"type":"text","text":"AS-IS, TO-BE and transitional architecture"}]},{"type":"paragraph","content":[{"type":"text","text":"In the HLD Ola describes three states, not two:"}]},{"type":"bulletList","content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"AS-IS","marks":[{"type":"bold"}]},{"type":"text","text":" – what exists: Kombajn, its database, the batch and all the integrations, including the ones nobody remembers."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"TO-BE","marks":[{"type":"bold"}]},{"type":"text","text":" – the target state: OrderFlow (orders, payments, reservations) plus new returns and seller settlement services, Kafka and PostgreSQL."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Transitional architecture","marks":[{"type":"bold"}]},{"type":"text","text":" – what we build only for the duration of the migration and then throw away: the facade, the change stream, the anti-corruption layer and reverse synchronisation."}]}]}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart LR\n  b2b([\"B2B channel and seller API\"]) --> facade\n  web([\"Web shop and app\"]) --> facade\n  facade{{\"Facade: routing per feature and customer segment, flags\"}}\n  subgraph legacy[\"AS-IS: Kombajn from 2009\"]\n    lapp[\"App: PHP monolith\"]\n    ldb[(\"MySQL: orders, returns, settlements\")]\n    batch[\"Nightly batch: ERP, invoices, carriers\"]\n    lapp --> ldb --> batch\n  end\n  subgraph tobe[\"TO-BE: OrderFlow and new services\"]\n    ord[\"OrderFlow: orders, payments, reservations\"]\n    wh[\"Seller settlements\"]\n    ret[\"Returns\"]\n    pg[(\"PostgreSQL\")]\n    ord & wh & ret --> pg\n  end\n  facade -- \"features still in legacy\" --> lapp\n  facade -- \"migrated features\" --> ord\n  ldb -- \"CDC: Debezium\" --> kafka[[\"Kafka\"]]\n  kafka --> acl[\"Anti-corruption layer: model translation\"]\n  acl --> wh\n  ord -. \"reverse sync during the transition\" .-> lapp","caption":"Transitional architecture: the facade routes traffic, CDC carries changes from the old database, and reverse sync keeps rollback possible"}},{"type":"paragraph","content":[{"type":"text","text":"Transitional elements cost money, so they go into the estimate and the plan like any other component. The most important one is the "},{"type":"text","text":"anti-corruption layer","marks":[{"type":"bold"}]},{"type":"text","text":" (a DDD term). The Kombajn model – tables like "},{"type":"text","text":"ZAM_NAGL","marks":[{"type":"code"}]},{"type":"text","text":", statuses \"3\" and \"7\", gross prices stored as text with a decimal comma – must not leak into the new services. A translator at the boundary turns it into events in Bazario's domain language."}]},{"type":"heading","attrs":{"level":2,"id":"strangler-fig-slice-by-slice"},"content":[{"type":"text","text":"Strangler fig: slice by slice"}]},{"type":"paragraph","content":[{"type":"text","text":"In 2004 Martin Fowler compared the gradual replacement of a system to a strangler fig. The plant sprouts in the branches of a tree, sends roots down to the ground and over the years wraps around the trunk until the old tree dies and the fig stands on its own. In a system, the role of the vines is played by a facade that takes over traffic feature by feature:"}]},{"type":"diagram","attrs":{"kind":"mermaid","code":"flowchart TB\n  subgraph e0[\"Stage 0 – AS-IS\"]\n    direction LR\n    c0([\"Channels\"]) --> l0[\"Kombajn: 100% of features\"]\n  end\n  subgraph e1[\"Stage 1 – facade, no change for customers\"]\n    direction LR\n    c1([\"Channels\"]) --> f1{{\"Facade\"}} --> l1[\"Kombajn\"]\n  end\n  subgraph e2[\"Stage 2 – first slices\"]\n    direction LR\n    c2([\"Channels\"]) --> f2{{\"Facade\"}}\n    f2 -- \"cart quotes, web orders\" --> n2[\"OrderFlow\"]\n    f2 -- \"everything else\" --> l2[\"Kombajn\"]\n  end\n  subgraph e3[\"Stage 3 – most of it in the new system\"]\n    direction LR\n    c3([\"Channels\"]) --> f3{{\"Facade\"}}\n    f3 -- \"app orders, returns\" --> n3[\"OrderFlow and new services\"]\n    f3 -- \"B2B channel, settlements\" --> l3[\"Kombajn\"]\n  end\n  subgraph e4[\"Stage 4 – TO-BE\"]\n    direction LR\n    c4([\"Channels\"]) --> n4[\"OrderFlow and new services\"]\n    n4 -. \"historical queries\" .-> a4[(\"Archive: read-only\")]\n  end\n  e0 --> e1 --> e2 --> e3 --> e4","caption":"Strangler fig at Bazario: the facade takes over traffic and the new services replace Kombajn piece by piece"}},{"type":"paragraph","content":[{"type":"text","text":"How do you choose the order of slices? Ola rates each feature on three axes: "},{"type":"text","text":"value","marks":[{"type":"bold"}]},{"type":"text","text":" (what the customer or the business gains), "},{"type":"text","text":"coupling","marks":[{"type":"bold"}]},{"type":"text","text":" (how many other features and tables it touches) and "},{"type":"text","text":"risk","marks":[{"type":"bold"}]},{"type":"text","text":" (money, invoices, contracts with sellers). High-value, low-coupling features go first. The cart quote – prices, discounts, VAT and delivery cost – is ideal: lots of traffic, read-only, zero impact on accounting. Commission settlements with sellers and the B2B channel go last. You can also slice by channel (web shop first, then B2B) or by customer segment (employees first, then 5% of customers)."}]},{"type":"chart","attrs":{"type":"area","title":"Share of traffic served by Kombajn and OrderFlow","caption":"Illustrative data for a 24-month plan. Note the tail: the last 10% of traffic (the B2B channel and settlements) takes as long as the first 50%.","unit":"% of requests","stacked":true,"data":{"labels":["M0","M3","M6","M9","M12","M15","M18","M21","M24"],"series":[{"name":"OrderFlow and new services","values":[0,5,20,35,55,75,90,100,100]},{"name":"Kombajn","values":[100,95,80,65,45,25,10,0,0]}]}}},{"type":"heading","attrs":{"level":2,"id":"feature-flags-and-shadow-mode"},"content":[{"type":"text","text":"Feature flags and shadow mode"}]},{"type":"paragraph","content":[{"type":"text","text":"The facade routes requests based on "},{"type":"text","text":"feature flags","marks":[{"type":"bold"}]},{"type":"text","text":". In an article on Martin Fowler's site, Pete Hodgson divides them into four kinds: release, experiment, ops and permissioning toggles. A migration mostly uses the first two, plus ops flags as an emergency switch."}]},{"type":"paragraph","content":[{"type":"text","text":"Ola uses three techniques at once:"}]},{"type":"orderedList","attrs":{"start":1},"content":[{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Gradual rollout","marks":[{"type":"bold"}]},{"type":"text","text":" – a flag with a percentage of customers (1% → 5% → 25% → 100%), computed from a stable key, the customer ID. That way the same customer doesn't jump between systems."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Shadow mode","marks":[{"type":"bold"}]},{"type":"text","text":" ("},{"type":"text","text":"shadow traffic","marks":[{"type":"italic"}]},{"type":"text","text":", "},{"type":"text","text":"parallel run","marks":[{"type":"italic"}]},{"type":"text","text":") – the facade answers from the old system, but in the background also asks the new one and compares the results. GitHub popularised this approach with its Scientist library. Discrepancies show up in metrics before the new system serves its first customer."}]}]},{"type":"listItem","content":[{"type":"paragraph","content":[{"type":"text","text":"Instant fallback","marks":[{"type":"bold"}]},{"type":"text","text":" – switching the flag off sends traffic back to Kombajn within seconds, without a deployment."}]}]}]},{"type":"paragraph","content":[{"type":"text","text":"An example: the cart quote. The code uses OpenFeature – an open standard for flag APIs that works with different providers:"}]},{"type":"codeGroup","attrs":{"title":"Facade: a percentage-of-customers flag and shadow mode"},"content":[{"type":"codeBlock","attrs":{"language":"typescript","filename":"facade/quote-routing.ts"},"content":[{"type":"text","text":"import { OpenFeature } from \"@openfeature/server-sdk\";\nimport { legacy, pricing } from \"./clients\";\nimport { logger, metrics } from \"./telemetry\";\nimport type { Quote } from \"./model\";\n\n// Strangler facade: decides per request whether the new pricing service or legacy Kombajn answers.\nconst flags = OpenFeature.getClient(\"checkout-facade\");\n\nexport async function getQuote(cartId: string, customerId: string): Promise<Quote> {\n  const ctx = { targetingKey: customerId }; // stable bucket for percentage rollouts\n  if (await flags.getBooleanValue(\"quotes-from-new-pricing\", false, ctx)) {\n    return pricing.getQuote(cartId);\n  }\n\n  const result = await legacy.getQuote(cartId);\n  // Shadow mode: ask the new system too and compare, but always answer with legacy.\n  if (await flags.getBooleanValue(\"quotes-shadow-compare\", false, ctx)) {\n    void pricing.getQuote(cartId)\n      .then((candidate) => compare(cartId, result, candidate))\n      .catch(() => metrics.increment(\"shadow.error\", { feature: \"quote\" }));\n  }\n  return result;\n}\n\nfunction compare(cartId: string, expected: Quote, actual: Quote): void {\n  // Amounts are integers in minor units (grosze) – never compare money as floats.\n  const same = expected.totalMinor === actual.totalMinor &&\n    expected.deliveryMinor === actual.deliveryMinor &&\n    expected.lines.length === actual.lines.length &&\n    expected.lines.every((line, i) =>\n      line.sku === actual.lines[i].sku && line.totalMinor === actual.lines[i].totalMinor);\n  metrics.increment(same ? \"shadow.match\" : \"shadow.mismatch\", { feature: \"quote\" });\n  if (!same) logger.warn({ feature: \"quote\", cartId }, \"shadow mismatch\"); // IDs only, no personal data\n}"}]},{"type":"codeBlock","attrs":{"language":"java","filename":"facade/QuoteRouter.java"},"content":[{"type":"text","text":"package pl.bazario.facade;\n\nimport dev.openfeature.sdk.Client;\nimport dev.openfeature.sdk.ImmutableContext;\nimport dev.openfeature.sdk.OpenFeatureAPI;\nimport java.util.concurrent.CompletableFuture;\nimport java.util.concurrent.Executor;\nimport org.springframework.stereotype.Service;\n\n// Strangler facade: per-customer routing between legacy Kombajn and the new pricing service.\n@Service\npublic class QuoteRouter {\n    private final Client flags = OpenFeatureAPI.getInstance().getClient(\"checkout-facade\");\n    private final LegacyClient legacy;\n    private final PricingClient pricing;\n    private final ShadowComparator comparator;\n    private final Executor shadowPool; // bounded pool: shadow traffic must never starve real requests\n\n    public QuoteRouter(LegacyClient legacy, PricingClient pricing,\n                       ShadowComparator comparator, Executor shadowPool) {\n        this.legacy = legacy;\n        this.pricing = pricing;\n        this.comparator = comparator;\n        this.shadowPool = shadowPool;\n    }\n\n    public Quote quote(String cartId, String customerId) {\n        var ctx = new ImmutableContext(customerId); // targeting key → stable percentage bucket\n        if (flags.getBooleanValue(\"quotes-from-new-pricing\", false, ctx)) {\n            return pricing.quote(cartId);\n        }\n        Quote result = legacy.quote(cartId);\n        if (flags.getBooleanValue(\"quotes-shadow-compare\", false, ctx)) {\n            CompletableFuture.supplyAsync(() -> pricing.quote(cartId), shadowPool)\n                    .thenAccept(candidate -> comparator.compare(\"quote\", cartId, result, candidate))\n                    .exceptionally(err -> { comparator.error(\"quote\", err); return null; });\n        }\n        return result;\n    }\n}"}]},{"type":"codeBlock","attrs":{"language":"csharp","filename":"Facade/QuoteRouter.cs"},"content":[{"type":"text","text":"using OpenFeature;\nusing OpenFeature.Model;\n\n// Strangler facade: per-customer routing between legacy Kombajn and the new pricing service.\npublic sealed class QuoteRouter(ILegacyClient legacy, IPricingClient pricing, ShadowComparator comparator)\n{\n    private readonly FeatureClient _flags = Api.Instance.GetClient(\"checkout-facade\");\n\n    public async Task<Quote> GetQuoteAsync(string cartId, string customerId, CancellationToken ct)\n    {\n        // Targeting key → stable bucket, so a customer doesn't jump between systems.\n        var ctx = EvaluationContext.Builder().SetTargetingKey(customerId).Build();\n        if (await _flags.GetBooleanValueAsync(\"quotes-from-new-pricing\", false, ctx))\n            return await pricing.GetQuoteAsync(cartId, ct);\n\n        var result = await legacy.GetQuoteAsync(cartId, ct);\n        if (await _flags.GetBooleanValueAsync(\"quotes-shadow-compare\", false, ctx))\n        {\n            // Fire-and-forget shadow call: it never delays or breaks the customer's request.\n            _ = Task.Run(async () =>\n            {\n                try\n                {\n                    var candidate = await pricing.GetQuoteAsync(cartId, CancellationToken.None);\n                    comparator.Compare(\"quote\", cartId, result, candidate);\n                }\n                catch (Exception ex) { comparator.Error(\"quote\", ex); }\n            });\n        }\n        return result;\n    }\n}"}]}]}]},"toc":[{"id":"big-bang-or-piece-by-piece","text":"Big bang or piece by piece","level":2,"locked":false},{"id":"as-is-to-be-and-transitional-architecture","text":"AS-IS, TO-BE and transitional architecture","level":2,"locked":false},{"id":"strangler-fig-slice-by-slice","text":"Strangler fig: slice by slice","level":2,"locked":false},{"id":"feature-flags-and-shadow-mode","text":"Feature flags and shadow mode","level":2,"locked":false},{"id":"data-synchronisation-dual-write-cdc-or-outbox","text":"Data synchronisation: dual write, CDC or outbox","level":2,"locked":true},{"id":"data-migration-step-by-step","text":"Data migration step by step","level":2,"locked":true},{"id":"the-plan-for-retiring-the-old-system","text":"The plan for retiring the old system","level":2,"locked":true},{"id":"risks-and-rollback","text":"Risks and rollback","level":2,"locked":true},{"id":"example-what-happened-at-kombajn","text":"Example: what happened at Kombajn","level":2,"locked":true},{"id":"trade-offs","text":"Trade-offs","level":2,"locked":true},{"id":"check-yourself","text":"Check yourself","level":2,"locked":true},{"id":"related-topics","text":"Related topics","level":2,"locked":true}],"locked":true,"paywall":null,"previewRatio":0.3,"totalBlocks":53,"visibleBlocks":23,"resources":[{"id":"6b0857be3c96f2d34d0b41fb","type":"article","provider":"web","url":"https://martinfowler.com/bliki/StranglerFigApplication.html","embedUrl":null,"title":"bliki: Strangler Fig","description":"Inspired by the strangler figs in Australia, a strangler fig application gradually draws behavior out of its host legacy application","author":"Martin Fowler","thumbnailUrl":"https://martinfowler.com/bliki/images/stranglerApplication/11090068.jpg","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["martin-fowler","legacy-code"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":75,"verifiedAt":"2026-11-26T11:07:11.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857be3c96f2d34d0b421a","type":"article","provider":"web","url":"https://martinfowler.com/articles/patterns-legacy-displacement","embedUrl":null,"title":"Patterns of Legacy Displacement","description":"Patterns for the effective modernization of legacy software systems","author":"Martin Fowler","thumbnailUrl":"https://martinfowler.com/articles/patterns-legacy-displacement/card.png","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["martin-fowler","legacy-code"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":75,"verifiedAt":"2026-11-26T11:07:27.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857be3c96f2d34d0b420c","type":"article","provider":"web","url":"https://martinfowler.com/articles/feature-toggles.html","embedUrl":null,"title":"Feature Toggles (aka Feature Flags)","description":"Feature Flags can be categorized into several buckets; manage each appropriately. Smart implementation can help constrain complexity.","author":"Martin Fowler","thumbnailUrl":"https://martinfowler.com/articles/feature-toggles/overview-diagram.png","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["martin-fowler"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":75,"verifiedAt":"2026-11-26T11:07:20.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:59.965Z","updatedAt":"2026-11-26T16:00:59.965Z"},{"id":"6b0857b53c96f2d34d0b38ec","type":"article","provider":"web","url":"https://stripe.com/blog/online-migrations","embedUrl":null,"title":"Online migrations at scale","description":"Online payment processing for internet businesses. Stripe is a suite of payment APIs that powers commerce for businesses of all sizes.","author":"stripe.com","thumbnailUrl":null,"durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["hacker-news"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"hn","publishedAt":"2017-02-02T20:20:56.000Z","popularity":70,"verifiedAt":"2026-11-26T11:19:34.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:00:52.228Z","updatedAt":"2026-11-26T16:00:52.228Z"},{"id":"6b0857c43c96f2d34d0b46f8","type":"book","provider":"openlibrary","url":"https://openlibrary.org/works/OL21355484W","embedUrl":null,"title":"Monolith to Microservices","description":"","author":"Sam Newman","thumbnailUrl":"https://covers.openlibrary.org/b/id/12895074-L.jpg","durationSec":null,"lang":"en","topics":["monolith","microservices"],"techs":["general"],"tags":["book","software-architecture"],"price":"paid","featured":false,"featuredOrder":0,"packageName":null,"source":"openlibrary","publishedAt":"2019-01-01T00:00:00.000Z","popularity":38,"verifiedAt":"2026-11-26T11:00:08.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:07.480Z","updatedAt":"2026-11-26T16:01:07.480Z"},{"id":"6b0857c23c96f2d34d0b44f2","type":"article","provider":"web","url":"https://shopify.engineering/refactoring-legacy-code-strangler-fig-pattern","embedUrl":null,"title":"Refactoring Legacy Code with the Strangler Fig Pattern - Shopify","description":"There are strategies for reducing the size and responsibilities of large objects. Here’s one that worked for us at Shopify, an all-in-one commerce platform supporting over 1M merchants across the globe.","author":"Shopify Engineering","thumbnailUrl":"https://cdn.shopify.com/s/files/1/0779/4361/articles/remove_now-unused_code_from_codebase.jpg?v=1583951148","durationSec":null,"lang":"en","topics":[],"techs":["general"],"tags":["refactoring","legacy-code"],"price":"free","featured":false,"featuredOrder":0,"packageName":null,"source":"manual","publishedAt":null,"popularity":50,"verifiedAt":"2026-11-26T11:28:38.000Z","curated":false,"addedBy":"6b0857a15a2625e44ecaabe6","createdAt":"2026-11-26T16:01:04.995Z","updatedAt":"2026-11-26T16:01:04.995Z"}],"challenges":[{"id":"6b093dc291bd8fbaf2a0c8d8","slug":"payment-circuit-breaker","title":"Circuit breaker for a payment gateway","summary":"A circuit breaker with closed, open and half-open states, an injected clock, a trial-success threshold and a business-error filter – so a payment gateway outage does not take the whole shop down.","servedLang":"en","availableLangs":["pl","en"],"kind":"code","category":"architecture","status":"published","difficulty":"hard","topics":["circuit-breaker","microservices"],"techs":["typescript","javascript","python","dotnet","java","go"],"tags":["circuit-breaker","resilience","fault-tolerance","state-machine","payments"],"languages":["typescript","javascript","python","csharp","java","go"],"questionCount":null,"xp":40,"stats":{"attempts":0,"solves":0,"solutions":0,"comments":0},"solveRate":null,"publishedAt":"2026-11-27T08:22:26.251Z"},{"id":"6b093dc191bd8fbaf2a0c8d0","slug":"inventory-cqrs","title":"Inventory with CQRS – separate write and read models","summary":"Warehouse commands validated on their own write model, events on a bus and a projection building a read model with a low-stock report. The read model can be rebuilt from events alone.","servedLang":"en","availableLangs":["pl","en"],"kind":"code","category":"architecture","status":"published","difficulty":"medium","topics":["cqrs","event-driven-architecture"],"techs":["typescript","javascript","python","dotnet","java","go"],"tags":["cqrs","read-model","projection","events","inventory"],"languages":["typescript","javascript","python","csharp","java","go"],"questionCount":null,"xp":20,"stats":{"attempts":0,"solves":0,"solutions":0,"comments":0},"solveRate":null,"publishedAt":"2026-11-27T08:22:25.519Z"}],"attachments":[],"hasCode":true,"repoUrl":null,"series":[{"slug":"solution-architect-path","title":"How to become a Solution Architect","items":[{"slug":"solution-architecture","title":"Who is a Solution Architect? The role, its responsibilities and the career map","current":false},{"slug":"sa-daily-duties","title":"A day in the life of a Solution Architect: duties, rhythm and priorities","current":false},{"slug":"sa-requirements-and-nfr","title":"Requirements and NFRs: getting the numbers out of the business that actually shape the system","current":false},{"slug":"sa-hld-step-by-step","title":"HLD step by step: from a blank page to an approved architecture","current":false},{"slug":"hld-complete-example","title":"A complete HLD by example: the VoltGo charging network – document, diagrams, ADRs and tools","current":false},{"slug":"poc-guide","title":"PoC, spike, prototype, MVP – how to plan and run a PoC (with a working example)","current":false},{"slug":"sa-decisions-and-adr","title":"Architecture decisions and ADRs: how to choose, weigh trade-offs and record the “why”","current":false},{"slug":"sa-integrations-and-contracts","title":"Integrations and contracts: APIs, events and cross-team dependencies without surprises","current":false},{"slug":"sa-security-and-operations","title":"Security and operations in the design: STRIDE, OAuth2, SLOs and runbooks","current":false},{"slug":"sa-estimation-cost-tco","title":"Estimation, cost and TCO: what it costs and how many servers you really need","current":false},{"slug":"sa-governance-and-reviews","title":"Governance and reviews: how to defend a design in front of the Architecture Review Board","current":false},{"slug":"sa-migrations-as-is-to-be","title":"AS-IS → TO-BE migration without downtime: transitional architecture, strangler fig and CDC","current":true},{"slug":"sa-how-to-become","title":"How to become a Solution Architect: skills, path, interview and the first 90 days","current":false}]}],"prev":{"slug":"sa-governance-and-reviews","title":"Governance and reviews: how to defend a design in front of the Architecture Review Board"},"next":{"slug":"sa-how-to-become","title":"How to become a Solution Architect: skills, path, interview and the first 90 days"},"featured":false,"authorCard":{"id":"6b08bd2e80884893657cc8cf","name":"Redakcja Art of Devs","avatar":null,"handle":"redakcja","headline":"Wzorce projektowe · Architektura · AI i LLM","community":false,"reputation":{"points":3900,"level":{"key":"mentor","label":"Mentor"}},"articles":104,"skills":[{"key":"typescript","title":"TypeScript","level":5,"levelLabel":"Authority","articles":90},{"key":"dotnet","title":".NET","level":5,"levelLabel":"Authority","articles":61},{"key":"python","title":"Python","level":5,"levelLabel":"Authority","articles":59},{"key":"java","title":"Java","level":5,"levelLabel":"Authority","articles":46}]}}