Incremental architecture
Growing the architecture step by step as real needs appear.
Incremental architecture builds what the product needs now and leaves room to change. It avoids big upfront designs based on guesses. Techniques like feature toggles and the strangler pattern let it evolve safely.
Why it matters for a product engineer
Most architecture decisions are made before anyone knows how the product will be used. Incremental architecture builds what the product needs now and keeps the next change possible. When a real need appears, the system changes in small, safe steps, while users keep working.
How to do it
- Start simple: one well-structured application, with clear modules inside it. Split it only when a boundary is clear and the split solves a real problem.
- Name the part that must change, and the reason: cost, outages, scale or a new kind of feature.
- Change it in parallel. Expand: add the new path next to the old one. Migrate: move callers and data across. Contract: remove the old path.
- Run the old and the new path side by side, and compare their answers before you trust the new one.
- Keep each step deployable and reversible, with a feature flag or a router in front.
- Delete the old path when nothing uses it. Two paths kept forever are a cost, not a safety net.
Common mistakes
- A big rewrite that stops all other work and ships months later.
- Splitting into services before the boundaries are known.
- Building the new path inside the old code, when the old code is the problem.
- Skipping the comparison, so the differences appear in production.
Example
The Guardian’s content system stored articles in MongoDB, and two outages had stopped publication on the site. In 2017 the team chose PostgreSQL. The old API had MongoDB details even in its controllers, so adding a second database there was too risky. Instead the team duplicated the API, put a proxy in front of both, and kept the old one as the primary. Records moved across, the new database became the primary, and the MongoDB cluster was switched off in April 2018.
How the Guardian moved its content off MongoDB
Both APIs answered every request, and the old one stayed in charge. Each logged difference was a bug found before the switch, not after.
ReportedThe Guardian engineering blog, 30 Nov 2018
Sources: Bye bye Mongo, hello Postgres (The Guardian) ↗ · Parallel change (Danilo Sato) ↗ · Monolith first (Martin Fowler) ↗
Resources
2- articleStart here
Parallel change ↗
Danilo Sato (martinfowler.com) · 6 minExpand, migrate, contract. The pattern behind changing schemas and APIs without breaking running code.
- articleStart here
Monolith first ↗
Martin Fowler · 2015 · 6 minWhy most successful systems start as one well-structured application and split only when boundaries are clear.