System Patterns

System patterns define the top-level structural blueprint of an application β€” how processes are split, how they communicate, and where boundaries live. This is the first decision you make before writing any code, and the one that is hardest to change later.

I learned this the hard way: I built a full microservices stack for a two-person team project. The overhead of service discovery, distributed tracing, and inter-service contracts nearly killed the project before we shipped anything useful. Choosing the right system pattern up front would have saved months.

Patterns in This Section

Pattern
When I Reach For It
Article

Starting a new project, single team, unknown domain

Web apps with clear presentation/business/data separation

Enterprise integration across teams or systems

Independent scaling, polyglot teams, domain boundaries clear

Event-triggered workloads, variable traffic, cost efficiency

Multi-node coordination, consistency across boundaries

Decentralised communication, no central authority

How to Read These Articles

Each article follows the same structure:

  1. The problem it solves β€” a real situation from my projects that led me to the pattern

  2. Core concepts β€” what defines the pattern and the tradeoffs

  3. When to use / when not to β€” honest guidance based on experience

  4. Code or structure examples β€” practical illustrations, not textbook abstractions

  5. What I would do differently β€” retrospective notes

Relationship to Application Patterns

System patterns answer: "How many processes are there, and how do they interact?"

Application patterns answer: "How is the code inside each process organised?"

You can combine them freely: a microservice system can use onion architecture inside each service. A monolith can use CQRS internally. See Application Patterns for those choices.

Last updated