Skip to main content
44 pattern(s) shown
PatternReliabilitySecurityCost OptimizationOperational ExcellencePerformance Efficiency
1. Ambassador
Create helper services that send network requests on behalf of a consumer service or application.
Tradeoffs: Adds proxy layer with latency overhead. Tradeoff: Standardizes cross-cutting concerns (security, monitoring, retries) but introduces additional processing and deployment complexity.
2. Anti-Corruption Layer
Implement a façade or adapter layer between a modern application and a legacy system.
Tradeoffs: Adds latency and must be managed separately. Tradeoff: Isolates legacy system complexity and prevents design corruption but adds service overhead and increases management requirements.
3. Asynchronous Request-Reply
Decouple backend processing from front-end to enable asynchronous processing.
Tradeoffs: Improves client responsiveness and backend decoupling. Tradeoff: Requires reliable message handling, caller must poll/wait for results, and adds overall latency to complete operations.
4. Backends for Frontends
Create separate backend services for each frontend client type to tailor APIs for specific needs.
Tradeoffs: Optimizes per-client experiences and reduces API surface area. Tradeoff: Multiple services increase operational overhead, introduce latency from extra network hops, may cause code duplication, and increase management complexity.
5. Bulkhead
Isolate resources to prevent failures in one component from cascading to others.
Tradeoffs: Isolates failures and enables independent scaling. Tradeoff: May underutilize resources in isolated partitions, increases complexity in partitioning strategy, and adds overhead per partition.
6. Cache-Aside
Load data into cache only on demand, keeping the cache and database in sync.
Tradeoffs: Improves read performance for frequently accessed data. Tradeoff: Application must manage cache expiration and invalidation, complexity in maintaining consistency, cache misses still require database hits, and potential for stale data.
7. Choreography
Decentralize control for event-driven systems, services respond to events rather than centralized orchestration.
Tradeoffs: Removes central bottleneck and enables independent service updates. Tradeoff: Complex failure handling, difficult to trace execution flow with distributed tracing, harder to manage sequencing, and increased point-to-point communication.
8. Circuit Breaker
Detect failures and encapsulate the logic of preventing a failure from constantly recurring.
Tradeoffs: Prevents cascading failures and rapid failure detection. Tradeoff: Requires monitoring and threshold configuration, complex exception handling, monitoring overhead, waiting for circuit reset may introduce delays, and needs appropriate timeout tuning.
9. Claim Check
Store large messages externally and pass only a reference in the message pipeline.
Tradeoffs: Reduces message size, adds external storage dependency.
10. Compensating Transaction
Use a compensation action to undo a previous transaction in a distributed system.
Tradeoffs: Ensures eventual consistency in distributed transactions. Tradeoff: Adds complexity to design compensation logic, introduces latency from multi-step processes, compensation itself can fail, and difficulty tracking distributed state.
11. Competing Consumers
Multiple consumers read from the same queue to improve scalability and performance.
Tradeoffs: Enables parallel processing, but can introduce contention and complexity.
12. Compute Resource Consolidation
Reduce the number of instances and resources by consolidating workloads on fewer machines.
Tradeoffs: Saves cost but may create performance bottlenecks.
13. CQRS
Separate read and write operations to optimize performance, scalability, and security.
Tradeoffs: Improves scalability but adds operational complexity.
14. Deployment Stamps
Deploy multiple identical environments to isolate workloads and reduce risk.
Tradeoffs: Improves isolation and reliability but increases deployment and infrastructure cost.
15. Edge Workload Configuration
Deploy workloads closer to the edge to reduce latency and improve responsiveness.
Tradeoffs: Reduces latency but may complicate management and monitoring.
16. Event Sourcing
Store all changes to an application state as a sequence of events.
Tradeoffs: Enables auditability and temporal queries but increases storage and processing complexity.
17. External Configuration Store
Keep configuration separate from code and deploy it externally.
Tradeoffs: Centralizes configuration management but introduces dependency on external service.
18. Federated Identity
Enable single sign-on and identity federation across multiple systems.
Tradeoffs: Improves security and user experience but adds identity management complexity.
19. Gatekeeper
Acts as a façade/gateway to validate and sanitize external requests before they reach internal services.
Tradeoffs: Centralizes security checks but can become a bottleneck if misconfigured.
20. Gateway Aggregation
Combine multiple backend services into a single endpoint to simplify client calls.
Tradeoffs: Simplifies client integration but adds gateway processing overhead.
21. Gateway Offloading
Offload cross-cutting concerns (like SSL termination) to a gateway service.
Tradeoffs: Reduces backend load but adds gateway dependency.
22. Gateway Routing
Route client requests to appropriate backend services via a gateway.
Tradeoffs: Centralizes routing but may increase latency and dependency on gateway.
23. Geode
Segment the network or application into zones for isolation and performance.
Tradeoffs: Improves isolation but adds deployment complexity.
24. Health Endpoint Monitoring
Expose application health via a dedicated endpoint to allow monitoring.
Tradeoffs: Enables observability but adds maintenance overhead.
25. Index Table
Maintain an index table to improve query performance and scalability.
Tradeoffs: Improves query efficiency but requires additional storage and update logic.
26. Leader Election
Select a leader among distributed components to coordinate actions and avoid conflicts.
Tradeoffs: Ensures coordinated behavior but adds leader selection complexity.
27. Materialized View
Precompute and store query results to improve read performance.
Tradeoffs: Faster reads but increases storage and maintenance complexity.
28. Messaging Bridge
Translate messages between different messaging systems.
Tradeoffs: Enables interoperability but adds latency and complexity.
29. Pipes and Filters
Break a task into a series of processing steps connected by channels.
Tradeoffs: Improves modularity but adds latency due to multiple processing steps.
30. Priority Queue
Process messages based on priority levels to improve responsiveness for important tasks.
Tradeoffs: Prioritizes critical tasks but may delay lower-priority messages.
31. Publisher/Subscriber
Decouple producers and consumers using a message broker for event distribution.
Tradeoffs: Improves scalability but increases operational complexity.
32. Quarantine
Isolate problematic data or processes to prevent affecting the main workflow.
Tradeoffs: Protects system integrity but adds operational overhead.
33. Queue-Based Load Leveling
Use queues to smooth out bursts in workload and prevent backend overload.
Tradeoffs: Reduces backend stress but may increase latency for individual requests.
34. Rate Limiting
Limit the number of requests or actions to protect system resources.
Tradeoffs: Protects resources but may deny legitimate requests during spikes.
35. Retry
Automatically retry failed operations to handle transient faults.
Tradeoffs: Improves reliability but can increase load if misconfigured.
36. Saga
Manage long-running transactions in distributed systems with compensating actions.
Tradeoffs: Ensures consistency but adds operational complexity and latency.
37. Scheduler Agent Supervisor
Coordinate scheduled tasks and supervise their execution to ensure reliability.
Tradeoffs: Improves reliability but increases orchestration complexity.
38. Sequential Convoy
Prevent head-of-line blocking by processing requests sequentially when needed.
Tradeoffs: Prevents deadlocks but reduces throughput.
39. Sharding
Partition data across multiple databases to scale out workloads.
Tradeoffs: Improves scalability but adds operational and query complexity.
40. Sidecar
Deploy helper services alongside main services to provide additional capabilities.
Tradeoffs: Adds modular functionality but increases resource usage.
41. Static Content Hosting
Serve static content from a dedicated service or storage to improve performance and scalability.
Tradeoffs: Improves performance but may require additional storage and CDN configuration.
42. Strangler Fig
Incrementally replace parts of a legacy system by routing functionality to new services.
Tradeoffs: Enables gradual migration but adds routing complexity.
43. Throttling
Limit the number of operations a client can perform within a timeframe.
Tradeoffs: Protects system resources but may impact client experience.
44. Valet Key
Provide clients with restricted, direct access to a specific resource using tokens or keys.
Tradeoffs: Enables secure direct access but adds key management complexity.