Your team is debating whether to pull a chunk of functionality out of the monolith into its own service. How do you decide where a service boundary should go, and when splitting is the wrong move?

technical-conceptual · Mid level · software-engineering

What the interviewer is really asking

Assesses whether the candidate draws boundaries around business capability and data ownership and weighs the operational cost of a network boundary — rather than splitting by technical layer or chasing microservices for their own sake.

What to say

What to avoid

Example answers

Strong: I'd draw the boundary around a business capability that owns its own data — say 'payments' or 'notifications' — so it can deploy and scale on its own cadence. My test is coupling: things that change together and share a transaction stay together; a chunk with a clean interface that changes independently or has a very different scaling profile is worth extracting. I'd push back on splitting by technical layer, and I'd keep it in the monolith if the pieces are chatty or share a transaction, because then I'm just trading an in-process call for a network hop and turning one commit into an eventual-consistency problem.

Weak: Monoliths are hard to scale, so generally splitting into microservices is the right call — it's the modern architecture and lets each piece scale. I'd probably break it up by layer so we have a service for the API, a service for the business logic, and a service for the database. More services means more flexibility.

Want questions matched to your role? Paste a job title, job description, or CV and get a personalized set, or go Pro to unlock the full bank.