Architectural Patterns
This post is a concept explainer for 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.
Core Definition
An architectural pattern defines the overall system structure (layers, ports & adapters, microservices, event flows) and influences quality attributes.
Common trade-offs include:
- Consistency versus availability
- Synchronous RPC chains versus asynchronous messaging
- Centralized database versus per-service data stores
Modern systems combine patterns (for example, DDD boundaries plus hexagonal architecture per service). Exam-relevant topics cover definitions, consequences, use case scenarios, and risks such as the distributed monolith antipattern.
Key Exam Topics
- Monolith and microservices: differences and consequences
- Layered architecture with dependency inversion
- Ports & adapters (hexagonal)
- IHK: naming quality goals and metrics (MTTR, latency)
- Security: zero trust, secrets management, service-to-service auth
- Economics: operational costs, licensing, team boundaries
- Documentation: C4 (L1–L3) 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, deploy, and observability
- Architectural elements (layers, adapters)
- Security (authentication, authorization, isolation)
- Testing (contract and chaos)
Practical Example (Hexagonal, Simplified)
Domain: Order.confirm() emits domain event
Application service orchestrates use case
Ports define contracts (repository, message bus)
Adapters couple REST, SQL, Kafka
Strengths and Weaknesses
Strengths
- Better changeability
- Improved testability
- Targeted quality attributes
Weaknesses
- Added complexity
- Infrastructure and observability required
- Risk of distributed monolith
Common Exam Questions (with Brief Answers)
- When is layered architecture appropriate? When responsibilities are clear and dependencies flow inward.
- Microservices versus monolith: what’s the core difference? Deployment independence, data ownership, and transaction scope.
- What does hexagonal architecture achieve? It isolates core logic from inputs and outputs through ports and adapters.
Free-Form Study
Learn patterns through problem, forces, solution, and consequences. Document architecture decisions as ADRs and visualize with C4.
Study Strategy
- Sketch a C4 diagram for a system.
- Mark sync and async paths per use case.
- Practice short definitions and trade-offs.
- Identify risks and mitigation strategies.



