Architecture Library

Architecture Patterns

4–6 minutes
947 words

Well-known, reusable solutions to problems that come up again and again in system architecture.

What a pattern is

Most architecture problems are not new. Replacing a legacy system without stopping the business, connecting systems without tangling them together, keeping a service running when something it depends on fails: these have been solved many times, and the solutions that work have names.

A pattern describes one of those solutions: the problem it addresses, how it works, and what it costs. Patterns are not off-the-shelf designs to copy. They are starting points, and naming them gives a shared vocabulary that makes options easier to discuss and decisions easier to explain.

How the pattern pages work

Each pattern is described in the same format, so patterns can be compared side by side:

  • Problem – the situation the pattern addresses.
  • Context – the forces and constraints that make it relevant.
  • Solution – how the pattern works.
  • Trade-offs – the benefits, costs and risks.
  • When to use it, and when not to.
  • Related patterns – patterns that complement it or offer an alternative.
  • Example – an ArchiMate view where a diagram helps; see the ArchiMate Notation Key.
  • Further reading – the recognised source for the pattern.

Pattern categories

Patterns are being added over time, starting with those most closely linked to articles and case studies on this site.

Migration and modernisation

Changing or replacing existing systems safely, a step at a time.

PatternIn brief
Anti-Corruption LayerKeep a legacy system’s model from leaking into new systems
Branch by AbstractionIntroduce an abstraction, swap the implementation behind it, then remove the old one
Parallel RunRun old and new side by side, and compare results before switching
Strangler FigReplace a system gradually behind a shared interface

Integration

Connecting systems so data flows between them reliably, without tight dependencies.

PatternIn brief
API GatewayA single entry point that routes, secures and manages calls to services
Backends for FrontendsA separate API layer tailored to each type of client, such as web and mobile
Canonical Data ModelA shared data format that integrated systems translate to and from
Hub-and-SpokeConnect systems through a central integration hub instead of many direct links
Message Queue (Point-to-Point)Hand work reliably from one system to another, even when the receiver is busy or offline
Publish–SubscribeSystems announce events without needing to know who uses them
SagaCoordinate a business transaction across several services, with compensating steps if one fails
Transactional OutboxRecord events in the same database transaction as the change, then publish them reliably

Application structure

The overall shape of an application, and how it is divided into parts.

PatternIn brief
CQRSUse separate models for changing data and for reading it
Database per ServiceEach service owns its data, and other services access it only through the service
Event-Driven ArchitectureComponents react to events as they happen, instead of calling each other directly
Event SourcingStore every change as an event, and derive the current state from the history
Hexagonal Architecture (Ports and Adapters)Keep core business logic independent of databases, user interfaces and external services
Layered (N-Tier) ArchitectureSeparate presentation, business logic and data access into distinct layers
MicroservicesAn application built as small, independently deployable services
Modular MonolithOne deployable application, divided into well-separated modules
ServerlessRun code as managed functions that scale automatically, without managing servers

Resilience and scalability

Keeping systems available and responsive as load grows and components fail.

PatternIn brief
Active–Passive and Active–Active FailoverKeep standby or parallel capacity ready to take over when a component fails
BulkheadIsolate resources so a failure in one part cannot exhaust the whole system
Circuit BreakerStop calling a failing service, so it has a chance to recover
Health Endpoint MonitoringExpose a simple check that monitoring tools use to confirm a service is working
Queue-Based Load LevellingPut a queue between producers and consumers to absorb bursts of demand
Retry with BackoffRetry failed calls after increasing delays, to ride out temporary faults
Throttling and Rate LimitingLimit how much work a client or service can request, to protect shared capacity

Security

Building protection into the structure of a system, not just around its edges.

PatternIn brief
Defence in DepthSeveral independent layers of protection, so one failure is not enough
Federated Identity and Single Sign-OnLet users sign in once with a trusted identity provider, instead of separate accounts everywhere
GatekeeperA hardened front door that validates and filters requests before they reach services
Valet KeyGive clients temporary, limited access to a specific resource, without exposing wider credentials
Zero TrustVerify every request explicitly, rather than trusting anything inside the network

AI

Introducing AI capabilities in a controlled, useful way.

PatternIn brief
AI GatewayRoute AI model calls through a central point to manage access, cost and governance
Human-in-the-LoopKeep a person in the decision for high-impact or uncertain AI outputs
Retrieval-Augmented Generation (RAG)Ground an AI model’s answers in your own data

Anti-patterns

Common approaches that look reasonable but cause problems over time, such as the big ball of mud (a system with no recognisable structure), the distributed monolith (services that must all change and deploy together), integration through a shared database, and the golden hammer (using one favourite technology for every problem). Recognising them is as useful as knowing the patterns.

Related content

Data architecture patterns, such as the medallion architecture and data mesh, are planned for a separate Data library.