Filed underL05 · Software
Published
Reading time22 min
Updated
Field notes · L05 Software

Strangler fig in practiceMigrating a monolith without a rewrite

A working guide to strangler fig migrations: the routing layer, choosing seams, moving data ownership, dual writes vs CDC, shadow traffic, and when to stop.

The short answer

A strangler fig migration replaces a monolith one slice at a time. You put a routing layer in front of it, carve out a seam, build the replacement behind the router, prove it behaves the same with shadow traffic, then move traffic over and retire the old code. Routing is the easy part. Moving data ownership is the hard part: you need one writer per piece of data at every moment, and change data capture with an outbox, not application-level dual writes. And plan when to stop. Most migrations should end with a small, stable monolith still running, not with zero.

The rest of this post is the version we'd actually run: configs, sequencing, the failure modes, and a gate-by-gate runbook you can copy.

01What the strangler fig pattern is, and what it isn't

Martin Fowler named the pattern in 2004, after figs that grow around a host tree until they can stand on their own. His 2024 rewrite lists four activities: agree the outcomes, find seams, deliver replacements one at a time, and change how the organisation works. The Thoughtworks catalogue Patterns of Legacy Displacement (Cartwright, Horn and Lewis) names the moving parts: Transitional Architecture, Event Interception, Legacy Mimic, Divert the Flow and others. Read those. This post is about running it.

Three things it is not:

  • Not "microservices". The target can be a well-structured second monolith, or a modular rewrite of one domain. The pattern is about how you replace things one at a time. It says nothing about how small the replacements should be.
  • Not a rewrite on a slow schedule. If the new system takes no production traffic for nine months, you are doing a big-bang rewrite with extra steps.
  • Not feature parity by default. The Thoughtworks authors warn against Feature Parity as a goal. Every slice is a chance to delete behaviour nobody uses.

02The shape of a strangler fig migration

Diagram
                    ┌──────────────────────────┐
  clients ────────▶ │  routing layer (facade)  │
                    │  - path/header rules     │
                    │  - cohort flags          │
                    │  - mirroring             │
                    └─────┬──────────────┬─────┘
                          │              │
                 legacy routes     strangled routes
                          │              │
                  ┌───────▼──────┐  ┌────▼─────────┐
                  │   monolith   │  │ new service  │
                  └───────┬──────┘  └────┬─────────┘
                          │              │
                  ┌───────▼──────┐  CDC  ┌▼─────────────┐
                  │ monolith DB  │──────▶│  service DB  │
                  │  (+ outbox)  │◀──────│  (+ outbox)  │
                  └──────────────┘ (rev) └──────────────┘

Every slice goes through the same lifecycle. Run it the same way each time:

  1. Intercept. Traffic for the slice passes through a router you control.
  2. Replicate. The new service gets a live, read-only copy of the data it will own.
  3. Shadow. The new service handles copies of real requests. You compare its answers with the monolith's.
  4. Divert. Real traffic moves to the new service in cohorts.
  5. Transfer ownership. The new service becomes the only writer. The monolith reads through an API or a reverse feed.
  6. Retire. Delete the old code path, tables and sync jobs, after archiving the tables and proving the archive restores.

Steps 1, 3 and 4 get all the conference talks. Steps 2 and 5 are where migrations stall.

03Step 1: put a routing layer in front of the monolith

You need one place that decides, per request, which system serves it. Your choice of tool matters less than three properties: rules live in version control, you can route by path and by cohort, and the router can mirror traffic.

Where to put the router

Option Good for Watch out for
Edge reverse proxy (Envoy, NGINX, HAProxy, a cloud load balancer) HTTP APIs and server-rendered apps with clean URL structure Only sees HTTP. Can't route on things buried in request bodies without extra work
API gateway you already run Teams that already manage auth and rate limits there Gateway config sprawl. The router turns into a second monolith of rules
In-process router (branch by abstraction) Seams that don't map to URLs: a pricing function, a tax calculation Lives inside the monolith's deploy cycle. Needs a feature flag system
Event interception Batch jobs, message consumers, file drops, mainframe feeds Needs a broker or tap in the middle. Ordering gets subtle

Most real migrations use two of these: an edge proxy for request/response traffic, and branch by abstraction or event interception for everything else. Don't force a background job through an HTTP proxy just to keep the diagram tidy.

A reference Envoy route config

This is a minimal but working pattern for one slice (invoices). It does three things. A header pins a cohort to the new service. A weighted split covers everyone else. Reads are mirrored to a shadow deployment.

yaml
route_config:
  name: edge
  virtual_hosts:
  - name: app
    domains: ["app.example.com"]
    routes:
    # 1. Explicit cohort: internal staff, test tenants, or a hashed tenant bucket
    #    set upstream by your auth layer. Same tenant -> same backend, every request.
    - match:
        prefix: "/api/invoices"
        headers:
        - name: "x-route-invoices"
          string_match: { exact: "v2" }
      route: { cluster: invoicing, timeout: 5s }

    # 2. Shadow reads for everyone else: GETs still go to the monolith,
    #    a copy goes to the shadow deployment. The response is discarded.
    - match:
        prefix: "/api/invoices"
        headers:
        - name: ":method"
          string_match: { exact: "GET" }
      route:
        cluster: monolith
        timeout: 5s
        request_mirror_policies:
        - cluster: invoicing-shadow
          runtime_fraction:
            default_value: { numerator: 10, denominator: HUNDRED }
            runtime_key: invoices.shadow_pct

    # 3. Everything else on this prefix stays on the monolith.
    - match: { prefix: "/api/invoices" }
      route: { cluster: monolith, timeout: 5s }

    - match: { prefix: "/" }
      route: { cluster: monolith }

Points that matter in that config:

  • Mirroring is fire-and-forget. Envoy does not wait for the shadow response and adds -shadow to the Host/authority header unless you set disable_shadow_host_suffix_append. So you can't compare responses in Envoy itself. The shadow service has to log what it would have returned, keyed by request ID, and a separate job compares that with what the monolith returned. More on that below.
  • Cohorts beat random percentages. Envoy's weighted_clusters can split traffic by percentage. By default the split is decided per request, which means one user's page loads bounce between two backends with different caches, different validation messages and possibly different data freshness. Route by a stable key (tenant, account, user) that an upstream layer hashes into a header. You get sticky behaviour and clean rollback: remove the tenant from the cohort.
  • Rules are code. The route table goes through code review. Each slice adds a few rules and, at the end, removes them. If your route table only ever grows, you are not finishing slices.

Routing failure modes we see most often

  • Session and auth drift. The monolith uses a server-side session cookie. The new service expects a JWT. Fix this before the first slice: put token exchange at the edge, or have the monolith issue tokens the new service can verify. Otherwise every slice reinvents auth.
  • Hidden coupling through redirects and links. The monolith renders absolute URLs and 302s that assume it serves everything. Search the templates for hard-coded hosts and paths before you move a route.
  • Latency stacking. The new service calls back into the monolith for the data it doesn't own yet. Now every request makes two hops plus a network round trip. That is acceptable during the migration. It is not an end state, so track it as debt.
  • The router as a single point of failure. It is now on the critical path for everything. Run it as you would a load balancer: several replicas, config validation in CI, staged rollout of route changes.

04Step 2: choose seams worth cutting

A seam is a place where you can change behaviour without editing the code around it (Michael Feathers' definition, which Fowler revisits). In a monolith, seams are rarely where the org chart says they are. Find them in the code and the data.

How we score a candidate slice, in rough order of weight:

  1. Write-set isolation. Which tables does this capability write? If it writes tables that four other modules also write, it is not a seam yet. Run pg_stat_statements or your ORM's query logs, grouped by code path, and list the writers for each table. This one exercise kills more bad first slices than any workshop.
  2. Business value of change. Pick a slice the business wants to change soon. A migrated slice nobody needs to touch earns you nothing.
  3. Inbound coupling. How many other modules call into it in-process? Every call becomes a network call or an event.
  4. Traffic shape. Read-heavy, idempotent endpoints are easy to shadow. Write-heavy flows with external side effects (payments, emails, ledger postings) are hard.
  5. Blast radius of being wrong. For the first slice, choose something where a bug costs you an apology, not a regulator.

Our usual first slice is a read-mostly capability with an isolated write set and an obvious owner team: notifications, search, reporting, a catalogue. It proves the router, the data pipeline and the parity tooling end to end. Leave the core transactional domain until the plumbing is boring.

You probably don't need a big event-storming programme before slice one. You need a list of tables, their writers, and one slice that scores well. The domain model gets clearer as you cut.

05Step 3: migrate data ownership (the hard part)

Code moves easily. Data has gravity. The rule that keeps a migration safe:

At any moment, every row has exactly one system allowed to write it.

Both systems can read it. Only one writes it. You move that write authority as a single, reversible step, and you never have both systems writing the same rows "for a while".

The ownership state machine

Run each table (or each aggregate, if your boundaries cut across tables) through these states. Write the current state in a file in the repo, and review changes to it like a schema change.

State Writer New service reads from Monolith reads from Sync direction
S0 Legacy Monolith – Own tables none
S1 Replicated Monolith Its own DB, fed by CDC Own tables monolith → service
S2 Shadowed Monolith Own DB (CDC) Own tables monolith → service; service writes go to a scratch store for comparison only
S3 Flipped New service Own DB Own tables, fed by reverse CDC service → monolith
S4 Decoupled New service Own DB Service API or events service → consumers
S5 Retired New service Own DB n/a (legacy tables dropped) none

S2 → S3 is the only dangerous transition. Everything else is additive and reversible. S3 keeps rollback cheap: the monolith's tables stay current through the reverse feed, so moving write authority back means flipping a flag, not running a data migration under pressure.

Dual writes vs CDC vs outbox

The obvious approach is dual writes: change the monolith to write to both databases. Don't. Two writes to two stores are not atomic. Every failure between them leaves the stores disagreeing, and nothing tells you which one is right.

Text
  app: BEGIN; UPDATE invoices ...; COMMIT;   → committed in the monolith DB
  app: POST /invoices/42 to new service      → timeout. Did it apply? Retry? Order?

Retries help with the timeout. They don't help with ordering (two updates racing across two connections) or with the app crashing between the two writes. You can add reconciliation jobs. At that point you have built a worse CDC system.

Approach Atomic with source write Ordering Captures writes from outside the app (SQL scripts, cron, other services) Operational cost Use when
Application dual writes No Per-connection only No Low to start, high to keep correct Almost never. Maybe non-critical, rebuildable data such as cache warming
Log-based CDC (Debezium, cloud DMS, logical replication) Yes: reads the committed WAL/binlog Per-row/partition, in commit order Yes Medium: Kafka or similar, connectors, slot monitoring Replicating table state into the new service (S1–S2)
Transactional outbox + CDC Yes: event row commits with the business change Per-aggregate Only writes that insert outbox rows Medium Publishing domain events rather than leaking table shapes; reverse sync (S3)
Batch ETL – – Yes Low Reporting slices that tolerate hours of lag

Our default: log-based CDC on raw tables to build the S1 replica fast, then move to outbox events as soon as the contract stabilises. Raw-table CDC couples the new service to the monolith's schema, so the monolith team can break the consumer with an ALTER TABLE. An outbox gives you a deliberate contract. The zero-downtime Postgres migrations post in this series covers changing those legacy schemas safely while CDC reads from them.

A reference CDC setup (Postgres → Kafka with Debezium)

Debezium is the de facto open-source CDC tool. The current stable series is 3.7, released at the end of September 2026. A minimal Postgres connector for the invoices slice, using the built-in pgoutput plugin:

json
{
  "name": "monolith-invoices-cdc",
  "config": {
    "connector.class": "io.debezium.connector.postgresql.PostgresConnector",
    "plugin.name": "pgoutput",
    "database.hostname": "monolith-db.internal",
    "database.port": "5432",
    "database.user": "debezium",
    "database.password": "${file:/opt/secrets/monolith-db.properties:password}",
    "database.dbname": "app",
    "topic.prefix": "monolith",
    "table.include.list": "public.invoices,public.invoice_lines",
    "publication.name": "dbz_invoices",
    "publication.autocreate.mode": "filtered",
    "slot.name": "dbz_invoices",
    "snapshot.mode": "initial",
    "heartbeat.interval.ms": "10000"
  }
}

The ${file:...} placeholder needs Kafka Connect's FileConfigProvider enabled in the worker config. Don't put the password in the connector JSON. It ends up in the Connect REST API and its logs.

When you move to an outbox, the monolith writes the event in the same transaction as the business change:

sql
CREATE TABLE outbox (
  id            uuid PRIMARY KEY DEFAULT gen_random_uuid(),
  aggregatetype text        NOT NULL,
  aggregateid   text        NOT NULL,
  type          text        NOT NULL,
  payload       jsonb       NOT NULL,
  created_at    timestamptz NOT NULL DEFAULT now()
);

BEGIN;
UPDATE invoices SET status = 'paid', paid_at = now() WHERE id = 42;
INSERT INTO outbox (aggregatetype, aggregateid, type, payload)
VALUES ('invoice', '42', 'InvoicePaid',
        jsonb_build_object('invoice_id', 42, 'paid_at', now(), 'version', 18));
COMMIT;

Then add Debezium's Outbox Event Router SMT to a connector that watches only public.outbox:

json
"transforms": "outbox",
"transforms.outbox.type": "io.debezium.transforms.outbox.EventRouter",
"transforms.outbox.route.by.field": "aggregatetype",
"transforms.outbox.table.field.event.key": "aggregateid",
"transforms.outbox.route.topic.replacement": "events.${routedByValue}"

Keying by aggregateid sends every event for one invoice to the same Kafka partition, which preserves per-invoice ordering. That is the only ordering you get, and the only ordering you should depend on. Delete old outbox rows on a schedule. Debezium reads the WAL, not the table, so a nightly DELETE ... WHERE created_at < now() - interval '3 days' is safe once your consumers have caught up.

Make the consumer idempotent and version-aware

CDC delivers each change at least once. Your consumer will see duplicates, especially after connector restarts. It is the same problem idempotency keys solve for API retries, moved to the consumer. Apply changes with a version guard so replays and duplicates do nothing:

sql
INSERT INTO invoices (id, tenant_id, status, total_minor, src_version)
VALUES ($1, $2, $3, $4, $5)
ON CONFLICT (id) DO UPDATE
SET tenant_id   = EXCLUDED.tenant_id,
    status      = EXCLUDED.status,
    total_minor = EXCLUDED.total_minor,
    src_version = EXCLUDED.src_version
WHERE invoices.src_version < EXCLUDED.src_version;

src_version can be a monotonic column you add to the monolith table, or the source LSN from the Debezium envelope (source.lsn). An explicit version column survives a re-snapshot. LSN-based guards can mislead you after a database failover or restore, because the new primary's LSNs are not guaranteed to line up with what you recorded.

CDC failure modes to plan for

  • Replication slots retain WAL without limit. If the connector stops, Postgres keeps every WAL segment the slot hasn't confirmed. The default for max_slot_wal_keep_size is -1 (unlimited), so a dead connector over a weekend can fill the monolith's disk. Set a cap, alert on pg_replication_slots lag in bytes, and accept that hitting the cap invalidates the slot and forces a re-snapshot. That beats an outage of the primary. Postgres 18 also adds idle_replication_slot_timeout (off by default) for abandoned slots.
  • Snapshots on big tables. snapshot.mode: initial reads the whole table. On a large monolith database, prefer Debezium's incremental snapshots (signal-table driven, chunked), so you can pause and resume without holding a long transaction open.
  • Schema changes upstream. A column rename in the monolith is a breaking change for raw-table consumers. Put the CDC'd tables under a schema-change review rule until they leave S1/S2.
  • Reverse-sync loops. In S3 the new service publishes changes back to the monolith tables. If CDC on the monolith is still running, those writes are captured and sent forward again. Stop the forward connector for that table at the flip. If that's not possible, tag rows with an origin column and filter them out.

Foreign keys and joins across the boundary

The monolith has foreign keys from payments.invoice_id to invoices.id, and reports that join six tables. Once invoices live elsewhere:

  • Keep a read-only replica of the referenced table in the monolith (that's S3/S4's reverse feed) and drop the FK constraint, keeping the column. Integrity is now enforced at write time by the owning service, and checked by a reconciliation job.
  • Move reporting to the warehouse. Cross-domain joins belong in an analytical store fed by the same CDC streams, not in the OLTP database of either system.
  • Don't build a distributed transaction. If a flow truly needs invoices and payments to change atomically, that's a sign they belong in the same service, or that you need a saga with explicit compensations. Two-phase commit across a monolith and a new service is a migration you won't finish.

06Step 4: prove parity with shadow traffic and parallel runs

"It passed the test suite" is not evidence that the new code behaves like a fifteen-year-old monolith. The monolith's real specification is its production behaviour, bugs included. Measure the new code against that.

Reads: mirror and diff

With the Envoy config above, 10% of invoice GETs also hit invoicing-shadow. A workable comparison pipeline:

  1. The edge sets x-request-id. Envoy forwards it to both backends.
  2. The monolith logs (request_id, status, normalised_body_hash, body) for the slice's routes. Sample bodies. Always log the hash.
  3. The shadow service logs the same tuple and performs no side effects. It runs with a read-only database role, a stubbed email client and no outbound webhooks.
  4. A diff job joins on request_id and groups mismatches by field path.

Normalisation is most of the work. Before you compare, remove or canonicalise timestamps, generated IDs, float formatting, key order, pagination cursors and sort order where the API doesn't guarantee one. Every rule in the normaliser is a claim that the difference doesn't matter, so review it like code.

Watch the load. If the shadow still reads the monolith's database for data it doesn't own yet, mirroring adds read load there. Worked example, with assumptions stated: at 2,000 invoice GETs per second and a 10% mirror, the shadow adds 200 rps. If each request does three primary-key lookups against the monolith DB, that's 600 extra queries per second on the primary, unless you point the shadow at a replica. Start at 1%.

Writes: compare decisions, not side effects

You can't mirror a POST /invoices/42/pay to a second system that charges the card again. For writes, run the comparison inside the request path, in the style of GitHub's Scientist, which has ports to most mainstream languages. The old code is the source of truth. The new code runs as a pure function on the same inputs. You compare the decision: the state change and the side effects it would request.

python
def pay_invoice(cmd: PayInvoice) -> Result:
    control = legacy.pay_invoice(cmd)            # real: writes, charges, emails
    if parity.enabled("invoices.pay", cmd.tenant_id):
        try:
            candidate = invoicing_v2.plan_payment(cmd, snapshot=control.before)
            parity.record(
                experiment="invoices.pay",
                key=cmd.invoice_id,
                control=normalise(control.plan),     # {state_delta, effects:[...]}
                candidate=normalise(candidate),
            )
        except Exception as exc:                     # never let the candidate break prod
            parity.record_error("invoices.pay", cmd.invoice_id, exc)
    return control

This only works if the new service is designed to return a plan (state delta plus intended effects) before it executes. Design for that from the start. It also makes the service easier to test.

When shadow parity is good enough

Set the bar before you look at the data, or you'll rationalise whatever you see:

  • Mismatch rate below an agreed threshold over a full business cycle: at least a week, and a month-end if the domain has one.
  • Every mismatch category is triaged into one of three: new system bug (fix), legacy bug we're keeping (replicate it, with a test named after it), or legacy bug we're fixing (document it, tell support).
  • Error and latency of the shadow at p99 within budget, at full shadow volume.

07Step 5: divert traffic and flip ownership

Cut over by cohort, not by percentage of requests:

  1. Internal tenants and test accounts.
  2. A small set of low-risk real tenants, chosen by hand.
  3. Hashed tenant buckets: roughly 5%, 25%, 50%, 100%.

For read-only slices, that is the whole cutover. For slices that write, the ownership flip (S2 → S3) is a separate, deliberate event, and it has to be atomic per aggregate. The simplest correct way:

  1. Put the slice's writes into a short read-only window for that cohort (seconds to minutes, behind a flag), or use a per-tenant ownership flag checked inside the write path of both systems.
  2. Wait until forward CDC lag for those tenants reaches zero.
  3. Flip the ownership flag. The new service starts accepting writes. The monolith rejects them for those tenants.
  4. Start the reverse feed for those tenants.

Per-tenant flags let you flip ownership gradually, which is the same idea as cohort routing applied to data, and the same discipline as progressive delivery with feature flags. They also let you roll back one tenant without touching the others.

08The asset: a slice readiness runbook

Copy this table into the repo as migration/slices/<slice>.md and tick it off for every slice. A gate passes only when every exit criterion is met and someone with authority has signed it off. Each gate has a rollback that is cheaper than the gate before it.

Gate Exit criteria Evidence Rollback
G0 Scoped Write set listed from query logs. Inbound in-process callers listed. Owner team named. Behaviour to delete agreed Table-writer matrix in the PR. Callers list –
G1 Intercepted All slice traffic passes through the router (or branch-by-abstraction point) with no behaviour change. Route rules in version control Router metrics show 100% of slice traffic on rules tagged with the slice Remove rules
G2 Replicated (S1) CDC running. Snapshot complete. Lag p99 under the agreed limit. Slot WAL cap and lag alert in place. Consumer idempotent with a version guard Lag dashboard. Alert test fired. Row-count and checksum reconciliation passing Drop consumer DB. Remove connector and slot
G3 Shadowed (S2) Read mirror and/or write experiment live for a full business cycle. Mismatch rate below threshold. Every category triaged. Shadow has no side effects (verified by egress policy, not by trust) Parity report. Triage log. Egress deny rules Set mirror fraction to 0
G4 Diverted Cohorts at 100% for reads. SLOs met for a week at full load. On-call runbook for the new service exists and has been used in a drill SLO dashboard. Drill notes Remove cohort header rules
G5 Flipped (S3) Per-tenant ownership flag at 100%. Reverse feed keeps legacy tables current. Rollback of one tenant rehearsed in production Flip log. Reverse-lag dashboard. Rehearsal record Flip tenant flags back. Reverse feed means no data migration
G6 Decoupled (S4) No monolith code reads the legacy tables directly. Consumers use the API or events. FK constraints dropped. Reporting moved to the warehouse Query logs show zero reads of legacy tables for 30 days Restore reads from reverse feed (still running)
G7 Retired (S5) Legacy code deleted. Routes removed. Reverse feed and connector removed. Tables archived, then dropped PR deleting code and tables. Router config smaller than before the slice Restore from archive (expensive, by design)

Two rules we hold on to. One slice in G3–G5 at a time per data domain: overlapping ownership flips is how you get rows with no clear owner. And G7 is not optional. A slice that stops at G4 leaves you running two systems for one capability. That costs more than either system alone.

09When to stop strangling

Most migrations don't fail by blowing up. They fail by stalling at 70%, with two systems, a sync pipeline and nobody who understands all three. Decide your stopping rule at the start, and record it as an architecture decision record.

Stop, or at least pause, when:

  • The remaining monolith is stable and rarely changes. If nobody has needed to modify a module in a year, migrating it gets you nothing. Freeze it, wrap it behind a clear interface, and move on.
  • The cost of the next slice is greater than what it saves. The last slices are usually the most tangled: the shared users table, the reporting god-query, the nightly batch. Estimate them honestly. Often a smaller "core legacy" service is the right final state.
  • The original goal is met. If the goal was "ship invoicing changes weekly instead of quarterly", and you now can, the migration has succeeded. Strangling the rest is a new project. It needs its own case.
  • The team is spread across too many half-finished slices. Finish (G7) what's in flight before you start anything new.

Don't stop when:

  • A slice is at S3/S4 with sync pipelines still running. That is the most expensive place to stand still. Push through to G7 or roll back.
  • The monolith still holds the data the new services depend on most. If every new service reads users through the monolith, you've spread the monolith out, not removed it.

A healthy end state usually looks like this: a few services own the domains that change often, a small residual monolith owns the stable core, and the router's rule table is short and boring.

10Where this crosses other layers

A strangler fig migration is a software project that changes most of the stack around it. The router is infrastructure, and it becomes the most critical hop you run. CDC adds a streaming platform someone has to operate, size and secure. The analytics team's dashboards break when FK joins move to the warehouse, so the data layer has to be in the plan from G0, not from the first broken report. Auth at the edge is a security design decision. The comparison pipeline only works if every hop propagates request IDs, which is why we'd do the work in Anatomy of a request: one click traced through CDN, WAF, load balancer, app and database before cutting the first seam. Most stalled migrations we're asked to look at are stuck at one of these hand-offs, not in the code.

11FAQ

How long does a strangler fig migration take?

It depends on the number of slices and how tangled the data is, so any general figure would be made up. The useful measure is time per slice from G0 to G7. Measure it on the first two slices and extrapolate. If a slice takes more than a quarter, it is too big: split it.

Should we use dual writes for a short transition period?

No. "Short" turns into months, and the inconsistencies pile up silently. Use CDC from the source of truth, keep a single writer, and flip ownership atomically per aggregate or tenant. If you truly can't run CDC, use a transactional outbox with a polling publisher. It's slower, but still atomic with the business write.

Can we do this without Kafka?

Yes. Debezium Server can deliver changes to other sinks without Kafka Connect, Postgres logical replication can feed another Postgres directly, and cloud database migration services cover the replication step. What you can't skip is ordered, at-least-once delivery from the committed log, plus idempotent consumers. Choose the transport you can operate.

Do we need microservices at the end?

No. The pattern works just as well for replacing a monolith with a better-structured monolith, or for moving one domain to a bought product. Choose your target architecture separately. The strangler fig is how you get there without a cutover weekend.

How do we handle the shared users table?

Last, usually. Leave identity and user profile in the monolith (or move them early to a dedicated identity provider) and give new services a read model through CDC or events. Moving ownership of users while other slices are mid-flight is the most common cause of tangled ownership we see.

What if the shadow mismatch rate never gets to zero?

It shouldn't need to. Target a threshold and a fully triaged mismatch list. Some mismatches are legacy bugs you've chosen to fix. Those are the point of the migration. Document them and tell support before cutover.

If this is the layer that hurts, we should talk.

Tell us which layer hurts →