Cloud Design Patterns
Table of Contents
References
- https://microservices.io/index.html
- https://microservices.io/patterns/index.html
- https://learn.microsoft.com/en-us/azure/architecture/patterns/category/data-management
- https://learn.microsoft.com/en-us/azure/architecture/patterns/category/design-implementation
- https://learn.microsoft.com/en-us/azure/architecture/patterns/category/data-management
Classifications
- Application architecture patterns
- Monolithic architecture
- Microservices architecture pattern
- Decomposition design patterns
- Decompose by business capability
- Decompose by subdomain
- Self-contained Service
- Service per team
- Refactoring to microservices
- Strangler Application
- Anti-corruption layer
- Data management
- Database per Service
- Shared database
- Cloud Design Patterns - Saga distributed transactions pattern
- Command-side replica
- API Composition
- Domain event
- Cache-Aside - Load data on demand into a cache from a data store
- Command Query Responsibility Segregation (CQRS) - Segregate operations that read data from operations that update data by using separate interfaces.
- Event Sourcing pattern - Use an append-only store to record the full series of events that describe actions taken on data in a domain
- Index Table - Create indexes over the fields in data stores that are frequently referenced by queries.
- Materialized View - Generate prepopulated views over the data in one or more data stores when the data isn’t ideally formatted for required query operations.
- Sharding - Divide a data store into a set of horizontal partitions or shards.
- Static Content Hosting - Deploy static content to a cloud-based storage service that can deliver them directly to the client.
- Valet Key - Use a token or key that provides clients with restricted direct access to a specific resource or service.
- Transactional messaging
- Cloud Design Patterns - Transactional outbox pattern
- Transaction log tailing
- Polling publisher
- Testing
- Service Component Test
- Consumer-driven contract test
- Consumer-side contract test
- Deployment patterns
- Multiple service instances per host
- Service instance per host
- Service instance per VM
- Service instance per Container
- Serverless deployment
- Service deployment platform
- Sidecar pattern - Deploy components of an application into a separate process or container to provide isolation and encapsulation.
- Cross cutting concerns
- Microservice chassis
- Service Template
- Externalized configuration pattern
- Communication style
- Remote Procedure Invocation
- Messaging
- Domain-specific protocol
- Idempotent Consumer
- External API
- API Gateway pattern
- Backend for front-end
- Service discovery
- Client-side discovery
- Server-side discovery
- Service registry
- Self registration
- 3rd party registration
- Reliability
- Security
- Access Token - The API Gateway authenticates the request and passes an access token (e.g. JSON Web Token) that securely identifies the requestor in each request to the services. A service can include the access token in requests it makes to other services.
- Observability
- Log aggregation
- Application metrics
- Audit logging
- Distributed tracing
- Exception tracking
- Health check API
- Log deployments and changes
- UI patterns
- Server-side page fragment composition
- Client-side UI composition
- Design and implementation patterns
- Ambassador - Create helper services that send network requests on behalf of a consumer service or application.
- Anti-Corruption Layer - Implement a façade or adapter layer between a modern application and a legacy system.
- Backends for Frontends - Create separate backend services to be consumed by specific frontend applications or interfaces.
- Command Query Responsibility Segregation (CQRS) - Segregate operations that read data from operations that update data by using separate interfaces.
- Compute Resource Consolidation - Consolidate multiple tasks or operations into a single computational unit
- Edge Workload Configuration - The great variety of systems and devices on the shop floor can make workload configuration a difficult problem.
- External Configuration Store - Move configuration information out of the application deployment package to a centralized location.
- Gateway Aggregation - Use a gateway to aggregate multiple individual requests into a single request.
- Gateway Offloading - Offload shared or specialized service functionality to a gateway proxy.
- Gateway Routing - Route requests to multiple services using a single endpoint.
- Leader Election - Coordinate the actions performed by a collection of collaborating task instances in a distributed application by electing one instance as the leader that assumes responsibility for managing the other instances.
- Pipes and Filters - Break down a task that performs complex processing into a series of separate elements that can be reused.
- Static Content Hosting - Deploy static content to a cloud-based storage service that can deliver them directly to the client.
- Strangler Fig - Incrementally migrate a legacy system by gradually replacing specific pieces of functionality with new applications and services.
- Messaging patterns
- Asynchronous Request-Reply - Decouple backend processing from a frontend host, where backend processing needs to be asynchronous, but the frontend still needs a clear response.
- Claim Check - Split a large message into a claim check and a payload to avoid overwhelming a message bus.
- Choreography - Have each component of the system participate in the decision-making process about the workflow of a business transaction, instead of relying on a central point of control.
- Competing Consumers - Enable multiple concurrent consumers to process messages received on the same messaging channel.
- Pipes and Filters - Break down a task that performs complex processing into a series of separate elements that can be reused.
- Priority Queue - Prioritize requests sent to services so that requests with a higher priority are received and processed more quickly than those with a lower priority.
- Publisher-Subscriber - Enable an application to announce events to multiple interested consumers asynchronously, without coupling the senders to the receivers.
- Queue-Based Load Leveling - Use a queue that acts as a buffer between a task and a service that it invokes in order to smooth intermittent heavy loads.
- Scheduler Agent Supervisor - Coordinate a set of actions across a distributed set of services and other remote resources.
- Sequential Convoy - Process a set of related messages in a defined order, without blocking processing of other groups of messages.