Image
Build
Connect & operate
Design & teams
Start hereScope a build in one callBring a spec, a wireframe, or a paragraph. You leave with an architecture, a timeline, and a number.Request a scoping call
AI software
LLM & data systems
Vibe coding
Ready to ship?Put AI where the work isAgents, RAG, and private LLMs wired into the systems your team already uses — not a chatbot bolted to a homepage.Discuss an AI project
Domain firstWe learn your workflow before we model itRegulated, operational, or high-volume — the constraints belong in the schema, not in a training doc.Talk about your domain
Timothy Carter
Author
Migrating From a Monolith to Microservices Without Downtime — featured image
11/20/2026

Migrating From a Monolith to Microservices Without Downtime

Treating a monolith decomposition as a 48-hour weekend cutover is the mistake that burns a working product. Teams schedule the maintenance window, miss revenue, surface data drift between old and new stores, and roll back the following week with a bill and no new architecture.

Zero-downtime migrations take longer on paper and ship every sprint. The work is a sequence of boring changes: pull one bounded context out of the monolith, route a sliver of traffic to its new service, prove it against the old path, widen the pipe, repeat. Every step is individually reversible, which is the whole point.

The Strangler-Fig Sequence That Actually Ships

Martin Fowler named the Strangler Fig pattern in 2004 as a way to replace a legacy system by building new functionality around it until the old one retires. The sequencing on a real codebase matters more than the metaphor.

Start with a read-only endpoint whose output is deterministic: a product detail lookup, a tax calculation, a notification render. Wrap it behind an internal API inside the monolith so every caller already talks to an interface. Lift that interface into a new service with its own repo, build pipeline, and SLO. Route calls through a feature flag or reverse-proxy rule, not a hardcoded URL. Only after that first read service is stable in production do you touch write paths.

Order of extraction, in practice:

  • Read-only lookups and reports: lowest risk, highest observability
  • Asynchronous work: notifications, exports, scheduled jobs
  • Write endpoints with narrow ownership: inventory, pricing, user profile
  • The transactional core: checkout, ledger, auth

Call the last tier last, and only if the team genuinely needs independent deploy cadence for it. A core ledger extracted too early is the most common source of the data drift incident that forces a rollback.

Dual-Write Database Cutovers Without Data Drift

The database is where most of these projects die. Two services cannot share one write-master and claim to be independent, and the same data isolation discipline that separates tenants in a SaaS applies between services. The expand-and-contract pattern breaks the move into small individually safe steps so the database is always in a state where both old and new code work.

Sequence a typical cutover: add the new columns or tables without reading from them; dual-write to both schemas behind a feature flag; backfill historical rows in batches; switch reads to the new store with the old still dual-written as a safety net; compare row counts and checksums; stop writing to the old schema; drop it.

Each step runs in production. Each is reversible until the final drop, which is scheduled only after a week or two of clean read parity. This is where most of the calendar time goes, and where cutting corners later shows up as orphaned rows and reconciliation tickets.

The Expand-and-Contract Database Migration Sequence
  1. 11. Build and deploy the new schemaDesign and implement the new structure alongside the existing one.
  2. 22. Expand the interfaceClients write to both old and new structures while still reading from the original.
  3. 33. Migrate existing dataTransfer and transform historical rows into the new schema.
  4. 44. Test the new interfaceValidate correctness and performance against the new structure.
  5. 55. Cut reads overRedirect client reads from the old schema to the new one.
  6. 66. Stop writing to the old structureDiscontinue writes to the legacy schema.
  7. 77. Remove the original structureDrop the deprecated schema to finalize the migration.
Seven individually safe steps that keep old and new application code working against the schema throughout the cutover. Source: Prisma Data Guide

Shadow Traffic Before Real Users See It

Routing real users at a new service without a dress rehearsal is faith, not engineering. Shadow traffic duplicates production calls at the ingress and sends one copy to the legacy path (which answers the user) and one copy to the new service (whose response is compared and discarded).

Pipe the comparison into a structured log with field diffs, latency distributions, and error classes, and treat any divergence above a tiny threshold as a bug in the new service. Teams that skip this step learn about currency rounding, timezone handling, and null-vs-empty-string differences from a customer complaint instead of a dashboard.

A split rail yard illustrating shadow traffic duplicating requests onto a parallel path.

Shadow runs also calibrate the operational SLOs. The new service's p99 latency, memory footprint, and connection-pool behavior under real load are only observable once real load is on it. A week of shadow traffic is cheap. A bad cutover is not.

Blue-Green and Canary Cutovers at the Edge

When the new service matches the old on shadow traffic, cut over at the edge, not inside the monolith. Blue-green deployment runs two identical production environments with the router flipping between them after health checks pass, which keeps rollback at the seconds scale. Canary deployments gradually shift traffic in steps, trading a slower rollback for finer-grained observation.

Pick blue-green for stateless request handlers where the schema is compatible and the risk is in code. Pick canary for anything with cold caches, warm pools, or user segmentation where a 1% slice reveals behavior that a 100% cut would mask. Many teams run both: blue-green at the service level, canary at the routing level inside the green environment.

Legacy Traffic Share at Each Canary Gate
Legacy Traffic Share at Each Canary GatePre-canary baseline: 100%; Canary at 1%: 99%; Canary at 5%: 95%; Canary at 25%: 75%; Full cutover: 0%100%Pre-canary baseline99%Canary at 1%−1% from Pre-canary baseli…95%Canary at 5%−4% from Canary at 1%75%Canary at 25%−21% from Canary at 5%0%Full cutover−100% from Canary at 25%
Canary stages peel traffic off the legacy service in steps (1%, 5%, 25%, then full cutover); rows show the share still routed through the old path. Source: Octopus Deploy, 2024

The 2024 DORA report tags 19% of respondents as elite performers who deploy on demand with roughly 5% change failure and recover inside an hour. Those numbers are the target, not the starting line.

What This Costs and How Long It Takes

A realistic decomposition for a mid-sized monolith (a Rails or Django app, 200k-500k lines, 20-50 engineers) runs 9 to 18 months and extracts 4 to 8 services, not 40. Platform costs during the transition typically rise 20 to 40% because both environments run in parallel, then settle near the pre-migration baseline once the old monolith's footprint contracts.

Line-item ranges on a representative engagement:

  • Platform engineering: 2 engineers for the full window, $500k-$800k loaded
  • Service extraction: a rolling pair of engineers per service, 6-10 weeks each
  • Observability stack: $60k-$150k annualized for tracing, log aggregation, and SLO tooling
  • Dual-run infrastructure: 20-40% uplift for 6-12 months
  • API integration and contract tests: scoped per service
  • Data reconciliation: one engineer continuously through the final cutover

The platform the extracted services usually land on is Kubernetes, and the hiring and tooling market now assumes it. For an honest comparison of rehost, refactor, and rebuild tradeoffs before committing, the ranges above are a floor, not a ceiling.

DORA 2024: Where a 25-Point Rise in AI Adoption Helps Delivery and Where It Hurts
DORA 2024: Where a 25-Point Rise in AI Adoption Helps Delivery and Where It HurtsDocumentation quality: 7.5%; Code quality: 3.4%; Code review speed: 3.1%; Delivery throughput: -1.5%; Delivery stability: -7.2%Documentation quality7.5%Code quality3.4%Code review speed3.1%Delivery throughput-1.5%Delivery stability-7.2%
Per each 25-point rise in AI adoption, documentation and code quality tick up while delivery throughput and stability tick down — a reminder that mid-migration regressions are expensive even when individual commits look cleaner. Source: DORA / Ideatives, 2024

When the Right Answer Is Fewer Services

Amazon Prime Video's Video Quality Analysis team collapsed its serverless audio/video monitoring architecture into a monolith on EC2 and ECS, cutting infrastructure costs by over 90% and raising the service's scaling ceiling. That is not an argument against decomposition. It is an argument against decomposition without a hypothesis.

A bounded context earns its own service when it has an independent deploy cadence, a different scaling profile, a separate data model, or a distinct team. If it has none of those, it is a module, and a module inside a well-structured monolith is cheaper to run and faster to change than the same code behind a network hop. Debugging complexity, operational overhead, and network latency are the drivers in every honest post-mortem of consolidation.

Before the first extraction, write the one-paragraph case: which service, which boundary, which independent-deploy or scaling pressure justifies the split. Teams that cannot write that paragraph for service four or service five are the ones that reconsolidate 18 months later.

Microservices Adopters That Have Pulled Services Back
Microservices Adopters That Have Pulled Services BackConsolidated at least some services back: 42%; Still fully microservices: 58%Consolidated at least some services back42%Still fully microservices58%
Share of microservices adopters in the CNCF 2025 survey that have reconsolidated at least some services into larger deployable units. Source: byteiota / CNCF 2025 survey

The Decomposition That Lets the Business Keep Running

The 48-hour weekend cutover ends in a rollback because it has no safety net. The sequence above ships every sprint and keeps the lights on: strangler-fig extraction of one bounded context at a time, expand-contract schema changes, shadow traffic against the legacy path, blue-green and canary at the edge, and a written hypothesis before any service earns its own repo.

For teams planning a first extraction in the next two quarters, the hard decision is which bounded context goes first, not whether to decompose at all. Pick a read-only endpoint, extract it in six weeks, and let that one teach the sequencing the second needs. A disciplined engineering partner delivers the work as scoped service pairs, not a theory piece.

Author
Timothy Carter
Timothy Carter is the Chief Revenue Officer. Tim leads all revenue-generation activities for marketing and software development activities. He has helped to scale sales teams with the right mix of hustle and finesse. Based in Seattle, Washington, Tim enjoys spending time in Hawaii with family and playing disc golf.