The concept The question is asked too early
Should we use a monolith or microservices? is usually asked before anyone understands the boundaries, the teams, the workload, release needs or operational skills. Understand those first.
Side by side What each architecture costs
| Factor | Monolith | Modular monolith | Microservices |
|---|---|---|---|
| Deployment | One application | One application | Many services |
| Internal boundaries | Can be weak | Explicit modules | Service boundaries |
| Independent scaling | Limited | Limited | Possible |
| Distributed-system complexity | Lower | Lower | Higher |
| Operational overhead | Lower | Lower to medium | Higher |
| Independent release | Limited | Limited | Possible |
| Team ownership | Shared | By module | By service |
Boundaries Draw boundaries around business capabilities
A good boundary follows a business capability with a clear owner. Payment ingestion receives and validates payment information. Reconciliation matches payments and settlements under approved rules. Exception management tracks investigation and resolution. Never create a service for every table or every small method.
| Introduce microservices when evidence shows | Avoid them merely because |
|---|---|
| Capabilities need independent deployment | The company is growing |
| Workloads scale very differently | The application is old |
| Teams need independent ownership | The customer asked for modern architecture |
| Deployment coupling causes measured delivery problems | A conference recommended it |
| Failure isolation has business value, and the organization can run distributed systems | Someone wants to use Kubernetes |
Apply it A gradual path for Apex
This is a hypothetical scenario, not the Module 04 findings. Suppose a deeper investigation found matching rules buried in a large legacy application, frequent changes to exception handling, payment ingestion with different scaling needs, and a team with little experience running distributed services. None of these has been confirmed at Apex yet. If they were, a sensible path would be:
Practice Justify, or not, a service
Practical exercise
Should exception management be its own service?
Exception handling changes every two weeks at Apex, while matching rules change twice a year.
- Write the argument for a separate service.
- Write the argument for a module inside the existing application.
- Name the evidence that would decide it.
Show a sample answer
- For a service: it changes far more often, so independent releases would stop it waiting on the slow-moving matching code.
- For a module: the team has little distributed experience, and a clean module with its own tests can also be released safely.
- Deciding evidence: whether releases of the whole application are actually blocked or risky today, and whether the team can run another deployment with monitoring.
3 questions
Check your understanding
What you can do now
- Compare monolith, modular monolith and microservices honestly.
- Draw boundaries around business capabilities.
- Recognize good and bad reasons for microservices.
- Plan a gradual architecture evolution.