Architecture Patterns Catalog
Curated reference of proven patterns with guidance on when and how to apply them.
Context
You are designing a system and want to know proven patterns that solve your problem. Reference catalog of patterns: when to use, tradeoffs, real-world examples.
Domain Context
Based on pattern catalogs (Gang of Four, Enterprise Patterns, Domain-Driven Design):
- Structural Patterns: How components fit together (Adapter, Facade, Bridge)
- Behavioral Patterns: How components interact (Observer, Strategy, State)
- Architectural Patterns: System-level patterns (Microservices, Event-Driven, CQRS)
- Data Patterns: How data flows (ETL, CDC, Event Sourcing)
- Messaging Patterns: How services communicate (Request-Reply, Pub-Sub, Saga)
Pattern Categories with Examples
Communication Patterns:
- Synchronous (Request-Reply): REST, gRPC. Blocking, tight coupling, simple.
- Asynchronous (Pub-Sub): Message broker, events. Loose coupling, eventual consistency.
- Saga Pattern: Distributed transaction across services. Orchestrator vs choreographer.
Data Patterns:
- Event Sourcing: Store events as source of truth. Auditability, temporal queries, replay.
- CQRS: Separate read and write models. Scalability, complexity.
- Polyglot Persistence: Different databases for different workloads. Flexibility, operational complexity.
Resilience Patterns:
- Circuit Breaker: Stop calling failing service, fast-fail. Prevent cascade failure.
- Bulkhead: Isolate resources (threads, connections). One service failure doesn't starve others.
- Retry with Backoff: Retry with exponential backoff. Transient failures recover.
Scalability Patterns:
- Sharding: Partition data across databases. Horizontal scaling, complexity.
- Caching: Cache hot data. Latency, consistency trade-off.
- Load Balancing: Distribute across instances. Horizontal scaling.
Instructions
Identify Problem: What are you trying to solve? Scaling? Reliability? Loose coupling?
Search Catalog: What patterns address this problem?
Evaluate Trade-offs: Benefits vs complexity? Team capability? Do we have the infrastructure?
Choose Pattern(s): Often combine patterns. Saga + Circuit Breaker. Sharding + Replication.
Implement Carefully: Patterns solve some problems, create others. Monitor carefully.
Document: Why you chose this pattern. What trade-offs accepted. What could go wrong.
Anti-Patterns in Pattern Use
- Pattern Memorization Without Understanding: Apply pattern because it's trendy. Result: wrong for problem. Guard: Understand pattern's purpose; ensure problem matches.
- Overusing One Pattern: Everything is microservices or event-driven. Result: wrong tool for job. Guard: Different problems, different patterns.
- Incomplete Implementation: Use circuit breaker but not monitoring. Result: fails silently. Guard: Implement full pattern; test failure scenarios.
- No Evolution Path: Choose pattern, stuck with it forever. Result: outdated, painful. Guard: Design to evolve; refactor when costs exceed benefits.
Further Reading
- Design Patterns: Elements of Reusable Object-Oriented Software by Gang of Four — foundational patterns
- Enterprise Integration Patterns by Gregor Hohpe — messaging and integration patterns
- Building Microservices by Sam Newman — microservice patterns
- Patterns of Enterprise Application Architecture by Martin Fowler — application architecture patterns
1---2name: architecture-patterns-catalog3description: Reference catalog of proven architecture patterns. Know when to apply each pattern, tradeoffs, and examples. Use as reference when designing systems.4---56# Architecture Patterns Catalog78Curated reference of proven patterns with guidance on when and how to apply them.910## Context1112You are designing a system and want to know proven patterns that solve your problem. Reference catalog of patterns: when to use, tradeoffs, real-world examples.1314## Domain Context1516Based on pattern catalogs (Gang of Four, Enterprise Patterns, Domain-Driven Design):1718- **Structural Patterns**: How components fit together (Adapter, Facade, Bridge)19- **Behavioral Patterns**: How components interact (Observer, Strategy, State)20- **Architectural Patterns**: System-level patterns (Microservices, Event-Driven, CQRS)21- **Data Patterns**: How data flows (ETL, CDC, Event Sourcing)22- **Messaging Patterns**: How services communicate (Request-Reply, Pub-Sub, Saga)2324## Pattern Categories with Examples25261. **Communication Patterns**:27 - **Synchronous (Request-Reply)**: REST, gRPC. Blocking, tight coupling, simple.28 - **Asynchronous (Pub-Sub)**: Message broker, events. Loose coupling, eventual consistency.29 - **Saga Pattern**: Distributed transaction across services. Orchestrator vs choreographer.30312. **Data Patterns**:32 - **Event Sourcing**: Store events as source of truth. Auditability, temporal queries, replay.33 - **CQRS**: Separate read and write models. Scalability, complexity.34 - **Polyglot Persistence**: Different databases for different workloads. Flexibility, operational complexity.35363. **Resilience Patterns**:37 - **Circuit Breaker**: Stop calling failing service, fast-fail. Prevent cascade failure.38 - **Bulkhead**: Isolate resources (threads, connections). One service failure doesn't starve others.39 - **Retry with Backoff**: Retry with exponential backoff. Transient failures recover.40414. **Scalability Patterns**:42 - **Sharding**: Partition data across databases. Horizontal scaling, complexity.43 - **Caching**: Cache hot data. Latency, consistency trade-off.44 - **Load Balancing**: Distribute across instances. Horizontal scaling.4546## Instructions47481. **Identify Problem**: What are you trying to solve? Scaling? Reliability? Loose coupling?49502. **Search Catalog**: What patterns address this problem?51523. **Evaluate Trade-offs**: Benefits vs complexity? Team capability? Do we have the infrastructure?53544. **Choose Pattern(s)**: Often combine patterns. Saga + Circuit Breaker. Sharding + Replication.55565. **Implement Carefully**: Patterns solve some problems, create others. Monitor carefully.57586. **Document**: Why you chose this pattern. What trade-offs accepted. What could go wrong.5960## Anti-Patterns in Pattern Use6162- **Pattern Memorization Without Understanding**: Apply pattern because it's trendy. Result: wrong for problem. **Guard**: Understand pattern's purpose; ensure problem matches.63- **Overusing One Pattern**: Everything is microservices or event-driven. Result: wrong tool for job. **Guard**: Different problems, different patterns.64- **Incomplete Implementation**: Use circuit breaker but not monitoring. Result: fails silently. **Guard**: Implement full pattern; test failure scenarios.65- **No Evolution Path**: Choose pattern, stuck with it forever. Result: outdated, painful. **Guard**: Design to evolve; refactor when costs exceed benefits.6667## Further Reading6869- _Design Patterns: Elements of Reusable Object-Oriented Software_ by Gang of Four — foundational patterns70- _Enterprise Integration Patterns_ by Gregor Hohpe — messaging and integration patterns71- _Building Microservices_ by Sam Newman — microservice patterns72- _Patterns of Enterprise Application Architecture_ by Martin Fowler — application architecture patterns