Skip to content

Migration playbook: Legacy monolith → Modular microservices

Monolith to microservices migration: a strangler fig playbook

Break a monolith into independently deployable services one bounded context at a time, without a big-bang rewrite.

Migration drivers

Why teams make this move

Driver 01

Deployment contention

Many engineers queued on one deployment pipeline, where any change can cause a regression somewhere else.

Driver 02

Scaling inefficiency

Scaling the whole application to serve one CPU-heavy endpoint or background job.

Driver 03

Large blast radius

An unhandled failure in a minor feature taking down the core checkout flow.

Execution sequence

How the migration runs

Each phase ends with a check you can verify — data parity, error rates, latency — and the rollback path is agreed before any traffic moves.

  1. 01Phase

    Domain discovery and bounded contexts

    Mapping subdomains and data dependencies with event storming and an audit of the code and data.

  2. 02Phase

    Edge routing

    Putting a reverse proxy (Envoy, Cloudflare or your API gateway) in front of the monolith so traffic can move route by route.

  3. 03Phase

    Data sync and shadow mode

    Replicating data with change data capture (Debezium) and comparing the new service's reads and writes with the monolith's.

  4. 04Phase

    Traffic cutover and pruning

    Shifting production traffic in steps — for example 1%, 10%, then 100% — and deleting the monolith code once the new path is stable.

Risk prevention

Pitfalls that derail this migration

Risk 01

Splitting data too early

Moving tables into separate services before the transactions that span them have been redesigned.

Risk 02

Synchronous call chains

Chaining synchronous REST calls between services, which recreates the monolith's coupling with network latency added.

Risk 03

No distributed tracing

Debugging latency without OpenTelemetry context propagated across service boundaries.

Before and after

What we measure

We take a baseline before any change and report the same numbers after cutover, from your own tools. They are the evidence of whether the migration worked — not figures promised in advance.

Error rate
Old and new paths compared at every traffic step
p95 latency
Per route, before extraction and after each cutover step
Deploy frequency
From your CI history: a baseline before, tracked after

Questions

Frequently asked migration questions

With the saga pattern: each step has a compensating action, orchestrated by a workflow engine such as Temporal or by events, instead of distributed two-phase commit.

When a small team ships from one pipeline without queuing and the codebase is already well modularized. A monolith is then cheaper to build and run, and the migration would add operational work without removing a real bottleneck.

Rehearse the cutover before the real one

Tell us about your data volume, traffic and timeline. An engineer will reply within one business day to set up a call about the migration plan and its rollback path.