Architectural Patterns
This article is a glossary entry on architectural patterns — including exam questions, examples, and key takeaways.
In a Nutshell
Architectural patterns are reusable solution structures at the system level. They describe context, forces, solution, and consequences—focusing on quality attributes like maintainability, scalability, security, and testability.
Technical Definition
An architectural pattern defines the overall system structure (for example, layering, ports & adapters, microservices, event flows) and shapes quality attributes.
Key trade-offs include:
- Consistency versus availability
- Synchronous RPC chains versus asynchronous messaging
- Centralized database versus data per service
Modern systems often combine multiple patterns (for instance, DDD boundaries plus hexagonal architecture per service). Exam topics cover pattern definitions, consequences, use cases, and risks like the distributed monolith anti-pattern.
Exam-Relevant Topics
- Differences and consequences of monolith versus microservices
- Layered architecture and dependency inversion
- Ports & adapters (hexagonal)
- IHK: Naming quality goals and metrics (MTTR, latency)
- Security: Zero Trust, secrets management, service-to-service authentication
- Economics: operational and license costs, team boundaries
- Documentation: C4 (levels 1–3) and ADRs
Core Components
- Context and assumptions
- Problem and forces
- Structure and building blocks
- Communication style (sync/async)
- Data strategy
- Interfaces and protocols
- Build, test, deployment, and observability
- Architectural elements (layers, adapters)
- Security (authentication/authorization, isolation)
- Testing (contract and chaos tests)
Practical Example (Hexagonal, Simplified)
Domain: Order.confirm() produces a domain event
Application service orchestrates the use case
Ports define contracts (repository, message bus)
Adapters couple REST, SQL, and Kafka
Strengths and Weaknesses
Strengths
- Better changeability
- Improved testability
- Targeted quality attributes
Weaknesses
- Increased complexity
- Infrastructure and observability requirements
- Risk of distributed monolith patterns
Typical Exam Questions (With Brief Answers)
- When is layered architecture suitable? When responsibilities are clear and dependencies flow inward.
- Microservices versus monolith: what’s the core difference? Deployment independence, data ownership, and transaction boundaries.
- What does hexagonal architecture achieve? It isolates core business logic from input and output concerns through ports and adapters.
Free-Form Response
Learn patterns through problem, forces, solution, and consequences. Document architectural decisions as ADRs and visualize with C4.
Learning Strategy
- Sketch a C4 diagram for a system.
- Mark synchronous and asynchronous paths for each use case.
- Practice short definitions and trade-offs.
- Name risks and mitigation measures.



