Dashboard
Courses
Problems
Badges
Theme
Sign inStart free
Courses/Architecture Leadership
Lesson 10 of 32

Evolutionary architecture and fitness functions

Design systems that are expected to change, and protect the qualities that matter with automated fitness functions.

15 min read

Plan for change, not for the final state

Requirements will change, load will grow and teams will reorganise, so the target architecture you draw today will be wrong in some way within two years. Evolutionary architecture, as described by Ford, Parsons and Kua, accepts this and focuses on making change cheap and safe: small deployable units, clear boundaries, automated tests, and the ability to observe whether the system still has the qualities you care about after each change. The aim is an architecture whose next change is as cheap as its last one.

Fitness functions

A fitness function is an automated check that a quality attribute still holds. It turns an architectural intention ('the web tier must not call the database directly') into something a pipeline can enforce. Without them, architecture erodes one reasonable-looking pull request at a time.

  • Dependency rules: ArchUnit or dependency-cruiser tests that forbid illegal imports
  • Performance budgets: a load test in CI that fails if p95 latency rises above 300 ms
  • Security: dependency scanning that blocks known critical CVEs
  • Operability: every service must expose health checks and emit trace IDs
  • Cost: alert when a service's daily spend rises more than 20% week over week

Atomic versus holistic, triggered versus continuous

Some fitness functions check one thing in isolation (an import rule in a unit test); others check the whole system (a chaos experiment that kills a zone). Some run on each commit; others run continuously in production, such as SLO burn alerts. A healthy portfolio mixes all four. Start with the two or three qualities ranked highest for the system and write one fitness function for each before adding more. Review the portfolio when priorities change, and retire checks that no longer protect anything important.

Last responsible moment

Evolutionary design is not avoiding decisions; it is making each one at the last responsible moment, when you have the most information but delay has not yet become expensive. Choose the one-way doors (data model of core entities, public API contracts) early and carefully; keep the rest flexible. On the SystCode canvas, the test scenarios behave like fitness functions: change a component and you immediately see whether latency and availability targets still hold. Deferring is only safe if the code keeps options open, so keep boundaries clean in the meantime.

Key takeaways

  • Assume the architecture will change and optimise for cheap, safe change.
  • Fitness functions turn architectural intentions into automated checks that stop erosion.
  • Mix commit-time and production checks, single-rule and whole-system checks.
  • Decide one-way doors early and carefully; defer the rest to the last responsible moment.

Sign in to track lessons and earn badges.

Build vs buyTechnical debt management

Coming up

Course: 0/32 lessons · 0/10 challenges0%

Build it on the canvas, pass the review (70+) and mark it complete to count it toward the course badge.

  1. 2/10Design a Link Preview ServiceThreat-model a service that fetches untrusted URLs and design its SSRF defences across the trust boundary.Easy
  2. 3/10Design a Login ServiceApply authentication fundamentals: hashed credentials, short-lived tokens, revocation and rate limits on login.
Easy
All 10 challenges →