Q: A legacy monolithic application is tightly coupled to a single master database. You want to break it into microservices, but they all still query the massive 10TB monolithic database. What is this anti-pattern called, and how do you migrate away from it?
When an interviewer asks about this scenario, I explain how we balanced incident response with long-term prevention. The interviewer is testing: Integration Database anti-pattern, Strangler Fig pattern, database per service..
Want to master this scenario in a live sandbox? The Linux Foundation's Certified System Administrator (LFCS) & SRE Track covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: "When an interviewer asks about this scenario, I explain how we balanced incident response with long-term prevention. The interviewer is testing: Integration Database anti-pattern, Strangler Fig pattern, database per service.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."
Initial Diagnostics & Root Cause Analysis
The anti-pattern is an Integration Database. It ruins the benefits of microservices because the database becomes a massive single point of failure; a schema change by Service A breaks Service B, and scaling the DB becomes near impossible.
- Identify a small, bounded context (e.g., User Profiles) in the monolith.
- Build the new
UserProfileServiceand give it its own entirely separate, small database. - Keep them in sync during migration using Change Data Capture (CDC, like Debezium) streaming from the monolith DB to the new DB.
Remediation & Permanent Safeguards
The migration approach is the Strangler Fig Pattern combined with Database per Service:
- Update the API Gateway to route
/userstraffic to the new microservice. - Once stable, sever the sync and delete the tables from the monolithic database. Repeat for all domains until the monolith is "strangled."
- Identify a small, bounded context (e.g., User Profiles) in the monolith.
- Build the new UserProfileService and give it its own entirely separate, small database.
- Keep them in sync during migration using Change Data Capture (CDC, like Debezium) streaming from ...
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Engineering bespoke in-house developer tools instead of adopting standardized platform Golden Paths when configuring General legacy monolithic Bespoke internal tools create long-term maintenance debt and fragmented workflows, whereas standardized Golden Paths accelerate delivery.
- Overlooking infrastructure cost visibility and FinOps allocation tagging across multi-tenant environments when configuring General legacy monolithic Without granular resource tagging, engineering organizations cannot attribute cloud infrastructure costs to specific teams or business units.
- Failing to define explicit Service Level Objectives (SLOs) and Error Budgets to balance feature velocity with reliability when configuring General legacy monolithic Without agreed SLOs, engineering and product teams lack an objective data-driven framework to prioritize technical debt over new features.
- Neglecting automated continuous drift detection between declarative configuration and deployed cloud state when configuring General legacy monolithic Unmanaged drift accumulates over time, causing future automated deployments to fail or overwrite emergency manual adjustments.