STAGE 07 / LESSON 01
Start with clear boundaries
System design is about trade-offs that help an application meet real requirements.
THE IDEA
Understand it.
A modular monolith can keep related features in one deployable application while separating responsibilities in code. This is often a practical starting point for a small team, but it is not a universal rule.
Before splitting services, identify the concrete need: team ownership, independent scaling, isolation or another constraint. Distributed services add network failures, deployment coordination and operational complexity.
SEE IT IN CONTEXT
A small business application
One application
├─ identity and access
├─ tasks
├─ approvals
└─ audit events
One database, with clear data ownershipSeparate modules make responsibilities easier to reason about even before introducing separate services.
LEARN FROM REAL WEBSITES
See it in the real world.
These simplified structures come from public sources. Company systems change, and the sources may describe only one project or an earlier design.
Shopify
Shopify engineering, 2019A modular monolith
Shopify described organizing its large Rails application as a modular monolith with boundaries between areas of the codebase.
- One application
- Separate modules
- Clear dependencies
What to learn: A monolith can have deliberate internal boundaries; one deployable does not mean unstructured code.
Read the source: Shopify modular monolithGitHub
GitHub engineering, 2023A long-lived Rails application
GitHub described the role of Ruby and Rails in building and evolving its main application.
- GitHub application
- Rails codebase
- Supporting infrastructure
What to learn: A single application can evolve for years while working with other services. The article does not imply GitHub is only one process.
Read the source: Building GitHub with Ruby and RailsTRY IT YOURSELF
Practice.
A team has one application and low traffic. Is 'microservices are popular' enough reason to split it?
Show one possible answer
No. Identify a specific constraint and compare the benefit with the added operational and failure-handling cost.
GO DEEPER