All jobs / Engineering manager / tech lead
Engineering manager / tech lead interview question · 5+ years
Split a monolith into services without downtime — including the data.
The strongest answer
Strangler by capability: put a facade in front, carve one bounded context at a time, move its data by dual-writing into the new store while the monolith remains the source of truth, verify parity, flip reads, then writes, then delete; the database split is the real work, and the order of contexts is chosen by value and coupling
Why it works
Right. One context at a time, data migrated with parity checks.
What a good answer covers
- Facade, then one context at a time.
- Dual-write, verify, flip.
- Order by value and coupling.
- Delete the old path.
Answers that fall short
- Close, but not the strongest: Rewrite the whole thing as services and switch over
The big-bang rewrite is where migrations go to die. - Weak: Split the code into services that share the monolith's database
A shared database is a distributed monolith. - Red flag: Split the database first, then the code
Data without its owner has no one to keep it consistent.
Who gets asked this
- Backend developer
- Full-stack developer
- DevOps / SRE / cloud
- Data engineer
- Data science / ML / AI
- Engineering manager / tech lead
- Solutions / cloud architect
- AI engineer