पाठ 6 / 25
Choosing an Architecture
Use team size, domain maturity and operational capability to choose an architecture.
Monolith first, usually
Martin Fowler's "MonolithFirst" argument observes that many successful microservice systems started as monoliths that were split later, while many systems built as microservices from scratch struggled. Early on, you rarely know the right boundaries, and moving a boundary inside a monolith is a refactor, while moving it between services is a migration. Questions that drive the decision: How many teams will work on this, and does coordination already slow them down? How well understood is the domain: stable, clear boundaries or still being discovered? Do parts have very different scaling, availability or compliance needs? Do we have the platform: automated CI/CD, containers, observability, on-call maturity? A reasonable default for a new product or a small team is a well-modularised monolith, extracting services when a concrete pressure appears.
A decision scorecard
Count the answers that point towards services; a few yeses rarely justify a full split.
question points to
--------------------------------------------------------------- ----------------
more than ~3-4 teams changing the same codebase daily? services
release coordination is a regular bottleneck? services
boundaries stable and well understood? services
a component has very different scale / uptime / compliance? extract that one
automated CI/CD, containers, tracing, on-call already in place? services
product still searching for product-market fit? modular monolith
team under ~10 engineers? modular monolith
most changes touch several areas at once? modular monolithExtract for a reason you can name
"Microservices are modern" is not a reason. "Search needs to scale independently and its team ships ten times a day" is. Write the reason in the design doc.
त्वरित जाँच: A five-person start-up is still discovering its product. What is usually the best starting architecture?
- A well-modularised monolith
- Thirty microservices on Kubernetes
- A separate service per database table
- Serverless functions for every endpoint
Answer
A well-modularised monolith — Small teams with evolving domains benefit from the simplicity and flexibility of a modular monolith.