Monolith-to-Modern Strangler Migration

C# .NET Angular CQRS Docker Terraform YARP

Monolith-to-Modern Strangler Migration — Defense Client Web Suite

Stabilized an 8-year-old .NET + Angular monolith and won approval for a multi-million-CHF modernization roadmap.

Show more ↓

1. Problem

The web suite manages finance, HR, warehousing and logistics for the defense organization. After eight years and multiple vendor hand-overs, the codebase had decayed into a spaghetti monolith:

  • frequent production bugs revealed only after deployment
  • lead-time for changes measured in weeks, driving up cost
  • developers avoided the project, causing high turnover
  • E2E test job exceeded 60 min, delaying releases

2. Solution Overview

I performed an end-to-end architecture assessment, identified root causes, and led the client through four strategic options—ultimately selecting a Strangler-Fig migration via API Gateway:

Track Purpose Key Tech / Notes
Containerisation Package entire legacy app for predictable rollout Docker 🠒 customer DC
Gateway / Proxy Route requests to legacy or new services YARP · Nginx
Vertical-Slice Backend Rebuild modules behind clean boundaries .NET 6 · MediatR
CI/CD & Tests Speed up feedback loops Nuke · Azure Pipelines · +20 min test cut

Security: Runs inside restricted defense networks; reverse-proxy hardened (CIS Level 1) and pentest cleared.

3. Impact

  • Client funded CHF > 3 M roadmap based on my architecture dossier
  • Regression defects -70 % per release after proxy cut-over (Q4 2024)
  • Test pipeline reduced from 60 → 40 min (-33 %) via Nuke-based re-write
  • Developer satisfaction survey rose from 2.1 / 5 to 4.0 / 5 within three quarters

4. My Contributions

Diagnosed root-cause architecture flaws; authored 10-page strategy paper & roadmap; implemented containerisation, gateway PoC and vertical-slice template; rewrote CI pipeline in Nuke; mentored 8 engineers on modern .NET patterns.

5. Key Challenges & Mitigations

Challenge Mitigation & Result
Tight coupling of DB & business logic Strangler proxy → new bounded contexts w/ vertical slices — decoupled deployments
Failing "Onion" layers Re-established Application layer, moved 42 mixed repositories out of Infrastructure
Slow test suite Parallelised fixtures + in-memory DB ⇒ -20 min runtime
Low dev morale & churn Introduced roadmap, guild sessions, code radar — turnover halted

6. Degraded Legacy Backend Onion Architecture

architecture