Monolith-to-microservices migration
Moving a legacy VB monolith to separate UIs, APIs and databases while the system stayed in use.
Oct 2022Sep 2023
3 + 4 + 3
UIs, APIs and databases out of one VB monolith
How it was measured
A count of what runs in production after the split: 3 UI applications, 4 APIs and 3 databases.
0
downtime during data migration
How it was measured
No maintenance window was scheduled, and uptime monitoring showed no outage while production data moved to the new databases.
On this page
01
Context
The platform sells magazine subscriptions through more than 100 branded storefronts. Its legacy core was a Visual Basic monolith: UI, business logic and data in one piece.
The goal was to split it into separate UIs, APIs and databases without stopping the system for the data migration.
02
Problem & constraints
- The data had to move with zero downtime.
- One codebase had to become 3 UIs, 4 APIs and 3 databases with clear boundaries.
- Old and new parts had to work side by side during the move.
03
Architecture
Scroll the diagram sideways
04
Key decisions
Zero-downtime data migration instead of a maintenance window
- Context
- Production data had to move to new databases.
- Options considered
- A: stop the system, export and import. B: migrate the data while the system keeps running.
- Trade-offs
- B needs more tooling and more checks. A is cheaper to build and stops the business for the length of the migration.
- Outcome
- Chose B. The data migration ran with zero downtime.
Split by responsibility: 3 UIs, 4 APIs, 3 databases
- Context
- In the monolith, UI, logic and data were deployed and changed together.
- Options considered
- A: move the monolith to a new stack as one unit. B: split it into separate UIs, APIs and databases.
- Trade-offs
- B means more deployables and more contracts between them. Each part can then change on its own.
- Outcome
- Chose B: 3 UIs, 4 APIs and 3 databases.
05
Results
- Each UI, API and database is now released on its own, so a change no longer means redeploying the whole system.
- Old and new parts ran side by side until the move was complete, so users saw no change.
- Legacy stored-procedure logic for address hygiene and fulfillment batches moved into .NET background services.
- SQL import views carried publisher agreements, categories, subscriptions and banking data into the new schema before the September 2023 cutover.
06
What I'd do differently
- I would start with a full inventory of what the monolith does, including scheduled jobs and reports, before planning the split.
- I would add contract tests between the new UIs and APIs from the first release.
- I would split the databases in smaller steps, one domain at a time, so each release is easy to roll back.
07