Architects design workloads by integrating platform services, functionality, and code to meet both functional and nonfunctional requirements. Cloud design patterns provide solutions to many common challenges in distributed systems. The catalog names Ambassador, Anti-Corruption Layer, Asynchronous Request-Reply, Backends for Frontends, Bulkhead, and Cache-Aside. It also names Claim Check, CQRS, Event Sourcing, Circuit Breaker, Retry, Saga, Sharding, and Strangler Fig. Further names include Gateway Aggregation, Gateway Offloading, Gateway Routing, Geode, Health Endpoint Monitoring, and Leader Election. Each row lists the Well-Architected pillars that pattern supports.
Why Cloud Design Patterns?
Distributed systems commonly run into false assumptions (the fallacies of distributed computing), such as:
- The network is reliable.
- Latency is zero.
- Bandwidth is infinite.
- The network is secure.
- The network topology doesn't change.
Design patterns raise awareness of these problems and provide strategies to compensate for them and mitigate the risks.
Pattern Catalog
| Pattern | Summary | Well-Architected pillars |
|---|---|---|
| Ambassador | Create helper services that send network requests on behalf of a consumer service or application. | Reliability, Security |
| Anti-Corruption Layer | Implement a façade or adapter layer between a modern application and a legacy system. | Operational Excellence |
| Asynchronous Request-Reply | Decouple backend processing from a frontend host, where backend processing must be asynchronous but the frontend still needs a clear response. | Performance Efficiency |
| Backends for Frontends | Create separate backend services for specific frontend applications or interfaces. | Reliability, Security, Performance Efficiency |
| Bulkhead | Isolate application elements into pools so that if one fails, the others keep working. | Reliability, Security, Performance Efficiency |
| Cache-Aside | Load data on demand into a cache from a data store. | Reliability, Performance Efficiency |
| Choreography | Let services decide when and how a business operation is processed instead of relying on a central orchestrator. | Operational Excellence, Performance Efficiency |
| Circuit Breaker | Handle faults that might take a variable amount of time to recover from when connecting to a remote service. | Reliability, Performance Efficiency |
| Claim Check | Split a large message into a claim check and a payload to avoid overwhelming a message bus. | Reliability, Security, Cost Optimization, Performance Efficiency |
| Compensating Transaction | Undo the work performed by a series of steps that together define an eventually consistent operation. | Reliability |
| Competing Consumers | Enable multiple concurrent consumers to process messages received on the same messaging channel. | Reliability, Cost Optimization, Performance Efficiency |
| Compute Resource Consolidation | Consolidate multiple tasks or operations into a single computational unit. | Cost Optimization, Operational Excellence, Performance Efficiency |
| CQRS | Segregate operations that read data from operations that update data by using separate interfaces. | Performance Efficiency |
| Deployment Stamps | Deploy multiple independent copies of application components, including data stores. | Operational Excellence, Performance Efficiency |
| Event Sourcing | Use an append-only store to record the full series of events that describe actions taken on data. | Reliability, Performance Efficiency |
| External Configuration Store | Move configuration information out of the application deployment package to a centralized location. | Operational Excellence |
| Federated Identity | Delegate authentication to an external identity provider. | Reliability, Security, Performance Efficiency |
| Gateway Aggregation | Use a gateway to aggregate multiple individual requests into a single request. | Reliability, Security, Operational Excellence, Performance Efficiency |
| Gateway Offloading | Offload shared or specialized service functionality (such as SSL and authentication) to a gateway proxy. | Reliability, Security, Cost Optimization, Operational Excellence, Performance Efficiency |
| Gateway Routing | Route requests to multiple services by using a single endpoint. | Reliability, Operational Excellence, Performance Efficiency |
| Geode | Deploy backend services into a set of geographical nodes, each of which can service any client request in any region. | Reliability, Performance Efficiency |
| Health Endpoint Monitoring | Implement functional checks in an application that external tools can access at regular intervals. | Reliability, Operational Excellence, Performance Efficiency |
| Index Table | Create indexes over the fields in data stores that queries frequently reference. | Reliability, Performance Efficiency |
| Leader Election | Coordinate the actions of a distributed application by electing one instance as the leader. | Reliability |
| Materialized View | Generate prepopulated views over data when the source data isn't suited to the required queries. | Performance Efficiency |
| Messaging Bridge | Build an intermediary to enable communication between messaging systems that are otherwise incompatible. | Cost Optimization, Operational Excellence |
| Pipes and Filters | Break a complex processing task into a series of separate, reusable components. | Reliability |
| Priority Queue | Prioritize requests sent to services so that higher-priority requests are processed faster. | Reliability, Performance Efficiency |
| Publisher/Subscriber | Enable an application to announce events to multiple consumers asynchronously. | Reliability, Security, Cost Optimization, Operational Excellence, Performance Efficiency |
| Quarantine | Ensure that external assets meet a quality level before they are admitted into a workflow. | Security, Operational Excellence |
| Queue-Based Load Leveling | Use a queue as a buffer between a task and a service to smooth intermittent heavy loads. | Reliability, Cost Optimization, Performance Efficiency |
| Rate Limiting | Avoid or minimize overload errors by controlling resource consumption. | Reliability |
| Retry | Let an application handle transient failures by retrying operations that have failed. | Reliability |
| Saga | Manage data consistency across microservices in distributed transaction scenarios. | Reliability |
| Scheduler Agent Supervisor | Coordinate a set of actions across distributed services and resources. | Reliability, Performance Efficiency |
| Sequential Convoy | Process a set of related messages in a defined order without blocking the processing of other groups of messages. | Reliability |
| Sharding | Divide a data store into a set of horizontal partitions or shards. | Reliability, Cost Optimization |
| Sidecar | Deploy components into a separate process or container to provide isolation and encapsulation. | Security, Operational Excellence |
| Static Content Hosting | Deploy static content to a cloud-based storage service that can deliver it directly to the client. | Cost Optimization |
| Strangler Fig | Incrementally migrate a legacy system by gradually replacing specific pieces of functionality with new applications and services. | Reliability, Cost Optimization, Operational Excellence |
| Throttling | Control the consumption of resources used by an application, a user, or a service. | Reliability, Security, Cost Optimization, Performance Efficiency |
| Valet Key | Use a token or key that gives clients restricted direct access to a specific resource. | Security, Cost Optimization, Performance Efficiency |
Source: Azure Architecture Center - Cloud Design Patterns
See also: Circuit Breaker Pattern · CQRS Pattern · Saga Pattern